-
Notifications
You must be signed in to change notification settings - Fork 0
蔵書一覧ページのテストを書いた #140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
蔵書一覧ページのテストを書いた #140
Conversation
Kosei805
left a comment
There was a problem hiding this 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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
書き方の簡略化を知れるのはありがたいけど、このコードが動くかどうか確認した?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
確認したよ
| {children} | ||
| </MantineProvider> | ||
| {children} | ||
| </QueryClientProvider> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MantineTestProviderってテスト以外でも囲われてるの?
There was a problem hiding this comment.
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'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ここってテストでOK通るの?
コメントアウトしなくて問題なし?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UIを操作するだけで何かをチェックする訳ではないから,コメントアウトしなくても大丈夫
やったこと
確認した方法
自動生成したコード
なし