-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Breadcrumb (v8): convert tests to use testing-library #22209
Breadcrumb (v8): convert tests to use testing-library #22209
Conversation
|
||
expect(wrapper.find('.ms-Breadcrumb').prop('role')).toEqual('region'); | ||
expect(getByRole('region', { hidden: true })).toBeTruthy(); |
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.
testing-library deemed this as an "inaccessible" role thus I set hidden:true
to gain access to this element
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.
Thanks to @ecraig12345 for investigating why elements were inaccessible to begin with here, i've now changed this approach to use jest timers before trying to get the role.
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 3316678:
|
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: e1c43fa8ad95af2a11a99c170150e40646c1a2f7 (build) |
📊 Bundle size report🤖 This report was generated against 50b0659126a88c9690b9fdfccf755d08617e395e |
Perf Analysis (
|
Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
---|---|---|---|---|---|
BaseButton | mount | 752 | 712 | 5000 | |
Breadcrumb | mount | 2321 | 2360 | 1000 | |
Checkbox | mount | 1221 | 1155 | 5000 | |
CheckboxBase | mount | 1078 | 991 | 5000 | |
ChoiceGroup | mount | 3884 | 3805 | 5000 | |
ComboBox | mount | 754 | 802 | 1000 | |
CommandBar | mount | 8498 | 8743 | 1000 | |
ContextualMenu | mount | 10175 | 9760 | 1000 | |
DefaultButton | mount | 995 | 955 | 5000 | |
DetailsRow | mount | 3215 | 3201 | 5000 | |
DetailsRowFast | mount | 3256 | 3104 | 5000 | |
DetailsRowNoStyles | mount | 3070 | 2896 | 5000 | |
Dialog | mount | 1836 | 1856 | 1000 | |
DocumentCardTitle | mount | 143 | 151 | 1000 | |
Dropdown | mount | 2642 | 2731 | 5000 | |
FocusTrapZone | mount | 1517 | 1395 | 5000 | |
FocusZone | mount | 1584 | 1480 | 5000 | |
IconButton | mount | 1342 | 1437 | 5000 | |
Label | mount | 257 | 308 | 5000 | |
Layer | mount | 2462 | 2463 | 5000 | |
Link | mount | 410 | 401 | 5000 | |
MenuButton | mount | 1231 | 1285 | 5000 | |
MessageBar | mount | 1652 | 1746 | 5000 | |
Nav | mount | 2777 | 2829 | 1000 | |
OverflowSet | mount | 877 | 844 | 5000 | |
Panel | mount | 1735 | 1758 | 1000 | |
Persona | mount | 863 | 775 | 1000 | |
Pivot | mount | 1105 | 1253 | 1000 | |
PrimaryButton | mount | 1084 | 1100 | 5000 | |
Rating | mount | 6358 | 6461 | 5000 | |
SearchBox | mount | 991 | 1131 | 5000 | |
Shimmer | mount | 2071 | 2043 | 5000 | |
Slider | mount | 1596 | 1546 | 5000 | |
SpinButton | mount | 4142 | 4183 | 5000 | |
Spinner | mount | 378 | 333 | 5000 | |
SplitButton | mount | 2707 | 2616 | 5000 | |
Stack | mount | 445 | 449 | 5000 | |
StackWithIntrinsicChildren | mount | 1860 | 1930 | 5000 | |
StackWithTextChildren | mount | 4132 | 4231 | 5000 | |
SwatchColorPicker | mount | 9414 | 9477 | 5000 | |
TagPicker | mount | 2283 | 2307 | 5000 | |
TeachingBubble | mount | 82156 | 46908 | 5000 | |
Text | mount | 335 | 357 | 5000 | |
TextField | mount | 1153 | 1164 | 5000 | |
ThemeProvider | mount | 990 | 914 | 5000 | |
ThemeProvider | virtual-rerender | 519 | 567 | 5000 | |
ThemeProvider | virtual-rerender-with-unmount | 1584 | 1529 | 5000 | |
Toggle | mount | 656 | 703 | 5000 | |
buttonNative | mount | 112 | 118 | 5000 |
@TristanWatanabe This has merge conflicts now :( |
Current Behavior
Breadcrumb
tests don't use testing-libraryNew Behavior
Breadcrumb
to fully use testing-libraryRelated Issue(s)
part of #21663