-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: replace visual test driver to jest-image-snapshot and Firefox (…
…Playwright) (#1945) * feat: replace jest visual test driver to jest-image-snapshot * chore: add .jest-image-snapshot-touched-files to .gitignore * chore: remove outdated deps update limitation * chore: refactor/align script commands * chore: remove screenshot as a part of the description * chore: remove all old snapshots * feat: ensure page and ScrollView is not scrolling * feat: refactor setupPageScreenshot * chore: rename testPageScreenshot to makeScreenshot * chore: upload diff images to GitHub Action as an artifact * chore: convert from puppeteer to playwright Background: I tried these versions of puppeteer: 8 to 15 + 19 Version 8, 9 and 10 did work fine. While version 10.2.0 has a change in its method of calculating page offsets. Here is it [better explained](puppeteer/puppeteer#7514 (comment)). This change leads to a negative side effect so snapshots differ from when run on CI macOS vs local macOS. A typical comparison looks then as so: ![avatar-src-have-to-match-png-image-of-local-src snap-diff](https://user-images.githubusercontent.com/1501870/213706793-3b41d185-0782-4088-ba72-7d5eb7b54b94.png) I also see that "jest-image-snapshot" has not so many "parameters" to tweak. We basically have `failureThreshold`. Before we had [several more](https://github.com/dnbexperience/eufemia/blob/88279d1e6903497fce40d6c4322dd9b7c7b9ac3b/packages/dnb-eufemia/src/core/jest/jestSetupScreenshots.js#L39). When running our local generated snapshots on the CI, we typical get this: ![button-icon-have-to-match-icon-button snap-diff](https://user-images.githubusercontent.com/1501870/214040509-b0345bed-0d88-4653-93df-e7f650524bd8.png) * chore: align visual test and update snapshots Align Dialog Align Paragraph Align Anchor (new) Align Hr Align Lists Align Typography Align Heading Align Autocomplete Align Avatar Align Badge Align Breadcrumb Align Button Align Checkbox Align Drawer Align Dropdown Align FormLabel Align FormRow and FormSet Align FormStatus Align GlobalError Align GlobalStatus Align HelpButton Align Icon Algin InfoCard Align Input Align Modal Align NumberFormat Align Pagination Align ProgressIndicator Align Radio button Align Seciton Align Skeleton Align Slider Align Space Align StepIndicator Align switch Align Tabs Align Tag Align Textarea Align Timeline Align ToggleButton Align Tooltip Align Upload Align VisuallyHidden Align Image Align Blockquote Align DrawerList Align DatePicker Align Table Align PaymentCard Align HelperClasses Align Logo s
- Loading branch information
1 parent
aa367db
commit 4486fb3
Showing
1,052 changed files
with
5,610 additions
and
6,026 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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 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 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
21 changes: 0 additions & 21 deletions
21
packages/dnb-eufemia/assets/images/__tests__/Logo.screenshot.test.js
This file was deleted.
Oops, something went wrong.
This file contains 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 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 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
Oops, something went wrong.