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(cypress): upgrade cypress to v8 and turn on tests #2063

Closed
wants to merge 9 commits into from

Conversation

andioneto
Copy link
Contributor

@andioneto andioneto commented Nov 19, 2021

Description

This PR turns on the newest addition to our End to End (E2E) tests and introduces some optimizations to the Github Actions job (GHAJ) that runs them.

Summary of changes

  • Updated cypress and pinned to version 8.4.0 (^8.6.0 has known minor issues)
  • Added a strategy configuration for the Cypress GHAJ that allows our tests to run on 3 machines and to not fail fast if a single test case or suite fails (which causes the dashboard to hang),
  • Added command abortPrefetchRequests to prevent prefetches on page load that slow down our tests
  • Added this command invocation to (most) of the existing page spec files
  • Updated the Sidebar Navigation test to resolve some flakiness (see notes in diff)
  • Introduced looser matching for custom command headerShouldBeVisible to decrease the tests' coupling to the formatted content
  • Added config option for scroll behavior in the change revealer test
  • Added ensureScrollable config option to getInFixedContainer to cause tests to error out if the container it is called on is not in fact scrollable.

Contributing to Twilio

All third-party contributors acknowledge that any contributions they provide will be made under the same open-source license that the open-source project is provided under.

  • I acknowledge that all my contributions will be made under the project's license.

@changeset-bot
Copy link

changeset-bot bot commented Nov 19, 2021

⚠️ No Changeset found

Latest commit: 9f68dce

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@andioneto andioneto marked this pull request as ready for review November 19, 2021 17:57
@andioneto andioneto requested a review from a team as a code owner November 19, 2021 17:57
@andioneto andioneto requested a review from SiTaggart November 19, 2021 17:57
@github-actions github-actions bot added Area: Infrastructure Related to our infrastructure and build tools Area: Repo Type: Tests Adds tests to the code labels Nov 19, 2021
@netlify
Copy link

netlify bot commented Nov 19, 2021

✔️ Deploy Preview for paste-docs ready!

🔨 Explore the source changes: 9f68dce

🔍 Inspect the deploy log: https://app.netlify.com/sites/paste-docs/deploys/619d34f5a9972500089c5850

😎 Browse the preview: https://deploy-preview-2063--paste-docs.netlify.app

@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 19, 2021

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 9f68dce:

Sandbox Source
@twilio-paste/nextjs-template Configuration

@andioneto andioneto requested a review from a team as a code owner November 19, 2021 19:22
@github-actions github-actions bot added the Area: Doc Site Related to the documentation website label Nov 19, 2021
@cypress
Copy link

cypress bot commented Nov 19, 2021



Test summary

71 1 0 0Flakiness 1


Run details

Project Paste
Status Failed
Commit 6a32c1b ℹ️
Started Nov 23, 2021 7:03 PM
Ended Nov 23, 2021 7:09 PM
Duration 06:31 💡
OS Linux Ubuntu - 20.04
Browser Electron 91

View run in Cypress Dashboard ➡️


Failures

cypress/integration/e2e/components/tabs.spec.ts Failed
1 Tabs component documentation page > should render the tabs component page correctly

Flakiness

cypress/integration/sidebar-navigation/index.spec.ts Flakiness
1 Sidebar navigation > opens the sidebar disclosures

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@netlify
Copy link

netlify bot commented Nov 19, 2021

✔️ Deploy Preview for paste-theme-designer ready!

🔨 Explore the source changes: 9f68dce

🔍 Inspect the deploy log: https://app.netlify.com/sites/paste-theme-designer/deploys/619d34f5c0909a00077b8af2

😎 Browse the preview: https://deploy-preview-2063--paste-theme-designer.netlify.app

@github-actions
Copy link
Contributor

github-actions bot commented Nov 19, 2021

Size Change: 0 B

Total Size: 461 kB

