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

Remove enzyme test setup code from converged packages #22245

Merged
merged 2 commits into from
Apr 7, 2022

Conversation

ecraig12345
Copy link
Member

@ecraig12345 ecraig12345 commented Mar 29, 2022

Current Behavior

After #22009, react-conformance no longer uses enzyme, which means converged packages no longer use enzyme at all. But they still have setup for it in their test setup files.

New Behavior

Remove Enzyme test setup from converged packages.

Through a build failure, I discovered that @fluentui/a11y-testing still uses Enzyme, so @fluentui/react-button and @fluentui/react-link must keep their Enzyme setup for now.

This is tracked by an item in #21663 or I can make a separate issue.

Also add **/config/tests.js to the list of files ignored by beachball, since those will never affect the published packages (that path should have already been ignored but it was an unintentional omission).

Related Issue(s)

Fixes #22118

@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 29, 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 f22b93d:

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

@fabricteam
Copy link
Collaborator

fabricteam commented Mar 29, 2022

📊 Bundle size report

Unchanged fixtures
Package & Exports Size (minified/GZIP)
priority-overflow
createOverflowManager
2.836 kB
1.209 kB
react-accordion
Accordion (including children components)
74.792 kB
22.516 kB
react-avatar
Avatar
45.142 kB
13.111 kB
react-badge
Badge
20.895 kB
6.567 kB
react-badge
CounterBadge
21.848 kB
6.883 kB
react-badge
PresenceBadge
21.951 kB
6.565 kB
react-button
Button
28.013 kB
8.059 kB
react-button
CompoundButton
33.508 kB
9.092 kB
react-button
MenuButton
29.796 kB
8.665 kB
react-button
SplitButton
36.268 kB
9.863 kB
react-button
ToggleButton
37.395 kB
8.68 kB
react-card
Card - All
53.619 kB
15.372 kB
react-card
Card
48.904 kB
14.089 kB
react-card
CardFooter
7.686 kB
3.264 kB
react-card
CardHeader
9.251 kB
3.78 kB
react-card
CardPreview
7.658 kB
3.291 kB
react-combobox
Combobox
54.566 kB
18.884 kB
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
176.089 kB
49.113 kB
react-components
react-components: FluentProvider & webLightTheme
32.601 kB
10.668 kB
react-divider
Divider
15.385 kB
5.539 kB
react-image
Image
10.109 kB
3.958 kB
react-input
Input
21.661 kB
7.18 kB
react-label
Label
8.371 kB
3.504 kB
react-link
Link
11.106 kB
4.507 kB
react-menu
Menu (including children components)
105.852 kB
32.433 kB
react-menu
Menu (including selectable components)
109.031 kB
32.897 kB
react-popover
Popover
96.787 kB
29.559 kB
react-portal
Portal
6.272 kB
2.17 kB
react-positioning
usePopper
23.21 kB
8.084 kB
react-priority-overflow
hooks only
10.606 kB
4.087 kB
react-provider
FluentProvider
14.009 kB
5.25 kB
react-select
Select
16.562 kB
6.264 kB
react-slider
Slider
25.549 kB
8.25 kB
react-spinner
Spinner
16.459 kB
5.549 kB
react-switch
Switch
24.279 kB
8.001 kB
react-text
Text - Default
10.797 kB
4.233 kB
react-text
Text - Wrappers
14.113 kB
4.576 kB
react-textarea
Textarea
20.602 kB
7.033 kB
react-theme
Single theme token import
69 B
89 B
react-theme
Teams: all themes
29.676 kB
6.604 kB
react-theme
Teams: Light theme
18.492 kB
5.296 kB
react-tooltip
Tooltip
42.837 kB
14.727 kB
react-utilities
SSRProvider
189 B
161 B
🤖 This report was generated against 6fd7a550bb24d80f63c35e2da2d53cb33fd4ac32

@fabricteam
Copy link
Collaborator

fabricteam commented Mar 29, 2022

Perf Analysis (@fluentui/react-components)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 1051 1073 5000
Button mount 652 659 5000
FluentProvider mount 2086 2124 5000
FluentProviderWithTheme mount 313 312 10
FluentProviderWithTheme virtual-rerender 260 265 10
FluentProviderWithTheme virtual-rerender-with-unmount 343 355 10
MakeStyles mount 1836 1865 50000

