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

chore: Bump cypress to v10 #23435

Merged
merged 11 commits into from
Jun 8, 2022
Merged

Conversation

ling1726
Copy link
Member

@ling1726 ling1726 commented Jun 7, 2022

Bumps cypress to latest major v10 which introduces code config (cypress.config.ts).

Overview of the breaking changes between v9 and v10

  • cypress.json is no longer supported - use cypress.config.ts
  • plugins are no longer configured through a separate entrypoint
  • cypress.config.ts files are extendable through import

Done for both v9 and northstar.

Bumps cypress to [latest major v10](https://docs.cypress.io/guides/references/changelog#10-0-0) which introduces code config (`cypress.config.ts`).

Done for both v9 and northstar.
@DustyTheBot
Copy link

DustyTheBot commented Jun 7, 2022

Warnings
⚠️ There are no updates provided to CHANGELOG. Ensure there are no publicly visible changes introduced by this PR.

Generated by 🚫 dangerJS against 33688ed

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jun 7, 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 33688ed:

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

@size-auditor
Copy link

size-auditor bot commented Jun 7, 2022

Asset size changes

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

Baseline commit: 34ea0e466150ceca873360ddb21e9fcb89c9dd56 (build)

@fabricteam
Copy link
Collaborator

fabricteam commented Jun 7, 2022

Perf Analysis (@fluentui/react-components)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 897 848 5000
Button mount 558 571 5000
FluentProvider mount 1866 1793 5000
FluentProviderWithTheme mount 266 274 10
FluentProviderWithTheme virtual-rerender 236 229 10
FluentProviderWithTheme virtual-rerender-with-unmount 332 295 10
MakeStyles mount 1532 1577 50000

@fabricteam
Copy link
Collaborator

fabricteam commented Jun 7, 2022

📊 Bundle size report

Unchanged fixtures
Package & Exports Size (minified/GZIP)
global-context
createContext
533 B
341 B
global-context
createContextSelector
554 B
348 B
priority-overflow
createOverflowManager
2.936 kB
1.212 kB
react-accordion
Accordion (including children components)
74.947 kB
22.722 kB
react-avatar
Avatar
45.538 kB
13.298 kB
react-badge
Badge
20.929 kB
6.554 kB
react-badge
CounterBadge
21.833 kB
6.861 kB
react-badge
PresenceBadge
22.23 kB
6.673 kB
react-button
Button
33.796 kB
9.151 kB
react-button
CompoundButton
40.703 kB
10.403 kB
react-button
MenuButton
35.968 kB
9.893 kB
react-button
SplitButton
43.209 kB
11.195 kB
react-button
ToggleButton
48.279 kB
10.573 kB
react-card
Card - All
63.222 kB
17.946 kB
react-card
Card
58.378 kB
16.819 kB
react-card
CardFooter
7.737 kB
3.264 kB
react-card
CardHeader
9.302 kB
3.779 kB
react-card
CardPreview
7.838 kB
3.316 kB
react-combobox
Combobox
61.494 kB
21.019 kB
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
184.781 kB
51.176 kB
react-components
react-components: FluentProvider & webLightTheme
33.988 kB
11.108 kB
react-divider
Divider
15.485 kB
5.534 kB
react-image
Image
9.956 kB
3.922 kB
react-input
Input
22.009 kB
7.194 kB
react-label
Label
8.514 kB
3.526 kB
react-link
Link
11.358 kB
4.58 kB
react-menu
Menu (including children components)
113.605 kB
34.444 kB
react-menu
Menu (including selectable components)
116.78 kB
34.908 kB
react-overflow
hooks only
10.839 kB
4.146 kB
react-popover
Popover
103.84 kB
31.603 kB
react-portal
Portal
9.267 kB
3.417 kB
react-positioning
usePositioning
23.846 kB
8.29 kB
react-provider
FluentProvider
14.037 kB
5.307 kB
react-radio
Radio
29.397 kB
10.049 kB
react-radio
RadioGroup
13.595 kB
5.42 kB
react-select
Select
18.673 kB
6.702 kB
react-slider
Slider
25.173 kB
8.12 kB
react-spinbutton
SpinButton
41.967 kB
11.816 kB
react-spinner
Spinner
18.159 kB
5.99 kB
react-switch
Switch
25.37 kB
8.208 kB
react-text
Text - Default
10.848 kB
4.239 kB
react-text
Text - Wrappers
14.158 kB
4.659 kB
react-textarea
Textarea
21.057 kB
7.079 kB
react-theme
Single theme token import
69 B
89 B
react-theme
Teams: all themes
31.363 kB
7.043 kB
react-theme
Teams: Light theme
19.806 kB
5.699 kB
react-tooltip
Tooltip
43.766 kB
15.075 kB
react-utilities
SSRProvider
189 B
161 B
🤖 This report was generated against 34ea0e466150ceca873360ddb21e9fcb89c9dd56

@fabricteam
Copy link
Collaborator

fabricteam commented Jun 7, 2022

Perf Analysis (@fluentui/react-northstar)

Perf tests with no regressions
Scenario Current PR Ticks Baseline Ticks Ratio
ImageMinimalPerf.default 351 280 1.25:1
TreeWith60ListItems.default 141 113 1.25:1
BoxMinimalPerf.default 308 250 1.23:1
SegmentMinimalPerf.default 303 258 1.17:1
ChatMinimalPerf.default 624 543 1.15:1
HeaderMinimalPerf.default 299 259 1.15:1
GridMinimalPerf.default 277 247 1.12:1
IconMinimalPerf.default 532 474 1.12:1
ChatDuplicateMessagesPerf.default 258 233 1.11:1
PortalMinimalPerf.default 160 145 1.1:1
TextMinimalPerf.default 308 279 1.1:1
ButtonOverridesMissPerf.default 1276 1177 1.08:1
ChatWithPopoverPerf.default 312 289 1.08:1
DividerMinimalPerf.default 270 250 1.08:1
LayoutMinimalPerf.default 295 272 1.08:1
TextAreaMinimalPerf.default 397 366 1.08:1
AttachmentMinimalPerf.default 125 117 1.07:1
ButtonMinimalPerf.default 146 138 1.06:1
FormMinimalPerf.default 341 322 1.06:1
PopupMinimalPerf.default 535 505 1.06:1
AttachmentSlotsPerf.default 934 886 1.05:1
DatepickerMinimalPerf.default 4961 4715 1.05:1
HeaderSlotsPerf.default 650 621 1.05:1
ListMinimalPerf.default 424 405 1.05:1
MenuMinimalPerf.default 730 696 1.05:1
TreeMinimalPerf.default 690 664 1.04:1
DropdownMinimalPerf.default 2677 2610 1.03:1
FlexMinimalPerf.default 241 233 1.03:1
ProviderMinimalPerf.default 324 314 1.03:1
RefMinimalPerf.default 196 191 1.03:1
SkeletonMinimalPerf.default 251 246 1.02:1
TableManyItemsPerf.default 1579 1553 1.02:1
TableMinimalPerf.default 327 320 1.02:1
ToolbarMinimalPerf.default 801 785 1.02:1
AnimationMinimalPerf.default 460 455 1.01:1
AvatarMinimalPerf.default 151 150 1.01:1
ButtonSlotsPerf.default 442 438 1.01:1
DialogMinimalPerf.default 640 636 1.01:1
ReactionMinimalPerf.default 268 266 1.01:1
MenuButtonMinimalPerf.default 1382 1384 1:1
StatusMinimalPerf.default 537 537 1:1
CustomToolbarPrototype.default 2293 2289 1:1
RadioGroupMinimalPerf.default 330 334 0.99:1
SliderMinimalPerf.default 1392 1401 0.99:1
ItemLayoutMinimalPerf.default 966 981 0.98:1
LabelMinimalPerf.default 309 316 0.98:1
ListNestedPerf.default 449 457 0.98:1
RosterPerf.default 844 863 0.98:1
ProviderMergeThemesPerf.default 1030 1046 0.98:1
EmbedMinimalPerf.default 3300 3394 0.97:1
LoaderMinimalPerf.default 565 585 0.97:1
SplitButtonMinimalPerf.default 3598 3707 0.97:1
VideoMinimalPerf.default 526 543 0.97:1
CheckboxMinimalPerf.default 2144 2222 0.96:1
InputMinimalPerf.default 1043 1084 0.96:1
AccordionMinimalPerf.default 108 114 0.95:1
AlertMinimalPerf.default 203 218 0.93:1
DropdownManyItemsPerf.default 528 566 0.93:1
TooltipMinimalPerf.default 859 935 0.92:1
ListCommonPerf.default 460 508 0.91:1
CardMinimalPerf.default 413 457 0.9:1
CarouselMinimalPerf.default 338 394 0.86:1
ListWith60ListItems.default 434 504 0.86:1

@fabricteam
Copy link
Collaborator

fabricteam commented Jun 7, 2022

Perf Analysis (@fluentui/react)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
BaseButton mount 772 790 5000
Breadcrumb mount 2356 2367 1000
Checkbox mount 1280 1278 5000
CheckboxBase mount 1084 1105 5000
ChoiceGroup mount 4055 4022 5000
ComboBox mount 844 843 1000
CommandBar mount 9154 9119 1000
ContextualMenu mount 10091 10186 1000
DefaultButton mount 974 984 5000
DetailsRow mount 3295 3353 5000
DetailsRowFast mount 3293 3384 5000
DetailsRowNoStyles mount 3156 3156 5000
Dialog mount 1947 1940 1000
DocumentCardTitle mount 161 147 1000
Dropdown mount 3077 2841 5000
FocusTrapZone mount 1625 1571 5000
FocusZone mount 1560 1582 5000
IconButton mount 1488 1506 5000
Label mount 292 299 5000
Layer mount 2522 2503 5000
Link mount 392 396 5000
MenuButton mount 1269 1258 5000
MessageBar mount 1854 1865 5000
Nav mount 2902 2844 1000
OverflowSet mount 928 959 5000
Panel mount 1900 1914 1000
Persona mount 865 885 1000
Pivot mount 1251 1272 1000
PrimaryButton mount 1120 1148 5000
Rating mount 6715 6649 5000
SearchBox mount 1103 1122 5000
Shimmer mount 2133 2146 5000
Slider mount 1650 1652 5000
SpinButton mount 4357 4384 5000
Spinner mount 377 367 5000
SplitButton mount 2743 2741 5000
Stack mount 457 448 5000
StackWithIntrinsicChildren mount 1969 1930 5000
StackWithTextChildren mount 4493 4496 5000
SwatchColorPicker mount 10037 10039 5000
TagPicker mount 2333 2402 5000
TeachingBubble mount 86968 86551 5000
Text mount 356 366 5000
TextField mount 1220 1233 5000
ThemeProvider mount 1031 1015 5000
ThemeProvider virtual-rerender 550 556 5000
ThemeProvider virtual-rerender-with-unmount 1640 1616 5000
Toggle mount 696 681 5000
buttonNative mount 115 106 5000

Comment on lines +20 to +21
"e2e": "yarn cypress run --component",
"e2e:local": "yarn cypress open --component",
Copy link
Member Author

Choose a reason for hiding this comment

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

now that configs are extendable, we can simply use the native binary

config.rootDir && `integrationFolder=${config.rootDir}`,
config.testNamePattern && `testFiles=${config.testNamePattern}`,
].filter(Boolean);
const configArguments = [`baseUrl=${config.serverUrl}`].filter(Boolean);
Copy link
Member Author

Choose a reason for hiding this comment

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

the removed arguments were never used and now also no longer supported by v10

@ling1726 ling1726 marked this pull request as ready for review June 7, 2022 13:27
@ling1726 ling1726 requested review from a team as code owners June 7, 2022 13:27
@@ -26,14 +26,14 @@
"check:change": "beachball check",
"check:modified-files": "yarn workspace @fluentui/scripts just check-for-modified-files",
"check:affected-package": "node ./scripts/monorepo/checkIfPackagesAffected.js",
"check:installed-dependencies-versions": "satisfied --skip-invalid --ignore \"prettier|angular|lit|sass|@storybook/web-components|@storybook/html|@storybook/mdx2-csf|svelte|@testing-library|vue|@cypress/react\"",
"check:installed-dependencies-versions": "satisfied --skip-invalid --ignore \"prettier|angular|lit|sass|@storybook/web-components|@storybook/html|@storybook/mdx2-csf|svelte|@testing-library|vue|@cypress/react|cypress\"",
Copy link
Member

Choose a reason for hiding this comment

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

It's a bit scary taking into account this dmtrKovalenko/cypress-real-events#259

Copy link
Member Author

Choose a reason for hiding this comment

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

The package itself is simple enough that if it is no longer maintained we can copy it, we want real CDP events for sure

Copy link
Member

@layershifter layershifter left a comment

Choose a reason for hiding this comment

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

Can you please check time on CI?

Locally I have for yarn workspace @fluentui/react-card e2e:

  • current master - Done in 21.13s.
  • this PR - Done in 34.54s.

@ling1726
Copy link
Member Author

ling1726 commented Jun 7, 2022

Can you please check time on CI?

Locally I have for yarn workspace @fluentui/react-card e2e:

  • current master - Done in 21.13s.
  • this PR - Done in 34.54s.

It might be for the M1 only 🤣(CI below)

image

@andrefcdias andrefcdias self-requested a review June 7, 2022 15:17
Copy link
Contributor

@andrefcdias andrefcdias left a comment

Choose a reason for hiding this comment

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

🎉

@andrefcdias
Copy link
Contributor

Can you please check time on CI?
Locally I have for yarn workspace @fluentui/react-card e2e:

  • current master - Done in 21.13s.
  • this PR - Done in 34.54s.

It might be for the M1 only 🤣(CI below)

image

image
Same here on WSL2 🤔

@@ -0,0 +1,6 @@
{
"extends": "../tsconfig.json",
Copy link
Member Author

@ling1726 ling1726 Jun 7, 2022

Choose a reason for hiding this comment

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

cypress uses chai as an assertion engine. Need a specific tsconfig for tests here. Fix courtesy of @Hotell

@ling1726
Copy link
Member Author

ling1726 commented Jun 8, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@ling1726 ling1726 merged commit 2da2d47 into microsoft:master Jun 8, 2022
ling1726 added a commit to ling1726/fluentui that referenced this pull request Jun 8, 2022
Following microsoft#23435, adds an extended cypress config to test the babel
preset for global context
ling1726 added a commit to ling1726/fluentui that referenced this pull request Jun 8, 2022
Following microsoft#23435, adds an extended cypress config in
babel-preset-global-context with tests.
marwan38 pushed a commit to marwan38/fluentui that referenced this pull request Jun 13, 2022
* chore: Bump cypress to v10

Bumps cypress to [latest major v10](https://docs.cypress.io/guides/references/changelog#10-0-0) which introduces code config (`cypress.config.ts`).

Done for both v9 and northstar.

* update CI command

* changefiles

* update package.json

* new e2e:local command

* remove cypress plugins

* update generator

* fix script types

* remove unnecessary deps

* fix changefiles

* fix gulp
ling1726 added a commit that referenced this pull request Jun 13, 2022
* chore: Add tests for babel-preset-global-context

Following #23435, adds an extended cypress config in
babel-preset-global-context with tests.

* add pre script to build

* scope babel-prest-global-context
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants