Skip to content

Conversation

@kimurash
Copy link
Member

@kimurash kimurash commented Nov 16, 2024

やったこと

  • 検索条件のハンドラをリファクタリングした e72237b
  • 蔵書一覧ページのテストを記述した 42a1e10
  • 2日以上マージされていないPRをSlackに通知するワークフローを定義した 6a653d8

確認した方法

pnpm run test

自動生成したコード

なし

@kimurash kimurash added the frontend frontend development label Nov 16, 2024
@kimurash kimurash requested a review from Kosei805 November 16, 2024 11:47
@kimurash kimurash self-assigned this Nov 16, 2024
@kimurash kimurash changed the title 89 test book list page 蔵書一覧ページのテストを書いた Nov 16, 2024
Copy link
Contributor

@Kosei805 Kosei805 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

問題なしです。
フロントエンドのactionのとこは参考になるからありがたい。
ちょっと俺の書き方は汚い気はしてました(汗)

url =
initial === true ? `${url}?title=${title}` : `${url}&title=${title}`;
initial = false;
params.append('title', title);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

書き方の簡略化を知れるのはありがたいけど、このコードが動くかどうか確認した?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

確認したよ

{children}
</MantineProvider>
{children}
</QueryClientProvider>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MantineTestProviderってテスト以外でも囲われてるの?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

テスト用のコンポーネントだからテスト以外では使用されない

expect(limitSelect).toHaveValue('10');

// FIXME: 5が選択された後なぜかすぐ10が選択される
await user.selectOptions(limitSelect, '5');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ここってテストでOK通るの?
コメントアウトしなくて問題なし?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UIを操作するだけで何かをチェックする訳ではないから,コメントアウトしなくても大丈夫

@kimurash kimurash merged commit 2421037 into main Nov 17, 2024
3 checks passed
@kimurash kimurash deleted the 89-test-book-list-page branch November 17, 2024 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend frontend development

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

蔵書一覧ページのテスト

3 participants