@size-auditor
Copy link

size-auditor bot commented Mar 29, 2022

Asset size changes

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

Baseline commit: 6fd7a550bb24d80f63c35e2da2d53cb33fd4ac32 (build)

@fabricteam
Copy link
Collaborator

fabricteam commented Mar 29, 2022

Perf Analysis (@fluentui/react-northstar)

Perf tests with no regressions
Scenario Current PR Ticks Baseline Ticks Ratio
AttachmentMinimalPerf.default 163 139 1.17:1
AvatarMinimalPerf.default 205 187 1.1:1
LayoutMinimalPerf.default 354 328 1.08:1
RefMinimalPerf.default 251 233 1.08:1
ButtonMinimalPerf.default 173 161 1.07:1
CardMinimalPerf.default 570 534 1.07:1
GridMinimalPerf.default 351 327 1.07:1
ReactionMinimalPerf.default 387 361 1.07:1
TextMinimalPerf.default 367 346 1.06:1
InputMinimalPerf.default 1320 1259 1.05:1
VideoMinimalPerf.default 696 662 1.05:1
AlertMinimalPerf.default 262 251 1.04:1
RosterPerf.default 1157 1116 1.04:1
PortalMinimalPerf.default 188 180 1.04:1
BoxMinimalPerf.default 344 335 1.03:1
ChatWithPopoverPerf.default 368 356 1.03:1
FlexMinimalPerf.default 283 275 1.03:1
SliderMinimalPerf.default 1718 1665 1.03:1
AnimationMinimalPerf.default 564 555 1.02:1
DividerMinimalPerf.default 347 340 1.02:1
DropdownManyItemsPerf.default 674 660 1.02:1
DropdownMinimalPerf.default 3078 3031 1.02:1
EmbedMinimalPerf.default 4176 4105 1.02:1
FormMinimalPerf.default 406 398 1.02:1
ItemLayoutMinimalPerf.default 1183 1163 1.02:1
LabelMinimalPerf.default 387 379 1.02:1
MenuMinimalPerf.default 862 845 1.02:1
SkeletonMinimalPerf.default 339 333 1.02:1
TreeWith60ListItems.default 193 189 1.02:1
ButtonOverridesMissPerf.default 1514 1496 1.01:1
ButtonSlotsPerf.default 538 532 1.01:1
DialogMinimalPerf.default 756 749 1.01:1
ProviderMergeThemesPerf.default 1275 1267 1.01:1
StatusMinimalPerf.default 677 669 1.01:1
TableMinimalPerf.default 392 389 1.01:1
CustomToolbarPrototype.default 2749 2730 1.01:1
ToolbarMinimalPerf.default 960 955 1.01:1
TooltipMinimalPerf.default 1093 1077 1.01:1
TreeMinimalPerf.default 865 856 1.01:1
AttachmentSlotsPerf.default 1109 1106 1:1
ListNestedPerf.default 557 556 1:1
MenuButtonMinimalPerf.default 1710 1708 1:1
PopupMinimalPerf.default 631 634 1:1
RadioGroupMinimalPerf.default 453 453 1:1
SplitButtonMinimalPerf.default 4377 4360 1:1
ChatMinimalPerf.default 729 737 0.99:1
DatepickerMinimalPerf.default 5691 5759 0.99:1
HeaderSlotsPerf.default 758 764 0.99:1
ListCommonPerf.default 645 652 0.99:1
LoaderMinimalPerf.default 667 676 0.99:1
TableManyItemsPerf.default 1940 1959 0.99:1
TextAreaMinimalPerf.default 492 497 0.99:1
CheckboxMinimalPerf.default 2689 2739 0.98:1
ListWith60ListItems.default 636 646 0.98:1
CarouselMinimalPerf.default 476 490 0.97:1
HeaderMinimalPerf.default 343 355 0.97:1
ProviderMinimalPerf.default 396 407 0.97:1
IconMinimalPerf.default 589 608 0.97:1
AccordionMinimalPerf.default 138 144 0.96:1
ImageMinimalPerf.default 357 371 0.96:1
ListMinimalPerf.default 496 516 0.96:1
SegmentMinimalPerf.default 334 351 0.95:1
ChatDuplicateMessagesPerf.default 269 294 0.91:1

@fabricteam
Copy link
Collaborator

fabricteam commented Mar 30, 2022

Perf Analysis (@fluentui/react)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
BaseButton mount 931 972 5000
Breadcrumb mount 2848 2755 1000
Checkbox mount 1554 1514 5000
CheckboxBase mount 1347 1391 5000
ChoiceGroup mount 4956 4967 5000
ComboBox mount 1000 1032 1000
CommandBar mount 11244 11292 1000
ContextualMenu mount 11730 13085 1000
DefaultButton mount 1216 1176 5000
DetailsRow mount 3932 4019 5000
DetailsRowFast mount 3954 3956 5000
DetailsRowNoStyles mount 3812 3791 5000
Dialog mount 2312 2343 1000
DocumentCardTitle mount 171 171 1000
Dropdown mount 3553 3419 5000
FocusTrapZone mount 1950 1945 5000
FocusZone mount 1883 1922 5000
IconButton mount 1798 1867 5000
Label mount 363 382 5000
Layer mount 3054 3025 5000
Link mount 512 505 5000
MenuButton mount 1565 1578 5000
MessageBar mount 2345 2296 5000
Nav mount 3556 3530 1000
OverflowSet mount 1120 1207 5000
Panel mount 2322 2183 1000
Persona mount 1044 1020 1000
Pivot mount 1576 1518 1000
PrimaryButton mount 1359 1382 5000
Rating mount 8258 8214 5000
SearchBox mount 1345 1418 5000
Shimmer mount 2606 2605 5000
Slider mount 1980 1995 5000
SpinButton mount 5230 5193 5000
Spinner mount 449 436 5000
SplitButton mount 3302 3384 5000
Stack mount 553 541 5000
StackWithIntrinsicChildren mount 2587 2385 5000
StackWithTextChildren mount 5448 5481 5000
SwatchColorPicker mount 12065 12042 5000
TagPicker mount 2836 2831 5000
TeachingBubble mount 100279 93564 5000
Text mount 472 440 5000
TextField mount 1434 1523 5000
ThemeProvider mount 1193 1229 5000
ThemeProvider virtual-rerender 694 686 5000
ThemeProvider virtual-rerender-with-unmount 1950 1979 5000
Toggle mount 815 827 5000
buttonNative mount 123 150 5000

@ecraig12345 ecraig12345 force-pushed the remove-enzyme-setup branch 2 times, most recently from d81e3e7 to 308879b Compare March 30, 2022 07:27
Hotell
Hotell previously requested changes Mar 30, 2022
Copy link
Contributor

@Hotell Hotell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great stuff, some changes needed for migration generator.

@Hotell Hotell removed their assignment Mar 31, 2022
@ecraig12345 ecraig12345 force-pushed the remove-enzyme-setup branch from 32437b9 to 7d230d4 Compare March 31, 2022 17:31
@ecraig12345 ecraig12345 force-pushed the remove-enzyme-setup branch from 7d230d4 to dba9034 Compare April 5, 2022 00:10
@ecraig12345
Copy link
Member Author

@Hotell Can you please take another look?

@ecraig12345 ecraig12345 force-pushed the remove-enzyme-setup branch 2 times, most recently from bb04e30 to 4cf0963 Compare April 5, 2022 01:25
Copy link
Contributor

@Hotell Hotell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There needs to be some changes made for testing generator but I understand the time pressure so won't block further. can be addressed in separate PR.

thanks!

@Hotell Hotell dismissed their stale review April 6, 2022 08:24

time pressure - not critical changes needed

@ecraig12345 ecraig12345 force-pushed the remove-enzyme-setup branch from 4cf0963 to f22b93d Compare April 7, 2022 02:00
@ecraig12345 ecraig12345 merged commit 841c5d4 into microsoft:master Apr 7, 2022
@ecraig12345 ecraig12345 deleted the remove-enzyme-setup branch April 8, 2022 22:09
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.

Remove enzyme setup from converged packages
7 participants