test: add conformance test for static classes#20383
Conversation
📊 Bundle size report
Unchanged fixtures
|
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 0204aabaa1e20f1c2fca4b6ff9bedd48ea577961 (build) |
|
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 ae04dee:
|
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| FluentProviderWithTheme | virtual-rerender | 126 | 124 | 10 | Possible regression |
All results
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| Avatar | mount | 1229 | 1113 | 5000 | |
| BaseButton | mount | 1162 | 1139 | 5000 | |
| Breadcrumb | mount | 3065 | 3154 | 1000 | |
| ButtonNext | mount | 644 | 600 | 5000 | |
| Checkbox | mount | 1853 | 1975 | 5000 | |
| CheckboxBase | mount | 1607 | 1592 | 5000 | |
| ChoiceGroup | mount | 5867 | 5956 | 5000 | |
| ComboBox | mount | 1368 | 1225 | 1000 | |
| CommandBar | mount | 12593 | 12644 | 1000 | |
| ContextualMenu | mount | 7994 | 7746 | 1000 | |
| DefaultButton | mount | 1514 | 1504 | 5000 | |
| DetailsRow | mount | 4703 | 4747 | 5000 | |
| DetailsRowFast | mount | 4675 | 4374 | 5000 | |
| DetailsRowNoStyles | mount | 4347 | 4528 | 5000 | |
| Dialog | mount | 3238 | 3111 | 1000 | |
| DocumentCardTitle | mount | 259 | 200 | 1000 | |
| Dropdown | mount | 3999 | 4072 | 5000 | |
| FluentProviderNext | mount | 4281 | 4295 | 5000 | |
| FluentProviderWithTheme | mount | 259 | 251 | 10 | |
| FluentProviderWithTheme | virtual-rerender | 126 | 124 | 10 | Possible regression |
| FluentProviderWithTheme | virtual-rerender-with-unmount | 339 | 306 | 10 | |
| FocusTrapZone | mount | 2259 | 2188 | 5000 | |
| FocusZone | mount | 2216 | 2179 | 5000 | |
| IconButton | mount | 2192 | 2207 | 5000 | |
| Label | mount | 434 | 413 | 5000 | |
| Layer | mount | 3683 | 3702 | 5000 | |
| Link | mount | 647 | 682 | 5000 | |
| MakeStyles | mount | 2094 | 2252 | 50000 | |
| MenuButton | mount | 1824 | 1879 | 5000 | |
| MessageBar | mount | 2313 | 2317 | 5000 | |
| Nav | mount | 4343 | 4133 | 1000 | |
| OverflowSet | mount | 1389 | 1379 | 5000 | |
| Panel | mount | 2828 | 3039 | 1000 | |
| Persona | mount | 996 | 1136 | 1000 | |
| Pivot | mount | 1758 | 1776 | 1000 | |
| PrimaryButton | mount | 1792 | 1588 | 5000 | |
| Rating | mount | 9665 | 9992 | 5000 | |
| SearchBox | mount | 1671 | 1651 | 5000 | |
| Shimmer | mount | 3247 | 3174 | 5000 | |
| Slider | mount | 2352 | 2500 | 5000 | |
| SpinButton | mount | 6382 | 6235 | 5000 | |
| Spinner | mount | 524 | 500 | 5000 | |
| SplitButton | mount | 3985 | 4012 | 5000 | |
| Stack | mount | 666 | 614 | 5000 | |
| StackWithIntrinsicChildren | mount | 2268 | 2108 | 5000 | |
| StackWithTextChildren | mount | 5947 | 6078 | 5000 | |
| SwatchColorPicker | mount | 13243 | 13055 | 5000 | |
| TagPicker | mount | 3309 | 3203 | 5000 | |
| TeachingBubble | mount | 15752 | 15799 | 5000 | |
| Text | mount | 554 | 516 | 5000 | |
| TextField | mount | 1715 | 1855 | 5000 | |
| ThemeProvider | mount | 1506 | 1422 | 5000 | |
| ThemeProvider | virtual-rerender | 726 | 724 | 5000 | |
| ThemeProvider | virtual-rerender-with-unmount | 2284 | 2341 | 5000 | |
| Toggle | mount | 1066 | 1001 | 5000 | |
| buttonNative | mount | 170 | 179 | 5000 |
Perf Analysis (@fluentui/react-northstar)
Perf tests with no regressions
| Scenario | Current PR Ticks | Baseline Ticks | Ratio |
|---|---|---|---|
| CardMinimalPerf.default | 790 | 667 | 1.18:1 |
| CarouselMinimalPerf.default | 643 | 544 | 1.18:1 |
| AttachmentMinimalPerf.default | 225 | 192 | 1.17:1 |
| ChatWithPopoverPerf.default | 514 | 443 | 1.16:1 |
| BoxMinimalPerf.default | 486 | 423 | 1.15:1 |
| ChatDuplicateMessagesPerf.default | 387 | 350 | 1.11:1 |
| ProviderMinimalPerf.default | 1540 | 1389 | 1.11:1 |
| ButtonMinimalPerf.default | 239 | 220 | 1.09:1 |
| ListWith60ListItems.default | 826 | 757 | 1.09:1 |
| TableManyItemsPerf.default | 2496 | 2330 | 1.07:1 |
| AttachmentSlotsPerf.default | 1375 | 1296 | 1.06:1 |
| StatusMinimalPerf.default | 900 | 847 | 1.06:1 |
| CustomToolbarPrototype.default | 5221 | 4922 | 1.06:1 |
| DividerMinimalPerf.default | 461 | 441 | 1.05:1 |
| EmbedMinimalPerf.default | 5437 | 5188 | 1.05:1 |
| InputMinimalPerf.default | 1608 | 1535 | 1.05:1 |
| SliderMinimalPerf.default | 2084 | 1979 | 1.05:1 |
| AvatarMinimalPerf.default | 249 | 240 | 1.04:1 |
| ButtonSlotsPerf.default | 785 | 761 | 1.03:1 |
| ChatMinimalPerf.default | 819 | 795 | 1.03:1 |
| SplitButtonMinimalPerf.default | 5321 | 5158 | 1.03:1 |
| TextMinimalPerf.default | 444 | 431 | 1.03:1 |
| TreeWith60ListItems.default | 232 | 225 | 1.03:1 |
| HeaderSlotsPerf.default | 999 | 982 | 1.02:1 |
| LayoutMinimalPerf.default | 447 | 440 | 1.02:1 |
| AccordionMinimalPerf.default | 195 | 193 | 1.01:1 |
| CheckboxMinimalPerf.default | 3372 | 3343 | 1.01:1 |
| DialogMinimalPerf.default | 968 | 954 | 1.01:1 |
| FlexMinimalPerf.default | 331 | 329 | 1.01:1 |
| VideoMinimalPerf.default | 815 | 808 | 1.01:1 |
| AnimationMinimalPerf.default | 516 | 518 | 1:1 |
| GridMinimalPerf.default | 427 | 425 | 1:1 |
| ListCommonPerf.default | 816 | 815 | 1:1 |
| PopupMinimalPerf.default | 710 | 710 | 1:1 |
| IconMinimalPerf.default | 790 | 787 | 1:1 |
| RosterPerf.default | 1434 | 1448 | 0.99:1 |
| TooltipMinimalPerf.default | 1251 | 1269 | 0.99:1 |
| DatepickerMinimalPerf.default | 6890 | 7027 | 0.98:1 |
| DropdownMinimalPerf.default | 3877 | 3951 | 0.98:1 |
| ListMinimalPerf.default | 634 | 647 | 0.98:1 |
| LoaderMinimalPerf.default | 859 | 880 | 0.98:1 |
| RadioGroupMinimalPerf.default | 542 | 554 | 0.98:1 |
| ButtonOverridesMissPerf.default | 2126 | 2203 | 0.97:1 |
| HeaderMinimalPerf.default | 505 | 520 | 0.97:1 |
| ProviderMergeThemesPerf.default | 1980 | 2034 | 0.97:1 |
| ReactionMinimalPerf.default | 490 | 509 | 0.96:1 |
| RefMinimalPerf.default | 289 | 301 | 0.96:1 |
| TreeMinimalPerf.default | 952 | 994 | 0.96:1 |
| FormMinimalPerf.default | 492 | 520 | 0.95:1 |
| ImageMinimalPerf.default | 498 | 523 | 0.95:1 |
| SkeletonMinimalPerf.default | 424 | 444 | 0.95:1 |
| MenuButtonMinimalPerf.default | 2007 | 2130 | 0.94:1 |
| ToolbarMinimalPerf.default | 1186 | 1258 | 0.94:1 |
| AlertMinimalPerf.default | 339 | 364 | 0.93:1 |
| ListNestedPerf.default | 712 | 769 | 0.93:1 |
| TableMinimalPerf.default | 483 | 524 | 0.92:1 |
| DropdownManyItemsPerf.default | 836 | 914 | 0.91:1 |
| ItemLayoutMinimalPerf.default | 1566 | 1714 | 0.91:1 |
| LabelMinimalPerf.default | 495 | 541 | 0.91:1 |
| SegmentMinimalPerf.default | 426 | 477 | 0.89:1 |
| PortalMinimalPerf.default | 212 | 244 | 0.87:1 |
| MenuMinimalPerf.default | 1018 | 1183 | 0.86:1 |
| TextAreaMinimalPerf.default | 617 | 723 | 0.85:1 |
49f8212 to
0189c7a
Compare
7f91451 to
a6117da
Compare
a6117da to
c34b97d
Compare
c34b97d to
689cf14
Compare
ecraig12345
left a comment
There was a problem hiding this comment.
Minor suggestions but generally looks good.
| const { componentPath, displayName } = testInfo; | ||
| const { testErrorInfo, resolveInfo, testErrorPath } = errorMessageColors; | ||
|
|
||
| const rootPath = componentPath.replace(/[\\/]src[\\/].*/, ''); |
There was a problem hiding this comment.
If this is an absolute path, you'll need to ensure you're replacing the last instance of src (we've had issues in the past where people put all their git repos in an src folder)
There was a problem hiding this comment.
I copied this from exported-top-level, is there anything wrong with it?
There was a problem hiding this comment.
@ecraig12345 I will address a problem if it exists in a follow up PR 👍
There was a problem hiding this comment.
It looks like there's a fix for this in defaultTests.tsx but not defaultErrorMessages.tsx
There was a problem hiding this comment.
So actually the exported-top-level error message would be wrong as well, but that would only be noticed if someone using src for their repos was developing a new component and the test failed. (I think Levi was one of the people using this naming convention.)
Co-authored-by: ling1726 <[email protected]>
Co-authored-by: ling1726 <[email protected]>
Co-authored-by: ling1726 <[email protected]>
Co-authored-by: Elizabeth Craig <[email protected]>
Co-authored-by: Elizabeth Craig <[email protected]>
* add conformance test * fix API file * Update packages/react-conformance/src/defaultErrorMessages.tsx Co-authored-by: ling1726 <[email protected]> * Update packages/react-conformance/src/defaultErrorMessages.tsx Co-authored-by: ling1726 <[email protected]> * Update packages/react-conformance/src/defaultErrorMessages.tsx Co-authored-by: ling1726 <[email protected]> * Update packages/react-conformance/src/defaultErrorMessages.tsx Co-authored-by: Elizabeth Craig <[email protected]> * Update packages/react-conformance/src/defaultErrorMessages.tsx Co-authored-by: Elizabeth Craig <[email protected]> * fix fmt * rename assertion Co-authored-by: ling1726 <[email protected]> Co-authored-by: Elizabeth Craig <[email protected]>
Pull request checklist
$ yarn changeDescription of changes
This PR adds a new conformance test and asserts for:
className, for examplefui-ComponentNamecomponentNameClassNameI left changes for
Inputcomponent in this PR to be an example. For all other components it was already applied in separate PRs.