ℹ️ View Unchanged
Filename Size
./packages/paste-icons/cjs/AgentIcon.js 1.33 kB
./packages/paste-icons/cjs/ArrowBackIcon.js 1.08 kB
./packages/paste-icons/cjs/ArrowDownIcon.js 1.08 kB
./packages/paste-icons/cjs/ArrowForwardIcon.js 1.08 kB
./packages/paste-icons/cjs/ArrowUpIcon.js 1.1 kB
./packages/paste-icons/cjs/AttachIcon.js 1.23 kB
./packages/paste-icons/cjs/AttachmentIcon.js 1.14 kB
./packages/paste-icons/cjs/BoldIcon.js 1.29 kB
./packages/paste-icons/cjs/BuiltInIcon.js 1.12 kB
./packages/paste-icons/cjs/CalendarIcon.js 1.17 kB
./packages/paste-icons/cjs/ChatIcon.js 1.2 kB
./packages/paste-icons/cjs/CheckboxCheckIcon.js 992 B
./packages/paste-icons/cjs/CheckboxLineIcon.js 941 B
./packages/paste-icons/cjs/CheckmarkCircleIcon.js 1.07 kB
./packages/paste-icons/cjs/ChevronDisclosureCollapsedIcon.js 1.01 kB
./packages/paste-icons/cjs/ChevronDisclosureExpandedIcon.js 1.01 kB
./packages/paste-icons/cjs/ChevronDisclosureIcon.js 1 kB
./packages/paste-icons/cjs/ChevronDoubleLeftIcon.js 1.03 kB
./packages/paste-icons/cjs/ChevronDoubleRightIcon.js 1.05 kB
./packages/paste-icons/cjs/ChevronDownIcon.js 975 B
./packages/paste-icons/cjs/ChevronExpandIcon.js 1.02 kB
./packages/paste-icons/cjs/ChevronLeftIcon.js 973 B
./packages/paste-icons/cjs/ChevronRightIcon.js 975 B
./packages/paste-icons/cjs/ChevronUpIcon.js 972 B
./packages/paste-icons/cjs/CloseIcon.js 977 B
./packages/paste-icons/cjs/ColorPickerIcon.js 1.21 kB
./packages/paste-icons/cjs/ConnectivityAvailableIcon.js 901 B
./packages/paste-icons/cjs/ConnectivityBusyIcon.js 899 B
./packages/paste-icons/cjs/ConnectivityOfflineIcon.js 948 B
./packages/paste-icons/cjs/ConnectivityUnavailableIcon.js 904 B
./packages/paste-icons/cjs/CopyIcon.js 1.19 kB
./packages/paste-icons/cjs/CreditCardIcon.js 1.01 kB
./packages/paste-icons/cjs/CustomIcon.js 1.27 kB
./packages/paste-icons/cjs/DarkModeIcon.js 1.04 kB
./packages/paste-icons/cjs/DataBarChartIcon.js 1.03 kB
./packages/paste-icons/cjs/DataLineChartIcon.js 1.04 kB
./packages/paste-icons/cjs/DataPieChartIcon.js 1.03 kB
./packages/paste-icons/cjs/DataTableIcon.js 1.03 kB
./packages/paste-icons/cjs/DeleteIcon.js 1.16 kB
./packages/paste-icons/cjs/DownloadIcon.js 1.02 kB
./packages/paste-icons/cjs/EditIcon.js 1.16 kB
./packages/paste-icons/cjs/ElasticSIPTrunkingCapableIcon.js 1.46 kB
./packages/paste-icons/cjs/ErrorIcon.js 1.06 kB
./packages/paste-icons/cjs/ExpandIcon.js 1.14 kB
./packages/paste-icons/cjs/ExportIcon.js 1.02 kB
./packages/paste-icons/cjs/FaxCapableIcon.js 1.32 kB
./packages/paste-icons/cjs/FileIcon.js 1.02 kB
./packages/paste-icons/cjs/FilterIcon.js 929 B
./packages/paste-icons/cjs/helpers/IconWrapper.js 703 B
./packages/paste-icons/cjs/HideIcon.js 1.39 kB
./packages/paste-icons/cjs/HistoryIcon.js 1.08 kB
./packages/paste-icons/cjs/InformationIcon.js 974 B
./packages/paste-icons/cjs/ItalicIcon.js 1.02 kB
./packages/paste-icons/cjs/LightModeIcon.js 1.16 kB
./packages/paste-icons/cjs/LinkExternalIcon.js 1.08 kB
./packages/paste-icons/cjs/LinkIcon.js 1.22 kB
./packages/paste-icons/cjs/LoadingIcon.js 1.29 kB
./packages/paste-icons/cjs/LogoTwilioIcon.js 1.03 kB
./packages/paste-icons/cjs/LowerHandIcon.js 1.51 kB
./packages/paste-icons/cjs/MicrophoneOffIcon.js 1.3 kB
./packages/paste-icons/cjs/MicrophoneOnIcon.js 1.12 kB
./packages/paste-icons/cjs/MinusIcon.js 979 B
./packages/paste-icons/cjs/MMSCapableIcon.js 1.26 kB
./packages/paste-icons/cjs/MoreIcon.js 942 B
./packages/paste-icons/cjs/NeutralIcon.js 1.2 kB
./packages/paste-icons/cjs/NewIcon.js 1.28 kB
./packages/paste-icons/cjs/OrderedListIcon.js 1.24 kB
./packages/paste-icons/cjs/PauseIcon.js 1.01 kB
./packages/paste-icons/cjs/PinIcon.js 1.21 kB
./packages/paste-icons/cjs/PlayIcon.js 1.03 kB
./packages/paste-icons/cjs/PlusIcon.js 948 B
./packages/paste-icons/cjs/ProcessDisabledIcon.js 979 B
./packages/paste-icons/cjs/ProcessDraftIcon.js 1.25 kB
./packages/paste-icons/cjs/ProcessErrorIcon.js 968 B
./packages/paste-icons/cjs/ProcessInProgressIcon.js 990 B
./packages/paste-icons/cjs/ProcessNeutralIcon.js 982 B
./packages/paste-icons/cjs/ProcessSuccessIcon.js 898 B
./packages/paste-icons/cjs/ProcessWarningIcon.js 1.01 kB
./packages/paste-icons/cjs/ProductAddOnsIcon.js 1.38 kB
./packages/paste-icons/cjs/ProductAdminAccessControlIcon.js 1.6 kB
./packages/paste-icons/cjs/ProductAdminAccountsIcon.js 1.11 kB
./packages/paste-icons/cjs/ProductAdminDomainsIcon.js 1.85 kB
./packages/paste-icons/cjs/ProductAdminResoldCustomersIcon.js 1.41 kB
./packages/paste-icons/cjs/ProductAdminSSOIcon.js 1.59 kB
./packages/paste-icons/cjs/ProductAdminUsersIcon.js 1.49 kB
./packages/paste-icons/cjs/ProductAlarmsIcon.js 1.3 kB
./packages/paste-icons/cjs/ProductAPIExplorerIcon.js 1.27 kB
./packages/paste-icons/cjs/ProductAssetsIcon.js 1.07 kB
./packages/paste-icons/cjs/ProductAuthyIcon.js 1.22 kB
./packages/paste-icons/cjs/ProductAutopilotIcon.js 1.43 kB
./packages/paste-icons/cjs/ProductBillingIcon.js 1.32 kB
./packages/paste-icons/cjs/ProductChannelsIcon.js 1.05 kB
./packages/paste-icons/cjs/ProductChatIcon.js 1.16 kB
./packages/paste-icons/cjs/ProductCLIIcon.js 1.1 kB
./packages/paste-icons/cjs/ProductCodeExchangeCommunityIcon.js 1.75 kB
./packages/paste-icons/cjs/ProductCodeExchangePartnerIcon.js 1.66 kB
./packages/paste-icons/cjs/ProductConnectedDevicesIcon.js 1.53 kB
./packages/paste-icons/cjs/ProductConversationsIcon.js 1.23 kB
./packages/paste-icons/cjs/ProductDebuggerIcon.js 1.45 kB
./packages/paste-icons/cjs/ProductElasticSIPTrunkingIcon.js 1.46 kB
./packages/paste-icons/cjs/ProductEmailAPIIcon.js 1.09 kB
./packages/paste-icons/cjs/ProductEngagementIntelligencePlatformIcon.js 1.26 kB
./packages/paste-icons/cjs/ProductEventStreamsIcon.js 1.32 kB
./packages/paste-icons/cjs/ProductFaxIcon.js 1.34 kB
./packages/paste-icons/cjs/ProductFlexIcon.js 1.09 kB
./packages/paste-icons/cjs/ProductFrontlineIcon.js 1.09 kB
./packages/paste-icons/cjs/ProductFunctionsIcon.js 1.22 kB
./packages/paste-icons/cjs/ProductHomeIcon.js 1.08 kB
./packages/paste-icons/cjs/ProductInsightsIcon.js 1.37 kB
./packages/paste-icons/cjs/ProductInterconnectIcon.js 1.09 kB
./packages/paste-icons/cjs/ProductInternetOfThingsEmbeddedSIMIcon.js 1.13 kB
./packages/paste-icons/cjs/ProductInternetOfThingsIcon.js 1.15 kB
./packages/paste-icons/cjs/ProductInternetOfThingsNarrowbandIcon.js 1.28 kB
./packages/paste-icons/cjs/ProductInternetOfThingsSuperSIMIcon.js 1.32 kB
./packages/paste-icons/cjs/ProductInternetOfThingsTrustOnboardIcon.js 1.35 kB
./packages/paste-icons/cjs/ProductInternetOfThingsWirelessIcon.js 1.24 kB
./packages/paste-icons/cjs/ProductKeysIcon.js 1.44 kB
./packages/paste-icons/cjs/ProductLiveIcon.js 1.25 kB
./packages/paste-icons/cjs/ProductLogsIcon.js 1.28 kB
./packages/paste-icons/cjs/ProductLookupIcon.js 1.02 kB
./packages/paste-icons/cjs/ProductMarketingCampaignsIcon.js 1.15 kB
./packages/paste-icons/cjs/ProductMessagingIcon.js 1.12 kB
./packages/paste-icons/cjs/ProductNotifyIcon.js 1.23 kB
./packages/paste-icons/cjs/ProductPhoneNumbersIcon.js 1.23 kB
./packages/paste-icons/cjs/ProductProxyIcon.js 1.29 kB
./packages/paste-icons/cjs/ProductRegionalIcon.js 1.81 kB
./packages/paste-icons/cjs/ProductSDKIcon.js 1.18 kB
./packages/paste-icons/cjs/ProductSegmentIcon.js 1.24 kB
./packages/paste-icons/cjs/ProductSettingsIcon.js 1.58 kB
./packages/paste-icons/cjs/ProductStudioIcon.js 1.03 kB
./packages/paste-icons/cjs/ProductSupportIcon.js 1.1 kB
./packages/paste-icons/cjs/ProductSyncIcon.js 1.26 kB
./packages/paste-icons/cjs/ProductTaskRouterIcon.js 1.07 kB
./packages/paste-icons/cjs/ProductTrustHubIcon.js 1.3 kB
./packages/paste-icons/cjs/ProductTwilioOrgIcon.js 1.3 kB
./packages/paste-icons/cjs/ProductTwiMLBinsIcon.js 1.01 kB
./packages/paste-icons/cjs/ProductUsageIcon.js 1.47 kB
./packages/paste-icons/cjs/ProductVerifyIcon.js 1.21 kB
./packages/paste-icons/cjs/ProductVideoIcon.js 1.12 kB
./packages/paste-icons/cjs/ProductVoiceIcon.js 1.33 kB
./packages/paste-icons/cjs/RaiseHandIcon.js 2.21 kB
./packages/paste-icons/cjs/ScreenShareIcon.js 1.07 kB
./packages/paste-icons/cjs/SearchIcon.js 983 B
./packages/paste-icons/cjs/ShowIcon.js 1.26 kB
./packages/paste-icons/cjs/ShrinkIcon.js 1.18 kB
./packages/paste-icons/cjs/SkipBackIcon.js 1.09 kB
./packages/paste-icons/cjs/SkipForwardIcon.js 1.1 kB
./packages/paste-icons/cjs/SMSCapableIcon.js 1.04 kB
./packages/paste-icons/cjs/StopScreenShareIcon.js 1.05 kB
./packages/paste-icons/cjs/StrikethroughIcon.js 1.22 kB
./packages/paste-icons/cjs/SuccessIcon.js 1 kB
./packages/paste-icons/cjs/SupportIcon.js 1.11 kB
./packages/paste-icons/cjs/TextFormatIcon.js 1.09 kB
./packages/paste-icons/cjs/ThemeIcon.js 1.37 kB
./packages/paste-icons/cjs/ThumbsDownIcon.js 1.68 kB
./packages/paste-icons/cjs/ThumbsUpIcon.js 1.67 kB
./packages/paste-icons/cjs/UnderlineIcon.js 1.07 kB
./packages/paste-icons/cjs/UnorderedListIcon.js 1.02 kB
./packages/paste-icons/cjs/UnpinIcon.js 1.08 kB
./packages/paste-icons/cjs/UnsortedIcon.js 1.09 kB
./packages/paste-icons/cjs/UploadToCloudIcon.js 1.46 kB
./packages/paste-icons/cjs/UserIcon.js 998 B
./packages/paste-icons/cjs/VideoOffIcon.js 1.21 kB
./packages/paste-icons/cjs/VideoOnIcon.js 1.15 kB
./packages/paste-icons/cjs/VoiceCapableIcon.js 1.25 kB
./packages/paste-icons/cjs/VolumeOffIcon.js 1.26 kB
./packages/paste-icons/cjs/VolumeOnIcon.js 1.36 kB
./packages/paste-icons/cjs/WarningIcon.js 1.11 kB
packages/paste-color-contrast-utils/dist/index.js 12.7 kB
packages/paste-core/components/alert-dialog/dist/index.js 1.68 kB
packages/paste-core/components/alert/dist/index.js 1.28 kB
packages/paste-core/components/anchor/dist/index.js 1.43 kB
packages/paste-core/components/avatar/dist/index.js 1.55 kB
packages/paste-core/components/badge/dist/index.js 1.43 kB
packages/paste-core/components/base-radio-checkbox/dist/index.js 1.25 kB
packages/paste-core/components/breadcrumb/dist/index.js 1.16 kB
packages/paste-core/components/button/dist/index.js 4.8 kB
packages/paste-core/components/card/dist/index.js 791 B
packages/paste-core/components/checkbox/dist/index.js 2.2 kB
packages/paste-core/components/combobox/dist/index.js 10.2 kB
packages/paste-core/components/data-grid/dist/index.js 3.42 kB
packages/paste-core/components/date-picker/dist/index.js 6.65 kB
packages/paste-core/components/disclosure/dist/index.js 2.08 kB
packages/paste-core/components/display-pill-group/dist/index.js 973 B
packages/paste-core/components/form-pill-group/dist/index.js 1.52 kB
packages/paste-core/components/form/dist/index.js 497 B
packages/paste-core/components/heading/dist/index.js 929 B
packages/paste-core/components/help-text/dist/index.js 939 B
packages/paste-core/components/inline-control-group/dist/index.js 1.05 kB
packages/paste-core/components/input-box/dist/index.js 1.84 kB
packages/paste-core/components/input/dist/index.js 1.47 kB
packages/paste-core/components/label/dist/index.js 1.22 kB
packages/paste-core/components/list/dist/index.js 1.02 kB
packages/paste-core/components/menu/dist/index.js 1.95 kB
packages/paste-core/components/modal/dist/index.js 2.47 kB
packages/paste-core/components/pagination/dist/index.js 2.97 kB
packages/paste-core/components/paragraph/dist/index.js 704 B
packages/paste-core/components/popover/dist/index.js 1.45 kB
packages/paste-core/components/radio-group/dist/index.js 1.56 kB
packages/paste-core/components/screen-reader-only/dist/index.js 707 B
packages/paste-core/components/select/dist/index.js 1.6 kB
packages/paste-core/components/separator/dist/index.js 818 B
packages/paste-core/components/skeleton-loader/dist/index.js 1.09 kB
packages/paste-core/components/spinner/dist/index.js 1.21 kB
packages/paste-core/components/table/dist/index.js 1.7 kB
packages/paste-core/components/tabs/dist/index.js 2.07 kB
packages/paste-core/components/textarea/dist/index.js 3.72 kB
packages/paste-core/components/time-picker/dist/index.js 6.67 kB
packages/paste-core/components/toast/dist/index.js 2.67 kB
packages/paste-core/components/tooltip/dist/index.js 1.16 kB
packages/paste-core/components/truncate/dist/index.js 659 B
packages/paste-core/core-bundle/dist/alert-dialog.js 210 B
packages/paste-core/core-bundle/dist/alert.js 194 B
packages/paste-core/core-bundle/dist/anchor.js 197 B
packages/paste-core/core-bundle/dist/animation-library.js 211 B
packages/paste-core/core-bundle/dist/aspect-ratio.js 205 B
packages/paste-core/core-bundle/dist/avatar.js 200 B
packages/paste-core/core-bundle/dist/badge.js 199 B
packages/paste-core/core-bundle/dist/base-radio-checkbox.js 218 B
packages/paste-core/core-bundle/dist/box.js 195 B
packages/paste-core/core-bundle/dist/breadcrumb.js 204 B
packages/paste-core/core-bundle/dist/button.js 201 B
packages/paste-core/core-bundle/dist/card.js 199 B
packages/paste-core/core-bundle/dist/checkbox.js 201 B
packages/paste-core/core-bundle/dist/clipboard-copy-library.js 219 B
packages/paste-core/core-bundle/dist/color-contrast-utils.js 219 B
packages/paste-core/core-bundle/dist/combobox-primitive.js 213 B
packages/paste-core/core-bundle/dist/combobox.js 203 B
packages/paste-core/core-bundle/dist/customization.js 206 B
packages/paste-core/core-bundle/dist/data-grid.js 204 B
packages/paste-core/core-bundle/dist/date-picker.js 205 B
packages/paste-core/core-bundle/dist/design-tokens.js 209 B
packages/paste-core/core-bundle/dist/disclosure-primitive.js 213 B
packages/paste-core/core-bundle/dist/disclosure.js 204 B
packages/paste-core/core-bundle/dist/display-pill-group.js 217 B
packages/paste-core/core-bundle/dist/dropdown-library.js 211 B
packages/paste-core/core-bundle/dist/flex.js 196 B
packages/paste-core/core-bundle/dist/form-pill-group.js 215 B
packages/paste-core/core-bundle/dist/form.js 197 B
packages/paste-core/core-bundle/dist/grid.js 196 B
packages/paste-core/core-bundle/dist/heading.js 199 B
packages/paste-core/core-bundle/dist/help-text.js 204 B
packages/paste-core/core-bundle/dist/index.js 1.19 kB
packages/paste-core/core-bundle/dist/inline-control-group.js 218 B
packages/paste-core/core-bundle/dist/input-box.js 206 B
packages/paste-core/core-bundle/dist/input.js 200 B
packages/paste-core/core-bundle/dist/label.js 196 B
packages/paste-core/core-bundle/dist/list.js 195 B
packages/paste-core/core-bundle/dist/media-object.js 202 B
packages/paste-core/core-bundle/dist/menu-primitive.js 210 B
packages/paste-core/core-bundle/dist/menu.js 196 B
packages/paste-core/core-bundle/dist/modal-dialog-primitive.js 219 B
packages/paste-core/core-bundle/dist/modal.js 196 B
packages/paste-core/core-bundle/dist/non-modal-dialog-primitive.js 224 B
packages/paste-core/core-bundle/dist/pagination.js 199 B
packages/paste-core/core-bundle/dist/paragraph.js 202 B
packages/paste-core/core-bundle/dist/popover.js 201 B
packages/paste-core/core-bundle/dist/radio-group.js 208 B
packages/paste-core/core-bundle/dist/reakit-library.js 211 B
packages/paste-core/core-bundle/dist/screen-reader-only.js 214 B
packages/paste-core/core-bundle/dist/select.js 197 B
packages/paste-core/core-bundle/dist/separator.js 199 B
packages/paste-core/core-bundle/dist/sibling-box.js 206 B
packages/paste-core/core-bundle/dist/skeleton-loader.js 211 B
packages/paste-core/core-bundle/dist/spinner.js 198 B
packages/paste-core/core-bundle/dist/stack.js 200 B
packages/paste-core/core-bundle/dist/style-props.js 202 B
packages/paste-core/core-bundle/dist/styling-library.js 210 B
packages/paste-core/core-bundle/dist/table.js 195 B
packages/paste-core/core-bundle/dist/tabs-primitive.js 210 B
packages/paste-core/core-bundle/dist/tabs.js 196 B
packages/paste-core/core-bundle/dist/text.js 195 B
packages/paste-core/core-bundle/dist/textarea.js 198 B
packages/paste-core/core-bundle/dist/theme.js 196 B
packages/paste-core/core-bundle/dist/time-picker.js 206 B
packages/paste-core/core-bundle/dist/toast.js 195 B
packages/paste-core/core-bundle/dist/tooltip-primitive.js 212 B
packages/paste-core/core-bundle/dist/tooltip.js 198 B
packages/paste-core/core-bundle/dist/truncate.js 198 B
packages/paste-core/core-bundle/dist/types.js 196 B
packages/paste-core/core-bundle/dist/uid-library.js 208 B
packages/paste-core/core-bundle/dist/utils.js 200 B
packages/paste-core/layout/aspect-ratio/dist/index.js 801 B
packages/paste-core/layout/flex/dist/index.js 1.85 kB
packages/paste-core/layout/grid/dist/index.js 1.69 kB
packages/paste-core/layout/media-object/dist/index.js 1.03 kB
packages/paste-core/layout/stack/dist/index.js 1.07 kB
packages/paste-core/primitives/box/dist/index.js 2.52 kB
packages/paste-core/primitives/combobox/dist/index.js 421 B
packages/paste-core/primitives/disclosure/dist/index.js 411 B
packages/paste-core/primitives/menu/dist/index.js 460 B
packages/paste-core/primitives/modal-dialog/dist/index.js 15.6 kB
packages/paste-core/primitives/non-modal-dialog/dist/index.js 430 B
packages/paste-core/primitives/sibling-box/dist/index.js 1.12 kB
packages/paste-core/primitives/tabs/dist/index.js 413 B
packages/paste-core/primitives/text/dist/index.js 2.15 kB
packages/paste-core/primitives/tooltip/dist/index.js 420 B
packages/paste-customization/dist/index.js 1.58 kB
packages/paste-design-tokens/dist/themes/console/tokens.common.js 3.89 kB
packages/paste-design-tokens/dist/themes/dark/tokens.common.js 3.31 kB
packages/paste-design-tokens/dist/themes/sendgrid/tokens.common.js 3.26 kB
packages/paste-design-tokens/dist/tokens.common.js 3.91 kB
packages/paste-libraries/animation/dist/index.js 17.9 kB
packages/paste-libraries/clipboard-copy/dist/index.js 1.2 kB
packages/paste-libraries/dropdown/dist/index.js 19.2 kB
packages/paste-libraries/reakit/dist/index.js 32.4 kB
packages/paste-libraries/styling/dist/index.js 20.5 kB
packages/paste-libraries/uid/dist/index.js 1.56 kB
packages/paste-style-props/dist/index.js 4.24 kB
packages/paste-theme/dist/index.js 2.83 kB
packages/paste-types/dist/index.js 20 B
packages/paste-utils/dist/index.js 1.6 kB

compressed-size-action

Copy link
Contributor

@zahnster zahnster left a comment

Choose a reason for hiding this comment

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

Nice! 👍🏼 Code changes are solid. See below for updated commentary on perf.

Copy link
Contributor

@zahnster zahnster left a comment

Choose a reason for hiding this comment

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

Looking at the perf, we should get some parallelization in here so this doesn't increase our CI times so much.

@github-actions github-actions bot added the Area: Components Related to the component library (core) of this system label Nov 19, 2021
@andioneto andioneto force-pushed the chore/upgrade-cypress branch from 64e0bb1 to d59483b Compare November 21, 2021 00:10
@github-actions github-actions bot removed the Area: Doc Site Related to the documentation website label Nov 21, 2021
@andioneto andioneto force-pushed the chore/upgrade-cypress branch from e84ca48 to a2bbe83 Compare November 22, 2021 18:49
@github-actions github-actions bot removed the Area: Components Related to the component library (core) of this system label Nov 22, 2021
@andioneto andioneto changed the title test: upgrade cypress to v9 test: upgrade cypress to v8 Nov 22, 2021
@andioneto andioneto changed the title test: upgrade cypress to v8 chore(cypress): upgrade cypress to v8 and turn on tests Nov 22, 2021
@SiTaggart
Copy link
Contributor

For visibility I want to surface this comment from the now closed PR #2056 (comment)

Worth considering: how much additional protection are we getting by testing every single page for the same thing when they all follow the same structure, VS how much we're waiting or spending on running those tests.

I too have concerns about testing every page with the same duplicate tests. What mechanism is in place to make sure new pages get new tests? is it written down? Is there some kind of check? Human error will be high on this and pages will get missed

@andioneto
Copy link
Contributor Author

andioneto commented Nov 22, 2021

What mechanism is in place to make sure new pages get new tests? is it written down? Is there some kind of check?

My thinking was that it will be pretty easy to add the script to compare documented pages to tested pages and run the generation on some interval. That is not currently implemented and I have not yet documented all this, but it is still technically a work in progress.

how much additional protection are we getting by testing every single page for the same thing when they all follow the same structure?

In an ideal world where all of our website pages constructed using the same utilities (e.g components etc) that makes sense. In it's current state though, that's not really the case and we are leaving a lot of room for human error in the source code. Because of that I think there is a benefit to testing pages individually. Also, each page has different data, which could leave us vulnerable to bugs as we modify/update the website pages.

@andioneto andioneto force-pushed the chore/upgrade-cypress branch from d503a71 to cd40f21 Compare November 23, 2021 05:09
buildScriptName: "build:storybook"
autoAcceptChanges: "main"
exitOnceUploaded: true
# react16_tests:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Temporarily commented-out these workflow jobs so as to not over-run them on GitHub Actions. Should be un-commented before this PR is merged.

@SiTaggart
Copy link
Contributor

I don't think we're quite there as we're tripling the build minutes, where each job is building the website. It's about 25 minutes of website building.

Can we share the website build artefacts?

image

@andioneto
Copy link
Contributor Author

Can we share the website build artefacts?

Funny you should ask, I have a branch where I added a job to build the website after the other assets are built, and the tests just load them from the cache.
I didn't include it here because I was worried about too much scope creep. Should I go ahead and add it in?

@andioneto andioneto force-pushed the chore/upgrade-cypress branch from 735ca64 to 9f68dce Compare November 23, 2021 18:37
@@ -7,5 +7,6 @@
"runMode": 2,
"openMode": 0
},
"blockHosts": "*.google-analytics.com"
"blockHosts": "*.google-analytics.com",
"nodeVersion": "system"
Copy link
Contributor Author

@andioneto andioneto Nov 23, 2021

Choose a reason for hiding this comment

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

ℹ️ The default sets the node version to the package that is bundled with Cypress. See here for more info

This means that we were not necessarily running our tests with Node v12 as specified in our workflow. This instructs Cypress to use the version on the CI machine(s) (or local machine).

Copy link
Contributor

Choose a reason for hiding this comment

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

Those docs state the default value for nodeVersion is system. You're just resetting the value to be the default value. You can remove it

Copy link
Contributor

Choose a reason for hiding this comment

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

Also states its deprecated and will be removed
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@SiTaggart I'm going to remove this for now, but FWIW added this line to print the node version cypress is using it printed out the version that is bundled with the cypress version.

I wonder if the above snippet from the docs is true for more recent versions of cypress, but we are currently a few major version behind.

@@ -59,58 +59,11 @@ jobs:
packages/paste-design-tokens/types/**/*
packages/paste-codemods/tools/.cache/mappings.json

type_check:
name: Type check
build_website:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ℹ️ Job that will build the website immediately after the other package assets are finished building. This will then be saved to the cache to be used by the test job later.

- name: Install Dependencies
if: steps.yarn_cache_id.outputs.cache-hit != 'true' || steps.node_modules_cache_id.outputs.cache-hit != 'true'
run: yarn install --immutable
packages/paste-website/.cache/mappings.json
Copy link
Contributor Author

Choose a reason for hiding this comment

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

TBH not sure if we actually need this, but it threw an error when I omitted all of the .cache files.

Copy link
Contributor

@TheSisb TheSisb Nov 23, 2021

Choose a reason for hiding this comment

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

We need this file. I might refactor it later to be more clear, but this file needs to be commit and shipped.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah that sounds reasonable. FWIW this isn't being used to build the website on release, only for the pull requests CI.

# make sure every Cypress install prints minimal information
CI: 1
# print Cypress and OS info
run: |
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ℹ️ This will verify the cypress installation before running our tests, as well as print some logs about the environment the tests will run in. This can be helpful to ensure that we are using the system config that we expect.

AIRTABLE_BASEID: ${{ secrets.AIRTABLE_BASEID }}
GATSBY_DOCSEARCH_APIKEY: ${{ secrets.GATSBY_DOCSEARCH_APIKEY }}
# make sure every Cypress install prints minimal information
CI: 1
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ℹ️ CI flag that limits logging output.

path: packages/
name: compiled-website
path: packages/paste-website/
if-no-files-found: error
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ℹ️ I noticed that if the save-cache step fails it just throws a warning, and does not error out. This will cause the job to fail and the action to stop running if no files are found on download.

# leaving the Dashboard hanging ...
# https://github.com/cypress-io/github-action/issues/48
fail-fast: false
matrix:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ℹ️ this is a config specific to github actions to allow parallelization. Note that there are separate required configuration options for the cypress command itself (which are noted in a comment in the package.json file)

@@ -151,60 +103,25 @@ jobs:
with:
name: compiled-js-and-types
path: packages/
if-no-files-found: error
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ℹ️ I noticed that if the save-cache step fails it just throws a warning, and does not error out. This will cause the job to fail and the action to stop running if no files are found on download. (also added to the job build_website

@@ -70,7 +70,8 @@
"test:tools": "jest ./tools/ -c ./tools/jest.config.js",
"test:tools-16": "USE_REACT_16=true jest ./tools/ -c ./tools/jest.config.js",
"test:coverage": "yarn pre-test && jest --coverage",
"test:website": "start-server-and-test 'yarn serve:website' http://localhost:9000 'yarn cypress run --record --spec ./cypress/integration/**/*.spec.ts'",
"test:website": "start-server-and-test 'yarn serve:website' http://localhost:9000 'yarn cypress run --record --parallel --group cypress-tests --spec \"./cypress/integration/**/**/*.spec.ts\"'",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ℹ️ Parallelized tests in cypress are available in a CI environment when:

  • the run command has --parallel=true
  • the run command has --record=true
  • the CI environment config specifies the number of machines to run
    Also note that we added a grouping label to this command.
    It could be helpful in the future to split out our tests into separate jobs and group them by type/category.

🪙 🪙 The biggest value add here is that it could help us analyze our testing data in the future via the cypress dashboard & api.

@@ -129,11 +131,32 @@ Cypress.Commands.add('checkInPageNavigationLinks', () => {
// @TODO Check ComponentHeader <--- waiting for changes to this component to be merged.
// Cypress.Commands.add('checkComponentHeader', () => {});

Cypress.Commands.add('abortPrefetchRequests', (target) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you mind explaining what this is doing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh yes, I totally forgot to add the docs to this command. Will add.

xhr.xhr.abort();
},
}).as('appData');
cy.route('http://api.github.com/repos/twilio-labs/paste', {}).as('githubData');
Copy link
Contributor

Choose a reason for hiding this comment

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

Also this line

@TheSisb
Copy link
Contributor

TheSisb commented Nov 23, 2021

Updated cypress and pinned to version 8.4.0 (^8.6.0 has known minor issues)

Just curious, what minor issues? Didn't see that documented anywhere.

Added command abortPrefetchRequests to prevent prefetches on page load that slow down our tests

Is this safe? This seems... sketchy. And very coupled to Gatsby, which we have hopes to migrate off of in the next year. How much faster do the tests run with/without this? Some perf numbers would help me better understand the evaluation of this trade off.

Added config option for scroll behavior in the change revealer test

I couldn't grok this sentence :/ Could I get more words explaining what this means please?

Updated the Sidebar Navigation test to resolve some flakiness (see notes in diff)

I'm still seeing this PR fail on that and on the tabs page:
image
Is this catching a legitimate bug? I'm concerned about adding flakiness to our already flaky test suite...

cy.get('[data-cy=patterns-button]').click({force: true}).should('have.attr', 'aria-expanded', 'true');
cy.get('[data-cy=patterns-list]').should('be.visible');
cy.get('[data-cy="patterns-button"]').click().shouldHaveAttribute('aria-expanded', 'true');
cy.getInFixedContainer('[data-cy="patterns-list"]').should('be.visible');
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't recall these ever being flakey, and now they are. This leads me to wonder if this getInFixedContainer is the cause of flakiness.

}
}

Cypress.Commands.add('getDocsPageContentArea', () => cy.get('#paste-docs-content-area'));

Cypress.Commands.add('pageHeaderShouldBeVisible', (headerText) => {
cy.contains('h1', headerText).shouldBeVisible();
cy.contains('h1', headerText, {matchCase: false}).should('be.visible');
Copy link
Contributor

@SiTaggart SiTaggart Nov 24, 2021

Choose a reason for hiding this comment

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

I'm starting to wonder why these test assertions are about visibility. We don't do anything about it being visible, we are trying to assert they exist.

For the sidebar asserting visibility makes sense. They start in the DOM but not visible, and we are testing that if you click the button the resultant list becomes visible.

In most of these we really only need to test it exists in the DOM. We don't need to be worrying about scrolling into view

@@ -30,10 +21,6 @@ declare namespace Cypress {
}
}

Cypress.Commands.add('shouldBeVisible', {prevSubject: 'element'}, (subject) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

So these commands are confusing me.

It looks like you've replaced all usage of shouldBeVisible with the native .should('be.visible'), but then replaced .should('have.attr', 'aria-expanded', 'true'); with shouldHaveAttribute in other places.

It looks like you pulled out the one command that was being used, and then started using another one for a different purpose.

I'm also not entirely convinced that

.shouldHaveAttribute('aria-expanded', 'true')

is much, if not any, improvement over the native

.should('have.attr', 'aria-expanded', 'true');

Maaaaaybe lets' just delete this file and commands entirely?

@andioneto andioneto closed this Dec 13, 2021
@andioneto andioneto deleted the chore/upgrade-cypress branch June 18, 2022 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Infrastructure Related to our infrastructure and build tools Area: Repo Type: Tests Adds tests to the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants