-
Notifications
You must be signed in to change notification settings - Fork 12
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
test(spindle-ui): check aria attributes in Breadcrumb #771
base: main
Are you sure you want to change the base?
Conversation
✨✨ That's perfect, there is no visual difference! ✨✨ Check out the report here. |
Visit the preview URL for this PR (updated for commit dfc2d90): https://ameba-spindle--pr771-test-breadcrumb-82ienvbh.web.app (expires Fri, 08 Sep 2023 09:33:08 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: e7521619a2dd5c653490c8246e81ec2a5c8f1435 |
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(screen.getByRole('navigation').getAttribute('aria-label')).toEqual( | ||
'パンくずリスト', | ||
); | ||
expect(screen.getByText('Amebaとは').getAttribute('aria-current')).toEqual( |
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.
nits. Top, Teamのリンクには aria-current
が無いこともテストしておきますか??
@@ -0,0 +1,25 @@ | |||
import React from 'react'; |
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.
q.
spindle/packages/spindle-ui/tsconfig.json
Line 17 in dfc2d90
"src/**/*.test.*", |
(Button.test.tsxも同様でした)
BreadcrumbのDesign Docを見ていく中で、
aria-*
の確認できていないなあだったのでテストを追加しました。