-
-
Notifications
You must be signed in to change notification settings - Fork 258
tests: Stabilize screenshot tests and clean up flaky infrastructure #1220
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
Open
jderochervlk
wants to merge
6
commits into
master
Choose a base branch
from
vlk/disable-animations
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
dc90ba5
tests: Stabilize screenshot tests and clean up flaky infrastructure
jderochervlk 1af8fff
Update image caption test and refresh screenshots
jderochervlk b75d068
Update test scripts to separate snapshot updates in vitest
jderochervlk 7b148e6
Document Vitest usage and remove old screenshot baselines
jderochervlk b032044
Update image test to add className and refresh screenshot
jderochervlk 717076a
Update testing guidelines for React Router and snapshot usage
jderochervlk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file removed
BIN
-23.4 KB
..._.test.jsx/desktop-API-layout-shows-sidebar-categories-and-version-select-1.png
Binary file not shown.
Binary file removed
BIN
-11.9 KB
...sts__/__screenshots__/ApiLayout_.test.jsx/mobile-API-layout-hides-sidebar-1.png
Binary file not shown.
Binary file removed
BIN
-8.63 KB
..._/__screenshots__/ApiLayout_.test.jsx/old-docs-warning-shows-version-info-1.png
Binary file not shown.
Binary file removed
BIN
-26.9 KB
...ApiOverviewLayout_.test.jsx/desktop-API-overview-shows-all-category-items-1.png
Binary file not shown.
Binary file removed
BIN
-22.4 KB
...ayout_.test.jsx/desktop-API-overview-shows-sidebar-categories-and-content-1.png
Binary file not shown.
Binary file removed
BIN
-11.6 KB
...reenshots__/ApiOverviewLayout_.test.jsx/mobile-API-overview-hides-sidebar-1.png
Binary file not shown.
Binary file removed
BIN
-21.1 KB
__tests__/__screenshots__/ApiOverviewLayout_.test.jsx/tablet-API-overview-1.png
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-5.26 KB
__tests__/__screenshots__/Banner_.test.jsx/renders-banner-with-content-1.png
Binary file not shown.
Binary file removed
BIN
-31.8 KB
.../BlogArticle_.test.jsx/desktop-archived-blog-article-shows-warning-banner-1.png
Binary file not shown.
Binary file removed
BIN
-24.9 KB
...cle_.test.jsx/desktop-blog-article-renders-header--author--date--and-body-1.png
Binary file not shown.
Binary file removed
BIN
-91.5 KB
...BlogArticle_.test.jsx/desktop-blog-article-with-article-image-shows-image-1.png
Binary file not shown.
Binary file removed
BIN
-30.5 KB
...gArticle_.test.jsx/desktop-blog-article-with-co-authors-shows-all-authors-1.png
Binary file not shown.
Binary file removed
BIN
-30.4 KB
...eenshots__/BlogArticle_.test.jsx/desktop-blog-article-without-description-1.png
Binary file not shown.
Binary file removed
BIN
-22.4 KB
__tests__/__screenshots__/BlogArticle_.test.jsx/mobile-blog-article-1.png
Binary file not shown.
Binary file removed
BIN
-79.3 KB
__tests__/__screenshots__/Blog_.test.jsx/desktop-blog-shows-archived-posts-1.png
Binary file not shown.
Binary file removed
BIN
-62.8 KB
__tests__/__screenshots__/Blog_.test.jsx/desktop-blog-with-single-post-1.png
Binary file not shown.
Binary file removed
BIN
-4.53 KB
__tests__/__screenshots__/Button_.test.jsx/renders-PrimaryBlue-button-1.png
Binary file not shown.
Binary file removed
BIN
-4.3 KB
__tests__/__screenshots__/Button_.test.jsx/renders-PrimaryRed-button-1.png
Binary file not shown.
Binary file removed
BIN
-4.53 KB
__tests__/__screenshots__/Button_.test.jsx/renders-SecondaryRed-button-1.png
Binary file not shown.
Binary file removed
BIN
-3.87 KB
__tests__/__screenshots__/Button_.test.jsx/renders-Small-button-1.png
Binary file not shown.
Binary file removed
BIN
-5.6 KB
...enshots__/CodeExample_.test.jsx/renders-code-block-with-highlighted-lines-1.png
Binary file not shown.
Binary file removed
BIN
-4.3 KB
...creenshots__/CodeExample_.test.jsx/renders-code-block-with-language-label-1.png
Binary file not shown.
Binary file removed
BIN
-3.82 KB
...xample_.test.jsx/renders-code-block-without-label-when-showLabel-is-false-1.png
Binary file not shown.
Binary file removed
BIN
-6.55 KB
..._/__screenshots__/CodeExample_.test.jsx/renders-toggle-with-multiple-tabs-1.png
Binary file not shown.
Binary file removed
BIN
-6.96 KB
...screenshots__/CodeExample_.test.jsx/toggle-switches-between-tabs-on-click-1.png
Diff not rendered.
Binary file removed
BIN
-20.8 KB
...munityLayout_.test.jsx/desktop-community-layout-shows-sidebar-and-content-1.png
Diff not rendered.
Binary file removed
BIN
-23.1 KB
...mmunityLayout_.test.jsx/desktop-community-layout-with-multiple-categories-1.png
Diff not rendered.
Binary file removed
BIN
-11.8 KB
...enshots__/CommunityLayout_.test.jsx/mobile-community-layout-hides-sidebar-1.png
Diff not rendered.
Binary file removed
BIN
-19.6 KB
__tests__/__screenshots__/CommunityLayout_.test.jsx/tablet-community-layout-1.png
Diff not rendered.
Binary file removed
BIN
-30 KB
...ots__/DocsLayout_.test.jsx/desktop-docs-layout-highlights-active-nav-item-1.png
Diff not rendered.
Binary file removed
BIN
-29.2 KB
...s__/DocsLayout_.test.jsx/desktop-docs-layout-shows-pagination--prev-next--1.png
Diff not rendered.
Binary file removed
BIN
-24.2 KB
...__/DocsLayout_.test.jsx/desktop-docs-layout-shows-sidebar-with-categories-1.png
Diff not rendered.
Binary file removed
BIN
-24.2 KB
.../DocsLayout_.test.jsx/desktop-docs-layout-shows-table-of-contents-entries-1.png
Diff not rendered.
Binary file removed
BIN
-11.7 KB
...nshots__/DocsLayout_.test.jsx/mobile-docs-layout-hides-sidebar-by-default-1.png
Diff not rendered.
Binary file removed
BIN
-32.2 KB
...ts__/DocsOverview_.test.jsx/desktop-docs-overview-shows-all-section-cards-1.png
Diff not rendered.
Binary file removed
BIN
-32.2 KB
...hots__/DocsOverview_.test.jsx/desktop-docs-overview-shows-ecosystem-links-1.png
Diff not rendered.
Binary file removed
BIN
-20.6 KB
__tests__/__screenshots__/DocsOverview_.test.jsx/mobile-docs-overview-1.png
Diff not rendered.
Binary file removed
BIN
-16.1 KB
...creenshots__/Footer_.test.jsx/desktop-footer-shows-all-sections-and-links-1.png
Diff not rendered.
Binary file removed
BIN
-16.3 KB
...__screenshots__/Footer_.test.jsx/mobile-footer-stacks-sections-vertically-1.png
Diff not rendered.
Binary file removed
BIN
-17.6 KB
...ts__/MainLayout_.test.jsx/desktop-main-layout-renders-children-and-footer-1.png
Diff not rendered.
Binary file removed
BIN
-11.8 KB
__tests__/__screenshots__/MainLayout_.test.jsx/mobile-main-layout-1.png
Diff not rendered.
Binary file modified
BIN
+458 KB
(200%)
.../__screenshots__/MarkdownComponents_.test.jsx/markdown-image-chromium-linux.png
Oops, something went wrong.
Binary file removed
BIN
-8.71 KB
.../__screenshots__/MarkdownComponents_.test.jsx/markdown-video-chromium-linux.png
Diff not rendered.
Binary file removed
BIN
-5.94 KB
..._screenshots__/MarkdownComponents_.test.jsx/renders-Anchor-with-link-icon-1.png
Diff not rendered.
Binary file removed
BIN
-13.9 KB
.../__screenshots__/MarkdownComponents_.test.jsx/renders-Cite-without-author-1.png
Diff not rendered.
Binary file removed
BIN
-37.1 KB
..._screenshots__/MarkdownComponents_.test.jsx/renders-Image-with-small-size-1.png
Diff not rendered.
Binary file removed
BIN
-6.21 KB
__tests__/__screenshots__/MarkdownComponents_.test.jsx/renders-Strong-text-1.png
Diff not rendered.
Binary file removed
BIN
-6.74 KB
__tests__/__screenshots__/MarkdownComponents_.test.jsx/renders-inline-code-1.png
Diff not rendered.
Binary file removed
BIN
-7.93 KB
__tests__/__screenshots__/MarkdownComponents_.test.jsx/renders-lists-1.png
Diff not rendered.
Binary file removed
BIN
-5.59 KB
...enshots__/MarkdownComponents_.test.jsx/renders-nested-list--ul-inside-li--1.png
Diff not rendered.
Binary file modified
BIN
+684 Bytes
(120%)
...enshots__/NavbarSecondary_.test.jsx/desktop-navbar-secondary-chromium-linux.png
Oops, something went wrong.
Binary file removed
BIN
-5.03 KB
...rSecondary_.test.jsx/desktop-secondary-navbar-shows-all-doc-section-links-1.png
Diff not rendered.
Binary file modified
BIN
+66 Bytes
(100%)
...eenshots__/NavbarSecondary_.test.jsx/mobile-navbar-secondary-chromium-linux.png
Oops, something went wrong.
Binary file removed
BIN
-4.3 KB
...shots__/NavbarSecondary_.test.jsx/mobile-secondary-navbar-shows-all-links-1.png
Diff not rendered.
Binary file removed
BIN
-5.61 KB
...ts__/NavbarSecondary_.test.jsx/secondary-navbar-highlights-active-section-1.png
Diff not rendered.
Binary file removed
BIN
-4.66 KB
__tests__/__screenshots__/SearchBox_.test.jsx/renders-with-a-value-1.png
Diff not rendered.
Binary file removed
BIN
-5.31 KB
__tests__/__screenshots__/SearchBox_.test.jsx/renders-with-placeholder-text-1.png
Diff not rendered.
Binary file removed
BIN
-5.37 KB
.../__screenshots__/SidebarLayout_.test.jsx/breadcrumbs-render-path-segments-1.png
Diff not rendered.
Binary file removed
BIN
-5.79 KB
__tests__/__screenshots__/SidebarLayout_.test.jsx/breadcrumbs-with-deep-path-1.png
Diff not rendered.
Binary file removed
BIN
-7.03 KB
...enshots__/SidebarLayout_.test.jsx/sidebar-category-highlights-active-item-1.png
Diff not rendered.
Binary file removed
BIN
-7.03 KB
...ts__/SidebarLayout_.test.jsx/sidebar-category-renders-title-and-nav-items-1.png
Diff not rendered.
Binary file removed
BIN
-10.1 KB
.../SidebarLayout_.test.jsx/sidebar-category-with-active-TOC-renders-entries-1.png
Diff not rendered.
Binary file removed
BIN
-8.18 KB
.../__screenshots__/SidebarLayout_.test.jsx/sidebar-category-with-many-items-1.png
Diff not rendered.
Binary file removed
BIN
-29.7 KB
...__/SyntaxLookup_.test.jsx/deprecated-items-show-with-line-through-styling-1.png
Diff not rendered.
Binary file removed
BIN
-29.7 KB
.../SyntaxLookup_.test.jsx/desktop-syntax-lookup-renders-categories-and-tags-1.png
Diff not rendered.
Binary file removed
BIN
-30.3 KB
...xLookup_.test.jsx/desktop-syntax-lookup-with-active-item-shows-detail-box-1.png
Diff not rendered.
Binary file removed
BIN
-20.1 KB
__tests__/__screenshots__/SyntaxLookup_.test.jsx/mobile-syntax-lookup-1.png
Diff not rendered.
Binary file removed
BIN
-20.5 KB
...creenshots__/SyntaxLookup_.test.jsx/mobile-syntax-lookup-with-active-item-1.png
Diff not rendered.
Binary file removed
BIN
-28.1 KB
...reenshots__/SyntaxLookup_.test.jsx/syntax-lookup-detail-box-shows-summary-1.png
Diff not rendered.
Binary file removed
BIN
-4.71 KB
__tests__/__screenshots__/Tag_.test.jsx/renders-multiple-tags-side-by-side-1.png
Diff not rendered.
Binary file removed
BIN
-3.97 KB
__tests__/__screenshots__/Tag_.test.jsx/renders-subtle-tag-with-text-1.png
Diff not rendered.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| /* | ||
| * Test overrides for consistent screenshots. | ||
| * This file is only imported in vitest.setup.mjs. | ||
| */ | ||
|
|
||
| /* Disable all CSS animations and transitions */ | ||
| *, | ||
| *::before, | ||
| *::after { | ||
| animation-duration: 0s !important; | ||
| animation-delay: 0s !important; | ||
| transition-duration: 0s !important; | ||
| transition-delay: 0s !important; | ||
| } | ||
|
|
||
| /* Force overlay scrollbars so scrollbar width is 0 in both headless and headed mode */ | ||
| * { | ||
| scrollbar-width: none !important; | ||
| scrollbar-gutter: auto !important; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| import "./styles/main.css"; | ||
| import "./styles/utils.css"; | ||
| import "./styles/test-overrides.css"; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a patch to keep the files in sync across local runs and CI to make sure that the CI versions were always used so they would be the same, but now they are the same in headless mode as they are running on chrome so this isn't needed.