Skip to content
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

Conversation

TristanWatanabe
Copy link
Member

Current Behavior

  • v8 Breadcrumb tests don't use testing-library

New Behavior

  • Convert Breadcrumb to fully use testing-library

Related Issue(s)

part of #21663


expect(wrapper.find('.ms-Breadcrumb').prop('role')).toEqual('region');
expect(getByRole('region', { hidden: true })).toBeTruthy();
Copy link
Member Author

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

Copy link
Member Author

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.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 25, 2022

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:

Sandbox Source
@fluentui/react 8 starter Configuration
@fluentui/react-components 9 starter Configuration

@size-auditor
Copy link

size-auditor bot commented Mar 25, 2022

Asset size changes

Size Auditor did not detect a change in bundle size for any component!

Baseline commit: e1c43fa8ad95af2a11a99c170150e40646c1a2f7 (build)

@fabricteam
Copy link
Collaborator

fabricteam commented Mar 25, 2022

📊 Bundle size report

🤖 This report was generated against 50b0659126a88c9690b9fdfccf755d08617e395e

@fabricteam
Copy link
Collaborator

fabricteam commented Mar 25, 2022

Perf Analysis (@fluentui/react)

No significant results to display.

All results

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 TristanWatanabe marked this pull request as ready for review March 25, 2022 15:05
@TristanWatanabe TristanWatanabe requested review from a team and khmakoto as code owners March 25, 2022 15:05
@ecraig12345
Copy link
Member

@TristanWatanabe This has merge conflicts now :(

@TristanWatanabe TristanWatanabe merged commit deef92e into microsoft:master Mar 31, 2022
@TristanWatanabe TristanWatanabe deleted the breadcrumb-convert-to-testing-library branch March 31, 2022 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants