diff --git a/.github/workflows/visual-test.yml b/.github/workflows/visual-test.yml index d9b5e13c188..ef6937e4546 100644 --- a/.github/workflows/visual-test.yml +++ b/.github/workflows/visual-test.yml @@ -112,6 +112,17 @@ jobs: key: ${{ secrets.CACHE_VERSION }}-${{ runner.os }}-deps-${{ hashFiles('**/yarn.lock') }} restore-keys: ${{ secrets.CACHE_VERSION }}-${{ runner.os }}-deps- + - name: Use Playwright cache + uses: actions/cache@v3 + id: playwright-cache + with: + path: ~/Library/Caches/ms-playwright + key: ${{ secrets.CACHE_VERSION }}-${{ runner.os }}-playwright-${{ hashFiles('**/yarn.lock') }} + - run: npx playwright-firefox install --with-deps firefox + if: steps.playwright-cache.outputs.cache-hit != 'true' + - run: npx playwright-firefox install-deps firefox + if: steps.playwright-cache.outputs.cache-hit == 'true' + - name: Install dependencies run: yarn install --immutable @@ -133,6 +144,20 @@ jobs: - name: Run visual tests run: yarn workspace dnb-design-system-portal test:screenshots:ci + - uses: actions/upload-artifact@v3 + if: failure() + with: + name: visual-test-artifact + path: ./packages/dnb-eufemia/src/**/*.snap-diff.png + + - name: Run visual tests info + if: failure() + run: echo '\n\nšŸ‘‰ Download the diff files as a ZIP file. \nIt is called "visual-test-artifact" and you find it in the test "Summary" under "Artifacts".\n\n\n' + + - uses: geekyeggo/delete-artifact@v2 + with: + name: portal-build-artifact + - name: Slack uses: 8398a7/action-slack@v3 with: diff --git a/packages/dnb-design-system-portal/package.json b/packages/dnb-design-system-portal/package.json index 3846d5c0e04..969540d5036 100644 --- a/packages/dnb-design-system-portal/package.json +++ b/packages/dnb-design-system-portal/package.json @@ -33,7 +33,7 @@ "test:ci": "jest --ci --passWithNoTests", "test:staged": "jest --bail --findRelatedTests ", "test:screenshots": "yarn workspace @dnb/eufemia test:screenshots", - "test:screenshots:ci": "start-server-and-test serve http://localhost:8000 'yarn workspace @dnb/eufemia test:screenshots'", + "test:screenshots:ci": "start-server-and-test serve http://localhost:8000 'yarn workspace @dnb/eufemia test:screenshots:ci'", "test:types": "tsc --noEmit", "test:types:watch": "tsc --noEmit --watch", "test:update": "jest --updateSnapshot" diff --git a/packages/dnb-design-system-portal/src/docs/contribute/faq.md b/packages/dnb-design-system-portal/src/docs/contribute/faq.md index ec7000d2ca4..e57c9f0454f 100644 --- a/packages/dnb-design-system-portal/src/docs/contribute/faq.md +++ b/packages/dnb-design-system-portal/src/docs/contribute/faq.md @@ -17,10 +17,6 @@ LINT_STAGED=1 ## Dependency issues -### puppeteer - -- When upgrading to a newer version than v8, puppeteer behaves inconsistent. Sometimes the content is just tiny bit off. But most importantly, > v10.4 is very inconsistent and off running on the GitHub Actions maxOS. - ### Stylelint - v14 has changed a good amount of their default styling rules. Updating would require us to refactor a good amount of SCSS code. We are currently on v13. diff --git a/packages/dnb-design-system-portal/src/docs/contribute/first-contribution/before-started.md b/packages/dnb-design-system-portal/src/docs/contribute/first-contribution/before-started.md index 83cc0b5d4dd..6870ad53b08 100644 --- a/packages/dnb-design-system-portal/src/docs/contribute/first-contribution/before-started.md +++ b/packages/dnb-design-system-portal/src/docs/contribute/first-contribution/before-started.md @@ -261,34 +261,6 @@ The build will be exported to the `/public` directory. You can now also run a lo $ yarn serve ``` -### Testing - -Testing is currently handled by [Jest](https://jestjs.io/) and written using [Testing Library](https://testing-library.com/). - -Run the integration tests with - -```bash -yarn test -``` - -Run the screenshot tests (make sure to have a portal running locally) with - -```bash -yarn test:screenshots -``` - -Check out the results of the screenshot test with `open ./packages/dnb-eufemia/jest-screenshot-report/index.html`. - -### Run Algolia search queries locally - -In order to commit Algolia search queries to the `dev_eufemia_docs` index, you have to: - -Create a `.env` file inside `dnb-design-system-portal` with valid: - -- `ALGOLIA_INDEX_NAME=dev_eufemia_docs` -- `ALGOLIA_APP_ID=SLD6KEYMQ9` -- `ALGOLIA_API_KEY=secret` - ## What happens in the build steps During the build, a lot of various things will happen. First, a prebuild before the build and afterward a postbuild. diff --git a/packages/dnb-design-system-portal/src/docs/contribute/getting-started.md b/packages/dnb-design-system-portal/src/docs/contribute/getting-started.md index d7bca460720..e125672c57a 100644 --- a/packages/dnb-design-system-portal/src/docs/contribute/getting-started.md +++ b/packages/dnb-design-system-portal/src/docs/contribute/getting-started.md @@ -393,6 +393,8 @@ yarn test:update breadcrumb avatar 3. Run the visual test against the portal: +**NB:** Make sure you have the portal running locally on port 8000. + ```bash # 1. First start the portal yarn start @@ -401,22 +403,26 @@ yarn start yarn test:screenshots breadcrumb avatar ``` -You can also create a screenshot report for all components running `yarn test:screenshots`. Check the result / reports, located in: `open ./packages/dnb-eufemia/jest-screenshot-report/index.html` - -4. Update eventually new or valid PNG snapshots: +4. Update eventually new or valid visual PNG snapshots: ```bash # Update all screenshot tests including 'breadcrumb' yarn test:screenshots:update breadcrumb ``` -5. How to deal with failing tests on the CI server? +You can also press the `u` during a watch mode to update outdated snapshots. + +5. How to deal with failing visual tests? + +When a visual test fails, a visual comparison file (diff) will be created. Its location and name will be: + +- `**/__tests__/__image_snapshots__/__diff_output__/*.snap-diff.png` -You may check out the logs for detailed reports. +Please do not commit these files. -**Failing visual screenshot tests** +You may check out the CI/CLI logs for more details. -If visual screenshot tests are failing on the CI, you can scroll all the way to the end of the logs. There you will find a link **Download the Report** you can use to download a zip file containing the visual test reports and diffs. +**GitHub Actions:** If visual screenshot test is failing on the CI, you can navigate to the test "Summary" where you find "Artifacts". There you can download the **visual-test-artifact** zip file, containing the visual diff files. ### Support SCSS snapshot test @@ -475,3 +481,13 @@ From a clone: - Make your changes and commit it to the repo in a new branch. - Make a _Pull Request_ to `origin/main`. - Watch the result of the tests. + +### Run Algolia search queries locally + +In order to commit Algolia search queries to the `dev_eufemia_docs` index, you have to: + +Create a `.env` file inside `dnb-design-system-portal` with valid: + +- `ALGOLIA_INDEX_NAME=dev_eufemia_docs` +- `ALGOLIA_APP_ID=SLD6KEYMQ9` +- `ALGOLIA_API_KEY=secret` diff --git a/packages/dnb-design-system-portal/src/docs/uilib/components/drawer/Examples.js b/packages/dnb-design-system-portal/src/docs/uilib/components/drawer/Examples.js index 07396d9906b..c4b7c742a10 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/components/drawer/Examples.js +++ b/packages/dnb-design-system-portal/src/docs/uilib/components/drawer/Examples.js @@ -89,19 +89,6 @@ export const FullDrawerExample = () => ( phasellus praesent justo mollis montes velit taciti gravida lacus commodo senectus feugiat lorem etiam consequat penatibus cum hendrerit accumsan orci potenti purus nulla - interdum metus sollicitudin magnis libero sapien habitant non - class ridiculus consectetur congue nec litora sociosqu - aliquet felis in rhoncus nascetur odio ultricies nullam a - iaculis massa nisi ante nam cras aenean erat facilisi vivamus - ut cursus auctor arcu lobortis himenaeos dictum habitasse - tristique mauris at blandit sagittis nibh dignissim - condimentum per integer duis lacinia malesuada est adipiscing - maecenas donec eleifend turpis dictumst dapibus tempor fusce - aliquam torquent hac ac curabitur venenatis et tincidunt - augue porta vehicula enim facilisis posuere primis molestie - convallis diam vel fringilla dolor leo quis diam cursus massa - sapien tristique cum senectus sed tortor natoque amet - hendrerit ut fusce ipsum quis

) diff --git a/packages/dnb-eufemia/.gitignore b/packages/dnb-eufemia/.gitignore index cc543159698..780f2c493ab 100644 --- a/packages/dnb-eufemia/.gitignore +++ b/packages/dnb-eufemia/.gitignore @@ -3,9 +3,8 @@ # testing /coverage -/jest-screenshot-report -/reports/* -!/reports/*.tgz +**/__diff_output__/ +.jest-image-snapshot-touched-files # production *.min.mjs diff --git a/packages/dnb-eufemia/.ncurc.json b/packages/dnb-eufemia/.ncurc.json index 9890adf063a..ea27ee8c90c 100644 --- a/packages/dnb-eufemia/.ncurc.json +++ b/packages/dnb-eufemia/.ncurc.json @@ -4,8 +4,6 @@ "ora", "react", "react-dom", - "node-sass", - "puppeteer", "stylelint", "stylelint-config-prettier", "stylelint-config-recommended", diff --git a/packages/dnb-eufemia/.npmignore b/packages/dnb-eufemia/.npmignore index ad0f6aeca45..62002c7092f 100644 --- a/packages/dnb-eufemia/.npmignore +++ b/packages/dnb-eufemia/.npmignore @@ -3,7 +3,8 @@ # testing /coverage -/jest-screenshot-report +/__diff_output__ +.jest-image-snapshot-touched-files jest.config.screenshots.js /reports __tests__ diff --git a/packages/dnb-eufemia/assets/images/__tests__/Logo.screenshot.test.js b/packages/dnb-eufemia/assets/images/__tests__/Logo.screenshot.test.js deleted file mode 100644 index e920f3efb5b..00000000000 --- a/packages/dnb-eufemia/assets/images/__tests__/Logo.screenshot.test.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Component Test - * - */ - -import path from 'path' -import { - loadImage, - setupJestScreenshot, -} from '../../../src/core/jest/jestSetupScreenshots' - -describe('Logo image', () => { - setupJestScreenshot() - - it('have to match image snapshot', async () => { - const image = await loadImage( - path.resolve(__dirname, '../dnb-logo.png') - ) - expect(image).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/jest.config.js b/packages/dnb-eufemia/jest.config.js index c64370d0880..0b544a5c8b6 100644 --- a/packages/dnb-eufemia/jest.config.js +++ b/packages/dnb-eufemia/jest.config.js @@ -12,7 +12,6 @@ const config = { '/build/', '/assets/', '/stories/', - '/jest-screenshot-report/', ], transformIgnorePatterns: ['/node_modules/(?!(ora|globby)/)'], transform: { diff --git a/packages/dnb-eufemia/jest.config.screenshots.js b/packages/dnb-eufemia/jest.config.screenshots.js index f81a30533b7..a8e82b6c132 100644 --- a/packages/dnb-eufemia/jest.config.screenshots.js +++ b/packages/dnb-eufemia/jest.config.screenshots.js @@ -1,14 +1,26 @@ -// because --testPathIgnorePatterns=[array] has a bug, we do handle the ignore screenshots with this config const config = require('./jest.config.js') module.exports = { - ...config, ...{ + preset: 'jest-playwright-preset', + testEnvironmentOptions: { + 'jest-playwright': { + launchOptions: { + headless: true, + }, + browsers: [ + // 'chromium', + // 'webkit', + 'firefox', + ], + }, + }, testRegex: 'screenshot.test.(js|ts|tsx)$', - globalSetup: './src/core/jest/jestPuppeteerSetup.js', - globalTeardown: './src/core/jest/jestPuppeteerTeardown.js', testEnvironment: './src/core/jest/jestPuppeteerEnvironment.js', setupFilesAfterEnv: ['./src/core/jest/setupJestScreenshot.js'], - reporters: ['default', 'jest-screenshot/reporter'], + reporters: [ + 'default', + 'jest-image-snapshot/src/outdated-snapshot-reporter.js', + ], testPathIgnorePatterns: config.testPathIgnorePatterns.filter((i) => { return i !== 'screenshot' }), diff --git a/packages/dnb-eufemia/package.json b/packages/dnb-eufemia/package.json index 64c7961de98..6fb5a4ef88c 100644 --- a/packages/dnb-eufemia/package.json +++ b/packages/dnb-eufemia/package.json @@ -68,12 +68,12 @@ "test": "jest", "test:auto-generated-types": "jest ./postTypeGeneration.test.js --ci --testPathIgnorePatterns=[]", "test:ci": "jest --ci", - "test:screenshots": "jest --config=./jest.config.screenshots.js --forceExit --detectOpenHandles", + "test:screenshots": "jest --config=./jest.config.screenshots.js --detectOpenHandles --testPathPattern ", "test:screenshots:ci": "jest --config=./jest.config.screenshots.js --ci --bail", "test:screenshots:ci:update": "yarn test:screenshots:ci --updateSnapshot", - "test:screenshots:recreate": "find . -name '*.snap.png' -type f|xargs rm -f && yarn test:screenshots", - "test:screenshots:update": "jest --config=./jest.config.screenshots.js --updateSnapshot --detectOpenHandles", - "test:screenshots:watch": "jest --config=./jest.config.screenshots.js --forceExit --detectOpenHandles --watchAll --testPathPattern ", + "test:screenshots:reset": "find . -name '*.snap.png' -type f|xargs rm -f && yarn test:screenshots", + "test:screenshots:update": "jest --config=./jest.config.screenshots.js --updateSnapshot --testPathPattern ", + "test:screenshots:watch": "JEST_IMAGE_SNAPSHOT_TRACK_OBSOLETE=1 jest --config=./jest.config.screenshots.js --watchAll --detectOpenHandles --testPathPattern ", "test:staged": "jest --bail --findRelatedTests ", "test:types": "tsc --noEmit", "test:types:watch": "tsc --noEmit --watch", @@ -157,6 +157,7 @@ "@testing-library/user-event": "13.5.0", "@types/jest": "29.2.6", "@types/jest-axe": "3.5.5", + "@types/jest-image-snapshot": "6.1.0", "@typescript-eslint/eslint-plugin": "5.28.0", "@typescript-eslint/parser": "5.43.0", "@wojtekmaj/enzyme-adapter-react-17": "0.6.5", @@ -200,10 +201,10 @@ "jest": "29.3.1", "jest-axe": "7.0.0", "jest-environment-jsdom": "29.3.1", - "jest-environment-node": "29.3.1", + "jest-image-snapshot": "6.1.0", "jest-matchmedia-mock": "1.1.0", + "jest-playwright-preset": "3.0.1", "jest-raw-loader": "1.0.1", - "jest-screenshot": "0.3.5", "jest-tobetype": "1.2.3", "lint-staged": "11.2.6", "lockfile-lint": "4.6.2", @@ -216,6 +217,7 @@ "opentype.js": "1.3.4", "ora": "5.4.1", "packpath": "0.1.0", + "playwright-firefox": "1.30.0", "postcss": "8.3.11", "postcss-calc": "8.0.0", "postcss-preset-env": "6.7.0", @@ -223,7 +225,6 @@ "prettier-package-json": "2.6.0", "process": "0.11.10", "prop-types": "15.7.2", - "puppeteer": "8.0.0", "react": "17.0.2", "react-dom": "17.0.2", "react-fake-props": "1.0.3", diff --git a/packages/dnb-eufemia/src/components/accordion/__tests__/Accordion.screenshot.test.js b/packages/dnb-eufemia/src/components/accordion/__tests__/Accordion.screenshot.test.js deleted file mode 100644 index 7825cc333c0..00000000000 --- a/packages/dnb-eufemia/src/components/accordion/__tests__/Accordion.screenshot.test.js +++ /dev/null @@ -1,149 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -describe('Accordion closed screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/accordion/demos', - }) - - it('have to match accordion in closed state', async () => { - const screenshot = await testPageScreenshot({ - style: { width: '20rem', height: '15rem' }, - selector: '[data-visual-test="accordion-default"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match accordion in nested accordions', async () => { - const screenshot = await testPageScreenshot({ - style: { width: '20rem', height: '25rem' }, - selector: '[data-visual-test="accordion-nested"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match accordion with large content', async () => { - const screenshot = await testPageScreenshot({ - style: { width: '20rem', height: '13rem' }, - selector: '[data-visual-test="accordion-large"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Accordion closed screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/accordion/demos', - reload: true, - }) - - it('have to match accordion in open state with focus', async () => { - const screenshot = await testPageScreenshot({ - style: { width: '20rem', height: '20rem' }, - styleSelector: '[data-visual-test="accordion-default"]', - selector: '[data-visual-test="accordion-default"]', - simulateSelector: - '[data-visual-test="accordion-default"] .dnb-accordion:nth-of-type(1) .dnb-accordion__header', - simulate: 'focus', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match accordion in closed state with focus', async () => { - const screenshot = await testPageScreenshot({ - style: { width: '20rem', height: '20rem' }, - styleSelector: '[data-visual-test="accordion-default"]', - selector: '[data-visual-test="accordion-default"]', - simulateSelector: - '[data-visual-test="accordion-default"] .dnb-accordion:nth-of-type(1) .dnb-accordion__header', - simulate: 'clickfocus', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match accordion in closed state with hover', async () => { - const screenshot = await testPageScreenshot({ - style: { width: '20rem', height: '15rem' }, - styleSelector: '[data-visual-test="accordion-default"]', - selector: '[data-visual-test="accordion-default"]', - simulateSelector: - '[data-visual-test="accordion-default"] .dnb-accordion-group .dnb-accordion__header', - simulate: 'hover', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Accordion container screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/accordion/demos', - }) - - it('have to match accordion in desktop mode', async () => { - const screenshot = await testPageScreenshot({ - style: { width: '40rem', 'min-height': '15rem' }, - selector: '[data-visual-test="accordion-container"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Accordion container screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/accordion/demos', - pageViewport: { - width: 400, - height: 600, - }, - }) - - it('have to match accordion in mobile mode', async () => { - const screenshot = await testPageScreenshot({ - style: { width: '30rem', 'min-height': '15rem' }, - selector: '[data-visual-test="accordion-container"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Accordion group screenshot', () => { - setupPageScreenshot({ url: '/uilib/components/accordion/demos' }) - - it('have to match accordion in first state', async () => { - const screenshot = await testPageScreenshot({ - style: { width: '30rem', height: '20rem' }, - selector: '[data-visual-test="accordion-group"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match accordion in second state', async () => { - const screenshot = await testPageScreenshot({ - style: { width: '30rem', height: '20rem' }, - selector: '[data-visual-test="accordion-group"]', - simulateSelector: - '[data-visual-test="accordion-group"] .dnb-accordion:first-of-type .dnb-accordion__header', - simulate: 'click', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Accordion plain variant screenshot', () => { - setupPageScreenshot({ url: '/uilib/components/accordion/demos' }) - - it('have to match with plain variant', async () => { - const screenshot = await testPageScreenshot({ - style: { width: '20rem', height: '15rem' }, - selector: '[data-visual-test="accordion-variant-plain"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/components/accordion/__tests__/Accordion.screenshot.test.ts b/packages/dnb-eufemia/src/components/accordion/__tests__/Accordion.screenshot.test.ts new file mode 100644 index 00000000000..5946cb58e3b --- /dev/null +++ b/packages/dnb-eufemia/src/components/accordion/__tests__/Accordion.screenshot.test.ts @@ -0,0 +1,128 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../../core/jest/jestSetupScreenshots' + +describe('Accordion', () => { + setupPageScreenshot({ + url: '/uilib/components/accordion/demos', + }) + + it('have to match in closed state', async () => { + const screenshot = await makeScreenshot({ + style: { width: '20rem', height: '15rem' }, + selector: '[data-visual-test="accordion-default"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match in nested accordions', async () => { + const screenshot = await makeScreenshot({ + style: { width: '20rem', height: '25rem' }, + selector: '[data-visual-test="accordion-nested"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match with large content', async () => { + const screenshot = await makeScreenshot({ + style: { width: '20rem', height: '13rem' }, + selector: '[data-visual-test="accordion-large"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match in open state with focus', async () => { + const screenshot = await makeScreenshot({ + style: { width: '20rem', height: '20rem' }, + styleSelector: '[data-visual-test="accordion-default"]', + selector: '[data-visual-test="accordion-default"]', + simulateSelector: + '[data-visual-test="accordion-default"] .dnb-accordion:nth-of-type(1) .dnb-accordion__header', + simulate: 'focus', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match in closed state with focus', async () => { + const screenshot = await makeScreenshot({ + style: { width: '20rem', height: '20rem' }, + styleSelector: '[data-visual-test="accordion-default"]', + selector: '[data-visual-test="accordion-default"]', + simulateSelector: + '[data-visual-test="accordion-default"] .dnb-accordion:nth-of-type(1) .dnb-accordion__header', + simulate: 'clickfocus', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match in closed state with hover', async () => { + const screenshot = await makeScreenshot({ + style: { width: '20rem', height: '15rem' }, + styleSelector: '[data-visual-test="accordion-default"]', + selector: '[data-visual-test="accordion-default"]', + simulateSelector: + '[data-visual-test="accordion-default"] .dnb-accordion-group .dnb-accordion__header', + simulate: 'hover', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match in desktop mode', async () => { + const screenshot = await makeScreenshot({ + style: { width: '40rem', 'min-height': '15rem' }, + selector: '[data-visual-test="accordion-container"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match in first state', async () => { + const screenshot = await makeScreenshot({ + style: { width: '30rem', height: '20rem' }, + selector: '[data-visual-test="accordion-group"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match in second state', async () => { + const screenshot = await makeScreenshot({ + style: { width: '30rem', height: '20rem' }, + selector: '[data-visual-test="accordion-group"]', + simulateSelector: + '[data-visual-test="accordion-group"] .dnb-accordion:first-of-type .dnb-accordion__header', + simulate: 'click', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match with plain variant', async () => { + const screenshot = await makeScreenshot({ + style: { width: '20rem', height: '15rem' }, + selector: '[data-visual-test="accordion-variant-plain"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) + +describe('Accordion container', () => { + setupPageScreenshot({ + url: '/uilib/components/accordion/demos', + pageViewport: { + width: 400, + height: 600, + }, + }) + + it('have to match in mobile mode', async () => { + const screenshot = await makeScreenshot({ + style: { width: '22rem', 'min-height': '15rem' }, + selector: '[data-visual-test="accordion-container"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/components/accordion/__tests__/__image_snapshots__/accordion-container-have-to-match-in-mobile-mode.snap.png b/packages/dnb-eufemia/src/components/accordion/__tests__/__image_snapshots__/accordion-container-have-to-match-in-mobile-mode.snap.png new file mode 100644 index 00000000000..ccb8317562e Binary files /dev/null and b/packages/dnb-eufemia/src/components/accordion/__tests__/__image_snapshots__/accordion-container-have-to-match-in-mobile-mode.snap.png differ diff --git a/packages/dnb-eufemia/src/components/accordion/__tests__/__image_snapshots__/accordion-have-to-match-in-closed-state-with-focus.snap.png b/packages/dnb-eufemia/src/components/accordion/__tests__/__image_snapshots__/accordion-have-to-match-in-closed-state-with-focus.snap.png new file mode 100644 index 00000000000..de2c488fd50 Binary files /dev/null and b/packages/dnb-eufemia/src/components/accordion/__tests__/__image_snapshots__/accordion-have-to-match-in-closed-state-with-focus.snap.png differ diff --git a/packages/dnb-eufemia/src/components/accordion/__tests__/__image_snapshots__/accordion-have-to-match-in-closed-state-with-hover.snap.png b/packages/dnb-eufemia/src/components/accordion/__tests__/__image_snapshots__/accordion-have-to-match-in-closed-state-with-hover.snap.png new file mode 100644 index 00000000000..a7c0a3cb556 Binary files /dev/null and b/packages/dnb-eufemia/src/components/accordion/__tests__/__image_snapshots__/accordion-have-to-match-in-closed-state-with-hover.snap.png differ diff --git a/packages/dnb-eufemia/src/components/accordion/__tests__/__image_snapshots__/accordion-have-to-match-in-closed-state.snap.png b/packages/dnb-eufemia/src/components/accordion/__tests__/__image_snapshots__/accordion-have-to-match-in-closed-state.snap.png new file mode 100644 index 00000000000..17123dd7781 Binary files /dev/null and b/packages/dnb-eufemia/src/components/accordion/__tests__/__image_snapshots__/accordion-have-to-match-in-closed-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/accordion/__tests__/__image_snapshots__/accordion-have-to-match-in-desktop-mode.snap.png b/packages/dnb-eufemia/src/components/accordion/__tests__/__image_snapshots__/accordion-have-to-match-in-desktop-mode.snap.png new file mode 100644 index 00000000000..1acbd04b1ee Binary files /dev/null and b/packages/dnb-eufemia/src/components/accordion/__tests__/__image_snapshots__/accordion-have-to-match-in-desktop-mode.snap.png differ diff --git a/packages/dnb-eufemia/src/components/accordion/__tests__/__image_snapshots__/accordion-have-to-match-in-first-state.snap.png b/packages/dnb-eufemia/src/components/accordion/__tests__/__image_snapshots__/accordion-have-to-match-in-first-state.snap.png new file mode 100644 index 00000000000..1a7cf50574d Binary files /dev/null and b/packages/dnb-eufemia/src/components/accordion/__tests__/__image_snapshots__/accordion-have-to-match-in-first-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/accordion/__tests__/__image_snapshots__/accordion-have-to-match-in-nested-accordions.snap.png b/packages/dnb-eufemia/src/components/accordion/__tests__/__image_snapshots__/accordion-have-to-match-in-nested-accordions.snap.png new file mode 100644 index 00000000000..4643fad9211 Binary files /dev/null and b/packages/dnb-eufemia/src/components/accordion/__tests__/__image_snapshots__/accordion-have-to-match-in-nested-accordions.snap.png differ diff --git a/packages/dnb-eufemia/src/components/accordion/__tests__/__image_snapshots__/accordion-have-to-match-in-open-state-with-focus.snap.png b/packages/dnb-eufemia/src/components/accordion/__tests__/__image_snapshots__/accordion-have-to-match-in-open-state-with-focus.snap.png new file mode 100644 index 00000000000..a5816bf000a Binary files /dev/null and b/packages/dnb-eufemia/src/components/accordion/__tests__/__image_snapshots__/accordion-have-to-match-in-open-state-with-focus.snap.png differ diff --git a/packages/dnb-eufemia/src/components/accordion/__tests__/__image_snapshots__/accordion-have-to-match-in-second-state.snap.png b/packages/dnb-eufemia/src/components/accordion/__tests__/__image_snapshots__/accordion-have-to-match-in-second-state.snap.png new file mode 100644 index 00000000000..186166e920a Binary files /dev/null and b/packages/dnb-eufemia/src/components/accordion/__tests__/__image_snapshots__/accordion-have-to-match-in-second-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/accordion/__tests__/__image_snapshots__/accordion-have-to-match-with-large-content.snap.png b/packages/dnb-eufemia/src/components/accordion/__tests__/__image_snapshots__/accordion-have-to-match-with-large-content.snap.png new file mode 100644 index 00000000000..7a0f47b75e3 Binary files /dev/null and b/packages/dnb-eufemia/src/components/accordion/__tests__/__image_snapshots__/accordion-have-to-match-with-large-content.snap.png differ diff --git a/packages/dnb-eufemia/src/components/accordion/__tests__/__image_snapshots__/accordion-have-to-match-with-plain-variant.snap.png b/packages/dnb-eufemia/src/components/accordion/__tests__/__image_snapshots__/accordion-have-to-match-with-plain-variant.snap.png new file mode 100644 index 00000000000..23be493199c Binary files /dev/null and b/packages/dnb-eufemia/src/components/accordion/__tests__/__image_snapshots__/accordion-have-to-match-with-plain-variant.snap.png differ diff --git a/packages/dnb-eufemia/src/components/accordion/__tests__/__snapshots__/accordion-screenshot-test-js-accordion-closed-screenshot-have-to-match-accordion-in-closed-state-1-fce8c.snap.png b/packages/dnb-eufemia/src/components/accordion/__tests__/__snapshots__/accordion-screenshot-test-js-accordion-closed-screenshot-have-to-match-accordion-in-closed-state-1-fce8c.snap.png deleted file mode 100644 index 677c9d691d7..00000000000 Binary files a/packages/dnb-eufemia/src/components/accordion/__tests__/__snapshots__/accordion-screenshot-test-js-accordion-closed-screenshot-have-to-match-accordion-in-closed-state-1-fce8c.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/accordion/__tests__/__snapshots__/accordion-screenshot-test-js-accordion-closed-screenshot-have-to-match-accordion-in-closed-state-with-focus-1-f9114.snap.png b/packages/dnb-eufemia/src/components/accordion/__tests__/__snapshots__/accordion-screenshot-test-js-accordion-closed-screenshot-have-to-match-accordion-in-closed-state-with-focus-1-f9114.snap.png deleted file mode 100644 index 7aa2519674a..00000000000 Binary files a/packages/dnb-eufemia/src/components/accordion/__tests__/__snapshots__/accordion-screenshot-test-js-accordion-closed-screenshot-have-to-match-accordion-in-closed-state-with-focus-1-f9114.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/accordion/__tests__/__snapshots__/accordion-screenshot-test-js-accordion-closed-screenshot-have-to-match-accordion-in-closed-state-with-hover-1-33af8.snap.png b/packages/dnb-eufemia/src/components/accordion/__tests__/__snapshots__/accordion-screenshot-test-js-accordion-closed-screenshot-have-to-match-accordion-in-closed-state-with-hover-1-33af8.snap.png deleted file mode 100644 index abb8e342f1b..00000000000 Binary files a/packages/dnb-eufemia/src/components/accordion/__tests__/__snapshots__/accordion-screenshot-test-js-accordion-closed-screenshot-have-to-match-accordion-in-closed-state-with-hover-1-33af8.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/accordion/__tests__/__snapshots__/accordion-screenshot-test-js-accordion-closed-screenshot-have-to-match-accordion-in-nested-accordions-1-f81b0.snap.png b/packages/dnb-eufemia/src/components/accordion/__tests__/__snapshots__/accordion-screenshot-test-js-accordion-closed-screenshot-have-to-match-accordion-in-nested-accordions-1-f81b0.snap.png deleted file mode 100644 index 77a0fc9d5a3..00000000000 Binary files a/packages/dnb-eufemia/src/components/accordion/__tests__/__snapshots__/accordion-screenshot-test-js-accordion-closed-screenshot-have-to-match-accordion-in-nested-accordions-1-f81b0.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/accordion/__tests__/__snapshots__/accordion-screenshot-test-js-accordion-closed-screenshot-have-to-match-accordion-in-open-state-with-focus-1-54d05.snap.png b/packages/dnb-eufemia/src/components/accordion/__tests__/__snapshots__/accordion-screenshot-test-js-accordion-closed-screenshot-have-to-match-accordion-in-open-state-with-focus-1-54d05.snap.png deleted file mode 100644 index be521d24bff..00000000000 Binary files a/packages/dnb-eufemia/src/components/accordion/__tests__/__snapshots__/accordion-screenshot-test-js-accordion-closed-screenshot-have-to-match-accordion-in-open-state-with-focus-1-54d05.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/accordion/__tests__/__snapshots__/accordion-screenshot-test-js-accordion-closed-screenshot-have-to-match-accordion-with-large-content-1-11efe.snap.png b/packages/dnb-eufemia/src/components/accordion/__tests__/__snapshots__/accordion-screenshot-test-js-accordion-closed-screenshot-have-to-match-accordion-with-large-content-1-11efe.snap.png deleted file mode 100644 index 3ddc985dff8..00000000000 Binary files a/packages/dnb-eufemia/src/components/accordion/__tests__/__snapshots__/accordion-screenshot-test-js-accordion-closed-screenshot-have-to-match-accordion-with-large-content-1-11efe.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/accordion/__tests__/__snapshots__/accordion-screenshot-test-js-accordion-container-screenshot-have-to-match-accordion-in-desktop-mode-1-18429.snap.png b/packages/dnb-eufemia/src/components/accordion/__tests__/__snapshots__/accordion-screenshot-test-js-accordion-container-screenshot-have-to-match-accordion-in-desktop-mode-1-18429.snap.png deleted file mode 100644 index d457a044a6a..00000000000 Binary files a/packages/dnb-eufemia/src/components/accordion/__tests__/__snapshots__/accordion-screenshot-test-js-accordion-container-screenshot-have-to-match-accordion-in-desktop-mode-1-18429.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/accordion/__tests__/__snapshots__/accordion-screenshot-test-js-accordion-container-screenshot-have-to-match-accordion-in-mobile-mode-1-c47c4.snap.png b/packages/dnb-eufemia/src/components/accordion/__tests__/__snapshots__/accordion-screenshot-test-js-accordion-container-screenshot-have-to-match-accordion-in-mobile-mode-1-c47c4.snap.png deleted file mode 100644 index 1ffe9c27d4a..00000000000 Binary files a/packages/dnb-eufemia/src/components/accordion/__tests__/__snapshots__/accordion-screenshot-test-js-accordion-container-screenshot-have-to-match-accordion-in-mobile-mode-1-c47c4.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/accordion/__tests__/__snapshots__/accordion-screenshot-test-js-accordion-group-screenshot-have-to-match-accordion-in-first-state-1-4a377.snap.png b/packages/dnb-eufemia/src/components/accordion/__tests__/__snapshots__/accordion-screenshot-test-js-accordion-group-screenshot-have-to-match-accordion-in-first-state-1-4a377.snap.png deleted file mode 100644 index 4db8446a618..00000000000 Binary files a/packages/dnb-eufemia/src/components/accordion/__tests__/__snapshots__/accordion-screenshot-test-js-accordion-group-screenshot-have-to-match-accordion-in-first-state-1-4a377.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/accordion/__tests__/__snapshots__/accordion-screenshot-test-js-accordion-group-screenshot-have-to-match-accordion-in-second-state-1-3097a.snap.png b/packages/dnb-eufemia/src/components/accordion/__tests__/__snapshots__/accordion-screenshot-test-js-accordion-group-screenshot-have-to-match-accordion-in-second-state-1-3097a.snap.png deleted file mode 100644 index e668b7a1773..00000000000 Binary files a/packages/dnb-eufemia/src/components/accordion/__tests__/__snapshots__/accordion-screenshot-test-js-accordion-group-screenshot-have-to-match-accordion-in-second-state-1-3097a.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/accordion/__tests__/__snapshots__/accordion-screenshot-test-js-accordion-plain-variant-screenshot-have-to-match-with-plain-variant-1-cb1e1.snap.png b/packages/dnb-eufemia/src/components/accordion/__tests__/__snapshots__/accordion-screenshot-test-js-accordion-plain-variant-screenshot-have-to-match-with-plain-variant-1-cb1e1.snap.png deleted file mode 100644 index fa78e4232d5..00000000000 Binary files a/packages/dnb-eufemia/src/components/accordion/__tests__/__snapshots__/accordion-screenshot-test-js-accordion-plain-variant-screenshot-have-to-match-with-plain-variant-1-cb1e1.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/autocomplete/__tests__/Autocomplete.screenshot.test.js b/packages/dnb-eufemia/src/components/autocomplete/__tests__/Autocomplete.screenshot.test.js deleted file mode 100644 index a46575f99ad..00000000000 --- a/packages/dnb-eufemia/src/components/autocomplete/__tests__/Autocomplete.screenshot.test.js +++ /dev/null @@ -1,122 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -describe('Autocomplete screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/autocomplete/demos', - }) - - it('have to match different sizes', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="autocomplete-sizes"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match disabled state', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="autocomplete-disabled"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match custom input width', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="autocomplete-input-width"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match autocomplete with drawer-button', async () => { - const screenshot = await testPageScreenshot({ - selector: - '[data-visual-test="autocomplete-drawer-button"] .dnb-autocomplete__inner', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the closed autocomplete', async () => { - const screenshot = await testPageScreenshot({ - selector: - '[data-visual-test="autocomplete-closed"] .dnb-autocomplete__inner', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match autocomplete with search result', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="autocomplete-drawer-search"]', - simulateSelector: - '[data-visual-test="autocomplete-drawer-search"] .dnb-autocomplete .dnb-input', - simulate: 'click', - style: { - height: '40rem', - }, - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match autocomplete opened list', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="autocomplete-opened"]', - simulateSelector: - '[data-visual-test="autocomplete-opened"] .focus-trigger .dnb-drawer-list:last-of-type li.first-of-type', - simulate: 'click', - style: { - height: '40rem', - }, - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match autocomplete with suffix value', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="autocomplete-suffix"]', - simulateSelector: - '[data-visual-test="autocomplete-suffix"] .dnb-autocomplete .dnb-input', - simulate: 'click', - style: { - height: '25rem', - }, - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the status with status_state info', async () => { - const screenshot = await testPageScreenshot({ - selector: - '[data-visual-test="autocomplete-status"] .dnb-autocomplete__inner', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Autocomplete screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/autocomplete/demos', - pageViewport: { - width: 600, - height: 600, - }, - }) - - it('have to match small screen autocomplete with suffix value', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="autocomplete-suffix"]', - simulateSelector: - '[data-visual-test="autocomplete-suffix"] .dnb-autocomplete .dnb-input', - simulate: 'click', - style: { - height: '31rem', - }, - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/components/autocomplete/__tests__/Autocomplete.screenshot.test.ts b/packages/dnb-eufemia/src/components/autocomplete/__tests__/Autocomplete.screenshot.test.ts new file mode 100644 index 00000000000..15aa975833f --- /dev/null +++ b/packages/dnb-eufemia/src/components/autocomplete/__tests__/Autocomplete.screenshot.test.ts @@ -0,0 +1,121 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { makeScreenshot } from '../../../core/jest/jestSetupScreenshots' + +describe('Autocomplete', () => { + const defaults = { + url: '/uilib/components/autocomplete/demos', + } + + it('have to match different sizes', async () => { + const screenshot = await makeScreenshot({ + ...defaults, + selector: '[data-visual-test="autocomplete-sizes"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match disabled state', async () => { + const screenshot = await makeScreenshot({ + ...defaults, + selector: '[data-visual-test="autocomplete-disabled"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match custom input width', async () => { + const screenshot = await makeScreenshot({ + ...defaults, + selector: '[data-visual-test="autocomplete-input-width"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match autocomplete with drawer-button', async () => { + const screenshot = await makeScreenshot({ + ...defaults, + selector: + '[data-visual-test="autocomplete-drawer-button"] .dnb-autocomplete__inner', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the closed autocomplete', async () => { + const screenshot = await makeScreenshot({ + ...defaults, + selector: + '[data-visual-test="autocomplete-closed"] .dnb-autocomplete__inner', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match autocomplete with search result', async () => { + const screenshot = await makeScreenshot({ + ...defaults, + selector: '[data-visual-test="autocomplete-drawer-search"]', + simulateSelector: + '[data-visual-test="autocomplete-drawer-search"] .dnb-autocomplete .dnb-input', + simulate: 'click', + style: { + height: '40rem', + }, + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match autocomplete opened list', async () => { + const screenshot = await makeScreenshot({ + ...defaults, + selector: '[data-visual-test="autocomplete-opened"]', + simulateSelector: + '[data-visual-test="autocomplete-opened"] .focus-trigger .dnb-drawer-list:last-of-type li.first-of-type', + waitAfterSimulate: 200, + simulate: 'click', + style: { + height: '40rem', + }, + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match autocomplete with suffix value', async () => { + const screenshot = await makeScreenshot({ + ...defaults, + selector: '[data-visual-test="autocomplete-suffix"]', + simulateSelector: + '[data-visual-test="autocomplete-suffix"] .dnb-autocomplete .dnb-input', + waitAfterSimulate: 200, + simulate: 'click', + style: { + height: '25rem', + }, + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the status with status_state info', async () => { + const screenshot = await testPageScreenshot({ + selector: + '[data-visual-test="autocomplete-status"] .dnb-autocomplete__inner', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match small screen autocomplete with suffix value', async () => { + const screenshot = await makeScreenshot({ + url: '/uilib/components/autocomplete/demos', + pageViewport: { + width: 700, + height: 100, + }, + selector: '[data-visual-test="autocomplete-suffix"]', + style: { + height: '4rem', + }, + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/components/autocomplete/__tests__/__image_snapshots__/autocomplete-have-to-match-autocomplete-opened-list.snap.png b/packages/dnb-eufemia/src/components/autocomplete/__tests__/__image_snapshots__/autocomplete-have-to-match-autocomplete-opened-list.snap.png new file mode 100644 index 00000000000..5ae374ffbd8 Binary files /dev/null and b/packages/dnb-eufemia/src/components/autocomplete/__tests__/__image_snapshots__/autocomplete-have-to-match-autocomplete-opened-list.snap.png differ diff --git a/packages/dnb-eufemia/src/components/autocomplete/__tests__/__image_snapshots__/autocomplete-have-to-match-autocomplete-with-drawer-button.snap.png b/packages/dnb-eufemia/src/components/autocomplete/__tests__/__image_snapshots__/autocomplete-have-to-match-autocomplete-with-drawer-button.snap.png new file mode 100644 index 00000000000..02adc1b9ae5 Binary files /dev/null and b/packages/dnb-eufemia/src/components/autocomplete/__tests__/__image_snapshots__/autocomplete-have-to-match-autocomplete-with-drawer-button.snap.png differ diff --git a/packages/dnb-eufemia/src/components/autocomplete/__tests__/__image_snapshots__/autocomplete-have-to-match-autocomplete-with-search-result.snap.png b/packages/dnb-eufemia/src/components/autocomplete/__tests__/__image_snapshots__/autocomplete-have-to-match-autocomplete-with-search-result.snap.png new file mode 100644 index 00000000000..3ebfe0aed06 Binary files /dev/null and b/packages/dnb-eufemia/src/components/autocomplete/__tests__/__image_snapshots__/autocomplete-have-to-match-autocomplete-with-search-result.snap.png differ diff --git a/packages/dnb-eufemia/src/components/autocomplete/__tests__/__image_snapshots__/autocomplete-have-to-match-autocomplete-with-suffix-value.snap.png b/packages/dnb-eufemia/src/components/autocomplete/__tests__/__image_snapshots__/autocomplete-have-to-match-autocomplete-with-suffix-value.snap.png new file mode 100644 index 00000000000..613e8b72d81 Binary files /dev/null and b/packages/dnb-eufemia/src/components/autocomplete/__tests__/__image_snapshots__/autocomplete-have-to-match-autocomplete-with-suffix-value.snap.png differ diff --git a/packages/dnb-eufemia/src/components/autocomplete/__tests__/__image_snapshots__/autocomplete-have-to-match-custom-input-width.snap.png b/packages/dnb-eufemia/src/components/autocomplete/__tests__/__image_snapshots__/autocomplete-have-to-match-custom-input-width.snap.png new file mode 100644 index 00000000000..5b10053e3d0 Binary files /dev/null and b/packages/dnb-eufemia/src/components/autocomplete/__tests__/__image_snapshots__/autocomplete-have-to-match-custom-input-width.snap.png differ diff --git a/packages/dnb-eufemia/src/components/autocomplete/__tests__/__image_snapshots__/autocomplete-have-to-match-different-sizes.snap.png b/packages/dnb-eufemia/src/components/autocomplete/__tests__/__image_snapshots__/autocomplete-have-to-match-different-sizes.snap.png new file mode 100644 index 00000000000..1bb205b8cbb Binary files /dev/null and b/packages/dnb-eufemia/src/components/autocomplete/__tests__/__image_snapshots__/autocomplete-have-to-match-different-sizes.snap.png differ diff --git a/packages/dnb-eufemia/src/components/autocomplete/__tests__/__image_snapshots__/autocomplete-have-to-match-disabled-state.snap.png b/packages/dnb-eufemia/src/components/autocomplete/__tests__/__image_snapshots__/autocomplete-have-to-match-disabled-state.snap.png new file mode 100644 index 00000000000..bc749c876db Binary files /dev/null and b/packages/dnb-eufemia/src/components/autocomplete/__tests__/__image_snapshots__/autocomplete-have-to-match-disabled-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/autocomplete/__tests__/__image_snapshots__/autocomplete-have-to-match-small-screen-autocomplete-with-suffix-value.snap.png b/packages/dnb-eufemia/src/components/autocomplete/__tests__/__image_snapshots__/autocomplete-have-to-match-small-screen-autocomplete-with-suffix-value.snap.png new file mode 100644 index 00000000000..c529a1c425d Binary files /dev/null and b/packages/dnb-eufemia/src/components/autocomplete/__tests__/__image_snapshots__/autocomplete-have-to-match-small-screen-autocomplete-with-suffix-value.snap.png differ diff --git a/packages/dnb-eufemia/src/components/autocomplete/__tests__/__image_snapshots__/autocomplete-have-to-match-the-closed-autocomplete.snap.png b/packages/dnb-eufemia/src/components/autocomplete/__tests__/__image_snapshots__/autocomplete-have-to-match-the-closed-autocomplete.snap.png new file mode 100644 index 00000000000..e2384501255 Binary files /dev/null and b/packages/dnb-eufemia/src/components/autocomplete/__tests__/__image_snapshots__/autocomplete-have-to-match-the-closed-autocomplete.snap.png differ diff --git a/packages/dnb-eufemia/src/components/autocomplete/__tests__/__snapshots__/Autocomplete.test.js.snap b/packages/dnb-eufemia/src/components/autocomplete/__tests__/__snapshots__/Autocomplete.test.js.snap index 9ae9db408ab..56ccde9ddc8 100644 --- a/packages/dnb-eufemia/src/components/autocomplete/__tests__/__snapshots__/Autocomplete.test.js.snap +++ b/packages/dnb-eufemia/src/components/autocomplete/__tests__/__snapshots__/Autocomplete.test.js.snap @@ -3921,6 +3921,18 @@ label + .dnb-dropdown[class*=__form-status] .dnb-dropdown__shell { width: auto; animation: progress-indicator-linear-bar-2 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite; } +html[data-visual-test] .dnb-progress-indicator__linear__bar1-animation { + left: -35%; + right: 100%; + animation-duration: 0ms; + animation-iteration-count: 0; +} +html[data-visual-test] .dnb-progress-indicator__linear__bar2-animation { + left: -200%; + right: 100%; + animation-duration: 0ms; + animation-iteration-count: 0; +} .dnb-progress-indicator, .dnb-progress-indicator--visible { opacity: 0; animation: progress-indicator-fade-in 200ms ease-out 1 forwards; @@ -3928,12 +3940,12 @@ label + .dnb-dropdown[class*=__form-status] .dnb-dropdown__shell { .dnb-progress-indicator--complete:not(.dnb-progress-indicator--visible) { animation: progress-indicator-fade-out 600ms ease-out 1 forwards; } -.dnb-progress-indicator--no-animation { +html[data-visual-test] .dnb-progress-indicator { + opacity: 1; animation-duration: 0ms; } -html[data-visual-test] .dnb-progress-indicator__circular__line { +.dnb-progress-indicator--no-animation { animation-duration: 0ms; - animation-iteration-count: 0; } html[data-visual-test] .dnb-progress-indicator__bar-transition { transition: none; diff --git a/packages/dnb-eufemia/src/components/autocomplete/__tests__/__snapshots__/autocomplete-screenshot-test-js-autocomplete-screenshot-have-to-match-autocomplete-opened-list-1-6cf75.snap.png b/packages/dnb-eufemia/src/components/autocomplete/__tests__/__snapshots__/autocomplete-screenshot-test-js-autocomplete-screenshot-have-to-match-autocomplete-opened-list-1-6cf75.snap.png deleted file mode 100644 index 92a3591278d..00000000000 Binary files a/packages/dnb-eufemia/src/components/autocomplete/__tests__/__snapshots__/autocomplete-screenshot-test-js-autocomplete-screenshot-have-to-match-autocomplete-opened-list-1-6cf75.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/autocomplete/__tests__/__snapshots__/autocomplete-screenshot-test-js-autocomplete-screenshot-have-to-match-autocomplete-with-drawer-button-1-1887c.snap.png b/packages/dnb-eufemia/src/components/autocomplete/__tests__/__snapshots__/autocomplete-screenshot-test-js-autocomplete-screenshot-have-to-match-autocomplete-with-drawer-button-1-1887c.snap.png deleted file mode 100644 index 780612c42d9..00000000000 Binary files a/packages/dnb-eufemia/src/components/autocomplete/__tests__/__snapshots__/autocomplete-screenshot-test-js-autocomplete-screenshot-have-to-match-autocomplete-with-drawer-button-1-1887c.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/autocomplete/__tests__/__snapshots__/autocomplete-screenshot-test-js-autocomplete-screenshot-have-to-match-autocomplete-with-search-result-1-ad9c8.snap.png b/packages/dnb-eufemia/src/components/autocomplete/__tests__/__snapshots__/autocomplete-screenshot-test-js-autocomplete-screenshot-have-to-match-autocomplete-with-search-result-1-ad9c8.snap.png deleted file mode 100644 index d3ebe550eef..00000000000 Binary files a/packages/dnb-eufemia/src/components/autocomplete/__tests__/__snapshots__/autocomplete-screenshot-test-js-autocomplete-screenshot-have-to-match-autocomplete-with-search-result-1-ad9c8.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/autocomplete/__tests__/__snapshots__/autocomplete-screenshot-test-js-autocomplete-screenshot-have-to-match-autocomplete-with-suffix-value-1-bae4c.snap.png b/packages/dnb-eufemia/src/components/autocomplete/__tests__/__snapshots__/autocomplete-screenshot-test-js-autocomplete-screenshot-have-to-match-autocomplete-with-suffix-value-1-bae4c.snap.png deleted file mode 100644 index f76fa918345..00000000000 Binary files a/packages/dnb-eufemia/src/components/autocomplete/__tests__/__snapshots__/autocomplete-screenshot-test-js-autocomplete-screenshot-have-to-match-autocomplete-with-suffix-value-1-bae4c.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/autocomplete/__tests__/__snapshots__/autocomplete-screenshot-test-js-autocomplete-screenshot-have-to-match-custom-input-width-1-41b4b.snap.png b/packages/dnb-eufemia/src/components/autocomplete/__tests__/__snapshots__/autocomplete-screenshot-test-js-autocomplete-screenshot-have-to-match-custom-input-width-1-41b4b.snap.png deleted file mode 100644 index 82935faca5d..00000000000 Binary files a/packages/dnb-eufemia/src/components/autocomplete/__tests__/__snapshots__/autocomplete-screenshot-test-js-autocomplete-screenshot-have-to-match-custom-input-width-1-41b4b.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/autocomplete/__tests__/__snapshots__/autocomplete-screenshot-test-js-autocomplete-screenshot-have-to-match-different-sizes-1-5f5d3.snap.png b/packages/dnb-eufemia/src/components/autocomplete/__tests__/__snapshots__/autocomplete-screenshot-test-js-autocomplete-screenshot-have-to-match-different-sizes-1-5f5d3.snap.png deleted file mode 100644 index ccd9cdb3803..00000000000 Binary files a/packages/dnb-eufemia/src/components/autocomplete/__tests__/__snapshots__/autocomplete-screenshot-test-js-autocomplete-screenshot-have-to-match-different-sizes-1-5f5d3.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/autocomplete/__tests__/__snapshots__/autocomplete-screenshot-test-js-autocomplete-screenshot-have-to-match-disabled-state-1-bd401.snap.png b/packages/dnb-eufemia/src/components/autocomplete/__tests__/__snapshots__/autocomplete-screenshot-test-js-autocomplete-screenshot-have-to-match-disabled-state-1-bd401.snap.png deleted file mode 100644 index b158ccc97fa..00000000000 Binary files a/packages/dnb-eufemia/src/components/autocomplete/__tests__/__snapshots__/autocomplete-screenshot-test-js-autocomplete-screenshot-have-to-match-disabled-state-1-bd401.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/autocomplete/__tests__/__snapshots__/autocomplete-screenshot-test-js-autocomplete-screenshot-have-to-match-small-screen-autocomplete-with-suffix-value-1-1e7f2.snap.png b/packages/dnb-eufemia/src/components/autocomplete/__tests__/__snapshots__/autocomplete-screenshot-test-js-autocomplete-screenshot-have-to-match-small-screen-autocomplete-with-suffix-value-1-1e7f2.snap.png deleted file mode 100644 index 5b87e551e40..00000000000 Binary files a/packages/dnb-eufemia/src/components/autocomplete/__tests__/__snapshots__/autocomplete-screenshot-test-js-autocomplete-screenshot-have-to-match-small-screen-autocomplete-with-suffix-value-1-1e7f2.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/autocomplete/__tests__/__snapshots__/autocomplete-screenshot-test-js-autocomplete-screenshot-have-to-match-the-closed-autocomplete-1-62dda.snap.png b/packages/dnb-eufemia/src/components/autocomplete/__tests__/__snapshots__/autocomplete-screenshot-test-js-autocomplete-screenshot-have-to-match-the-closed-autocomplete-1-62dda.snap.png deleted file mode 100644 index f1a9073cbe2..00000000000 Binary files a/packages/dnb-eufemia/src/components/autocomplete/__tests__/__snapshots__/autocomplete-screenshot-test-js-autocomplete-screenshot-have-to-match-the-closed-autocomplete-1-62dda.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/Avatar.screenshot.test.js b/packages/dnb-eufemia/src/components/avatar/__tests__/Avatar.screenshot.test.js deleted file mode 100644 index 52085ff5938..00000000000 --- a/packages/dnb-eufemia/src/components/avatar/__tests__/Avatar.screenshot.test.js +++ /dev/null @@ -1,177 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -describe('Avatar screenshot', () => { - setupPageScreenshot({ url: '/uilib/components/avatar/demos' }) - - describe('size', () => { - it('have to match default size', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="avatar-size-default"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match small size', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="avatar-size-small"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match medium size', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="avatar-size-medium"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match large size', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="avatar-size-large"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match x-large size', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="avatar-size-x-large"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - }) - - describe('variant', () => { - it('have to match default variant', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="avatar-variant-default"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match primary variant', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="avatar-variant-primary"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match secondary variant', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="avatar-variant-secondary"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match tertiary variant', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="avatar-variant-tertiary"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - }) - - describe('children', () => { - it('have to match icon of variant primary as children', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="avatar-children-icon-primary"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match icon of variant secondary as children', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="avatar-children-icon-secondary"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match icon of variant tertiary as children', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="avatar-children-icon-tertiary"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match logo as children', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="avatar-children-logo"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - }) - - describe('src', () => { - it('have to match png image of local src', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="avatar-image-local-png"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match svg image of local src', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="avatar-image-local-svg"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match image of external src', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="avatar-image-external"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match image when passing imgProps', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="avatar-image-props"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - }) - - describe('grouping', () => { - it('have to match grouping of small avatars', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="avatar-grouped-small"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match grouping of medium avatars', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="avatar-grouped-medium"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match grouping of large avatars', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="avatar-grouped-large"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match grouping of x-large avatars', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="avatar-grouped-x-large"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match grouping of img avatars', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="avatar-grouped-image"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - }) -}) diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/Avatar.screenshot.test.ts b/packages/dnb-eufemia/src/components/avatar/__tests__/Avatar.screenshot.test.ts new file mode 100644 index 00000000000..421ee6f45c2 --- /dev/null +++ b/packages/dnb-eufemia/src/components/avatar/__tests__/Avatar.screenshot.test.ts @@ -0,0 +1,177 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../../core/jest/jestSetupScreenshots' + +describe('Avatar', () => { + setupPageScreenshot({ url: '/uilib/components/avatar/demos' }) + + describe('size', () => { + it('have to match default size', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="avatar-size-default"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match small size', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="avatar-size-small"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match medium size', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="avatar-size-medium"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match large size', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="avatar-size-large"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match x-large size', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="avatar-size-x-large"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + }) + + describe('variant', () => { + it('have to match default variant', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="avatar-variant-default"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match primary variant', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="avatar-variant-primary"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match secondary variant', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="avatar-variant-secondary"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match tertiary variant', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="avatar-variant-tertiary"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + }) + + describe('children', () => { + it('have to match icon of variant primary as children', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="avatar-children-icon-primary"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match icon of variant secondary as children', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="avatar-children-icon-secondary"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match icon of variant tertiary as children', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="avatar-children-icon-tertiary"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match logo as children', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="avatar-children-logo"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + }) + + describe('src', () => { + it('have to match png image of local src', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="avatar-image-local-png"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match svg image of local src', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="avatar-image-local-svg"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match image of external src', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="avatar-image-external"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match image when passing imgProps', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="avatar-image-props"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + }) + + describe('grouping', () => { + it('have to match grouping of small avatars', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="avatar-grouped-small"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match grouping of medium avatars', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="avatar-grouped-medium"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match grouping of large avatars', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="avatar-grouped-large"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match grouping of x-large avatars', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="avatar-grouped-x-large"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match grouping of img avatars', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="avatar-grouped-image"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + }) +}) diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-children-have-to-match-icon-of-variant-primary-as-children.snap.png b/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-children-have-to-match-icon-of-variant-primary-as-children.snap.png new file mode 100644 index 00000000000..f0b6ce7346c Binary files /dev/null and b/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-children-have-to-match-icon-of-variant-primary-as-children.snap.png differ diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-children-have-to-match-icon-of-variant-secondary-as-children.snap.png b/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-children-have-to-match-icon-of-variant-secondary-as-children.snap.png new file mode 100644 index 00000000000..23f1029bdbe Binary files /dev/null and b/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-children-have-to-match-icon-of-variant-secondary-as-children.snap.png differ diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-children-have-to-match-icon-of-variant-tertiary-as-children.snap.png b/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-children-have-to-match-icon-of-variant-tertiary-as-children.snap.png new file mode 100644 index 00000000000..6bc5d9c9cff Binary files /dev/null and b/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-children-have-to-match-icon-of-variant-tertiary-as-children.snap.png differ diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-children-have-to-match-logo-as-children.snap.png b/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-children-have-to-match-logo-as-children.snap.png new file mode 100644 index 00000000000..0aa2b0d3357 Binary files /dev/null and b/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-children-have-to-match-logo-as-children.snap.png differ diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-grouping-have-to-match-grouping-of-img-avatars.snap.png b/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-grouping-have-to-match-grouping-of-img-avatars.snap.png new file mode 100644 index 00000000000..7691d9ab97d Binary files /dev/null and b/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-grouping-have-to-match-grouping-of-img-avatars.snap.png differ diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-grouping-have-to-match-grouping-of-large-avatars.snap.png b/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-grouping-have-to-match-grouping-of-large-avatars.snap.png new file mode 100644 index 00000000000..5b6a9794582 Binary files /dev/null and b/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-grouping-have-to-match-grouping-of-large-avatars.snap.png differ diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-grouping-have-to-match-grouping-of-medium-avatars.snap.png b/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-grouping-have-to-match-grouping-of-medium-avatars.snap.png new file mode 100644 index 00000000000..c54585205e1 Binary files /dev/null and b/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-grouping-have-to-match-grouping-of-medium-avatars.snap.png differ diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-grouping-have-to-match-grouping-of-small-avatars.snap.png b/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-grouping-have-to-match-grouping-of-small-avatars.snap.png new file mode 100644 index 00000000000..83a623cfb0c Binary files /dev/null and b/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-grouping-have-to-match-grouping-of-small-avatars.snap.png differ diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-grouping-have-to-match-grouping-of-x-large-avatars.snap.png b/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-grouping-have-to-match-grouping-of-x-large-avatars.snap.png new file mode 100644 index 00000000000..cb0c5fd00c9 Binary files /dev/null and b/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-grouping-have-to-match-grouping-of-x-large-avatars.snap.png differ diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-size-have-to-match-default-size.snap.png b/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-size-have-to-match-default-size.snap.png new file mode 100644 index 00000000000..3a7c3cbd8a2 Binary files /dev/null and b/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-size-have-to-match-default-size.snap.png differ diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-size-have-to-match-large-size.snap.png b/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-size-have-to-match-large-size.snap.png new file mode 100644 index 00000000000..1957249ae5f Binary files /dev/null and b/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-size-have-to-match-large-size.snap.png differ diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-size-have-to-match-medium-size.snap.png b/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-size-have-to-match-medium-size.snap.png new file mode 100644 index 00000000000..23e879ec954 Binary files /dev/null and b/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-size-have-to-match-medium-size.snap.png differ diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-size-have-to-match-small-size.snap.png b/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-size-have-to-match-small-size.snap.png new file mode 100644 index 00000000000..9bcb3b1cc7d Binary files /dev/null and b/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-size-have-to-match-small-size.snap.png differ diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-size-have-to-match-x-large-size.snap.png b/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-size-have-to-match-x-large-size.snap.png new file mode 100644 index 00000000000..d27af696679 Binary files /dev/null and b/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-size-have-to-match-x-large-size.snap.png differ diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-src-have-to-match-image-of-external-src.snap.png b/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-src-have-to-match-image-of-external-src.snap.png new file mode 100644 index 00000000000..7431abf7585 Binary files /dev/null and b/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-src-have-to-match-image-of-external-src.snap.png differ diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-src-have-to-match-image-when-passing-imgprops.snap.png b/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-src-have-to-match-image-when-passing-imgprops.snap.png new file mode 100644 index 00000000000..297e5f627c0 Binary files /dev/null and b/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-src-have-to-match-image-when-passing-imgprops.snap.png differ diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-src-have-to-match-png-image-of-local-src.snap.png b/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-src-have-to-match-png-image-of-local-src.snap.png new file mode 100644 index 00000000000..8f081c98193 Binary files /dev/null and b/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-src-have-to-match-png-image-of-local-src.snap.png differ diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-src-have-to-match-svg-image-of-local-src.snap.png b/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-src-have-to-match-svg-image-of-local-src.snap.png new file mode 100644 index 00000000000..bac8b881fe0 Binary files /dev/null and b/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-src-have-to-match-svg-image-of-local-src.snap.png differ diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-variant-have-to-match-default-variant.snap.png b/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-variant-have-to-match-default-variant.snap.png new file mode 100644 index 00000000000..2cca0ba3546 Binary files /dev/null and b/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-variant-have-to-match-default-variant.snap.png differ diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-variant-have-to-match-primary-variant.snap.png b/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-variant-have-to-match-primary-variant.snap.png new file mode 100644 index 00000000000..3a7c3cbd8a2 Binary files /dev/null and b/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-variant-have-to-match-primary-variant.snap.png differ diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-variant-have-to-match-secondary-variant.snap.png b/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-variant-have-to-match-secondary-variant.snap.png new file mode 100644 index 00000000000..16e498adc06 Binary files /dev/null and b/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-variant-have-to-match-secondary-variant.snap.png differ diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-variant-have-to-match-tertiary-variant.snap.png b/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-variant-have-to-match-tertiary-variant.snap.png new file mode 100644 index 00000000000..94af14f9b98 Binary files /dev/null and b/packages/dnb-eufemia/src/components/avatar/__tests__/__image_snapshots__/avatar-variant-have-to-match-tertiary-variant.snap.png differ diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-children-have-to-match-icon-of-variant-primary-as-children-1-8f383.snap.png b/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-children-have-to-match-icon-of-variant-primary-as-children-1-8f383.snap.png deleted file mode 100644 index 31e1e7ea072..00000000000 Binary files a/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-children-have-to-match-icon-of-variant-primary-as-children-1-8f383.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-children-have-to-match-icon-of-variant-secondary-as-children-1-08a3d.snap.png b/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-children-have-to-match-icon-of-variant-secondary-as-children-1-08a3d.snap.png deleted file mode 100644 index 9264b7b3e65..00000000000 Binary files a/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-children-have-to-match-icon-of-variant-secondary-as-children-1-08a3d.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-children-have-to-match-icon-of-variant-tertiary-as-children-1-e7ead.snap.png b/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-children-have-to-match-icon-of-variant-tertiary-as-children-1-e7ead.snap.png deleted file mode 100644 index f241873c646..00000000000 Binary files a/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-children-have-to-match-icon-of-variant-tertiary-as-children-1-e7ead.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-children-have-to-match-logo-as-children-1-46cdc.snap.png b/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-children-have-to-match-logo-as-children-1-46cdc.snap.png deleted file mode 100644 index 41d03a7c71c..00000000000 Binary files a/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-children-have-to-match-logo-as-children-1-46cdc.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-grouping-have-to-match-grouping-of-img-avatars-1-34d8d.snap.png b/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-grouping-have-to-match-grouping-of-img-avatars-1-34d8d.snap.png deleted file mode 100644 index 451ebcae318..00000000000 Binary files a/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-grouping-have-to-match-grouping-of-img-avatars-1-34d8d.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-grouping-have-to-match-grouping-of-large-avatars-1-4003c.snap.png b/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-grouping-have-to-match-grouping-of-large-avatars-1-4003c.snap.png deleted file mode 100644 index bfd1cd299a5..00000000000 Binary files a/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-grouping-have-to-match-grouping-of-large-avatars-1-4003c.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-grouping-have-to-match-grouping-of-medium-avatars-1-c4108.snap.png b/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-grouping-have-to-match-grouping-of-medium-avatars-1-c4108.snap.png deleted file mode 100644 index 0e252324736..00000000000 Binary files a/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-grouping-have-to-match-grouping-of-medium-avatars-1-c4108.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-grouping-have-to-match-grouping-of-small-avatars-1-9a812.snap.png b/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-grouping-have-to-match-grouping-of-small-avatars-1-9a812.snap.png deleted file mode 100644 index 5bfc36bbeaf..00000000000 Binary files a/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-grouping-have-to-match-grouping-of-small-avatars-1-9a812.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-grouping-have-to-match-grouping-of-x-large-avatars-1-df878.snap.png b/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-grouping-have-to-match-grouping-of-x-large-avatars-1-df878.snap.png deleted file mode 100644 index a255c74da8c..00000000000 Binary files a/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-grouping-have-to-match-grouping-of-x-large-avatars-1-df878.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-size-have-to-match-default-size-1-8e7a8.snap.png b/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-size-have-to-match-default-size-1-8e7a8.snap.png deleted file mode 100644 index 3513f7b56f1..00000000000 Binary files a/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-size-have-to-match-default-size-1-8e7a8.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-size-have-to-match-large-size-1-e443c.snap.png b/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-size-have-to-match-large-size-1-e443c.snap.png deleted file mode 100644 index be3f4dda065..00000000000 Binary files a/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-size-have-to-match-large-size-1-e443c.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-size-have-to-match-medium-size-1-7a038.snap.png b/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-size-have-to-match-medium-size-1-7a038.snap.png deleted file mode 100644 index 905f0233a55..00000000000 Binary files a/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-size-have-to-match-medium-size-1-7a038.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-size-have-to-match-small-size-1-101e7.snap.png b/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-size-have-to-match-small-size-1-101e7.snap.png deleted file mode 100644 index 8afb87ec813..00000000000 Binary files a/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-size-have-to-match-small-size-1-101e7.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-size-have-to-match-x-large-size-1-4487c.snap.png b/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-size-have-to-match-x-large-size-1-4487c.snap.png deleted file mode 100644 index 32cb3e161b9..00000000000 Binary files a/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-size-have-to-match-x-large-size-1-4487c.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-src-have-to-match-image-of-external-src-1-dd3e5.snap.png b/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-src-have-to-match-image-of-external-src-1-dd3e5.snap.png deleted file mode 100644 index 3924d879ada..00000000000 Binary files a/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-src-have-to-match-image-of-external-src-1-dd3e5.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-src-have-to-match-image-when-passing-img-props-1-14fa6.snap.png b/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-src-have-to-match-image-when-passing-img-props-1-14fa6.snap.png deleted file mode 100644 index fc41c77f47b..00000000000 Binary files a/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-src-have-to-match-image-when-passing-img-props-1-14fa6.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-src-have-to-match-png-image-of-local-src-1-a55c4.snap.png b/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-src-have-to-match-png-image-of-local-src-1-a55c4.snap.png deleted file mode 100644 index 247784e08f1..00000000000 Binary files a/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-src-have-to-match-png-image-of-local-src-1-a55c4.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-src-have-to-match-svg-image-of-local-src-1-44759.snap.png b/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-src-have-to-match-svg-image-of-local-src-1-44759.snap.png deleted file mode 100644 index c98687b909d..00000000000 Binary files a/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-src-have-to-match-svg-image-of-local-src-1-44759.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-variant-have-to-match-default-variant-1-22bd7.snap.png b/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-variant-have-to-match-default-variant-1-22bd7.snap.png deleted file mode 100644 index e565dee879b..00000000000 Binary files a/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-variant-have-to-match-default-variant-1-22bd7.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-variant-have-to-match-primary-variant-1-e7e35.snap.png b/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-variant-have-to-match-primary-variant-1-e7e35.snap.png deleted file mode 100644 index 3513f7b56f1..00000000000 Binary files a/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-variant-have-to-match-primary-variant-1-e7e35.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-variant-have-to-match-secondary-variant-1-d6086.snap.png b/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-variant-have-to-match-secondary-variant-1-d6086.snap.png deleted file mode 100644 index 27e834e976a..00000000000 Binary files a/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-variant-have-to-match-secondary-variant-1-d6086.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-variant-have-to-match-tertiary-variant-1-5b058.snap.png b/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-variant-have-to-match-tertiary-variant-1-5b058.snap.png deleted file mode 100644 index afee6bf6311..00000000000 Binary files a/packages/dnb-eufemia/src/components/avatar/__tests__/__snapshots__/avatar-screenshot-test-js-avatar-screenshot-variant-have-to-match-tertiary-variant-1-5b058.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/badge/__tests__/Badge.screenshot.test.js b/packages/dnb-eufemia/src/components/badge/__tests__/Badge.screenshot.test.js deleted file mode 100644 index 3b9163e0aea..00000000000 --- a/packages/dnb-eufemia/src/components/badge/__tests__/Badge.screenshot.test.js +++ /dev/null @@ -1,99 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -describe('Badge screenshot', () => { - setupPageScreenshot({ url: '/uilib/components/badge/demos' }) - describe('variant', () => { - it('have to match variant notification', async () => { - const screenshot = await testPageScreenshot({ - selector: - '[data-visual-test="badge-variant-notification"] .dnb-badge', - }) - expect(screenshot).toMatchImageSnapshot() - }) - it('have to match variant notification inline with text', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="badge-variant-notification-inline"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - it('have to match variant notification for avatar as content', async () => { - const screenshot = await testPageScreenshot({ - selector: - '[data-visual-test="badge-variant-notification-avatar"] .dnb-badge__root', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match variant information as default variant', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="badge-variant-default"] .dnb-badge', - }) - expect(screenshot).toMatchImageSnapshot() - }) - it('have to match variant information inline with text', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="badge-variant-information-inline"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - it('have to match variant information for avatar as content', async () => { - const screenshot = await testPageScreenshot({ - selector: - '[data-visual-test="badge-variant-information-avatar"] .dnb-badge__root', - }) - expect(screenshot).toMatchImageSnapshot() - }) - }) - describe('positioning', () => { - it('have to match top left positioning', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="badge-top-left"] .dnb-badge__root', - }) - expect(screenshot).toMatchImageSnapshot() - }) - it('have to match top right positioning', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="badge-top-right"] .dnb-badge__root', - }) - expect(screenshot).toMatchImageSnapshot() - }) - it('have to match bottom left positioning', async () => { - const screenshot = await testPageScreenshot({ - selector: - '[data-visual-test="badge-bottom-left"] .dnb-badge__root', - }) - expect(screenshot).toMatchImageSnapshot() - }) - it('have to match bottom right positioning', async () => { - const screenshot = await testPageScreenshot({ - selector: - '[data-visual-test="badge-bottom-right"] .dnb-badge__root', - }) - expect(screenshot).toMatchImageSnapshot() - }) - }) - describe('alternatives', () => { - it('have to match alternative having icon as a child', async () => { - const screenshot = await testPageScreenshot({ - selector: - '[data-visual-test="badge-alternative-icon"] .dnb-badge__root', - }) - expect(screenshot).toMatchImageSnapshot() - }) - it('have to match alternative having img as a child', async () => { - const screenshot = await testPageScreenshot({ - selector: - '[data-visual-test="badge-alternative-img"] .dnb-badge__root', - }) - expect(screenshot).toMatchImageSnapshot() - }) - }) -}) diff --git a/packages/dnb-eufemia/src/components/badge/__tests__/Badge.screenshot.test.ts b/packages/dnb-eufemia/src/components/badge/__tests__/Badge.screenshot.test.ts new file mode 100644 index 00000000000..c6a6c4e65bb --- /dev/null +++ b/packages/dnb-eufemia/src/components/badge/__tests__/Badge.screenshot.test.ts @@ -0,0 +1,99 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../../core/jest/jestSetupScreenshots' + +describe('Badge', () => { + setupPageScreenshot({ url: '/uilib/components/badge/demos' }) + describe('variant', () => { + it('have to match variant notification', async () => { + const screenshot = await makeScreenshot({ + selector: + '[data-visual-test="badge-variant-notification"] .dnb-badge', + }) + expect(screenshot).toMatchImageSnapshot() + }) + it('have to match variant notification inline with text', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="badge-variant-notification-inline"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + it('have to match variant notification for avatar as content', async () => { + const screenshot = await makeScreenshot({ + selector: + '[data-visual-test="badge-variant-notification-avatar"] .dnb-badge__root', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match variant information as default variant', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="badge-variant-default"] .dnb-badge', + }) + expect(screenshot).toMatchImageSnapshot() + }) + it('have to match variant information inline with text', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="badge-variant-information-inline"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + it('have to match variant information for avatar as content', async () => { + const screenshot = await makeScreenshot({ + selector: + '[data-visual-test="badge-variant-information-avatar"] .dnb-badge__root', + }) + expect(screenshot).toMatchImageSnapshot() + }) + }) + describe('positioning', () => { + it('have to match top left positioning', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="badge-top-left"] .dnb-badge__root', + }) + expect(screenshot).toMatchImageSnapshot() + }) + it('have to match top right positioning', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="badge-top-right"] .dnb-badge__root', + }) + expect(screenshot).toMatchImageSnapshot() + }) + it('have to match bottom left positioning', async () => { + const screenshot = await makeScreenshot({ + selector: + '[data-visual-test="badge-bottom-left"] .dnb-badge__root', + }) + expect(screenshot).toMatchImageSnapshot() + }) + it('have to match bottom right positioning', async () => { + const screenshot = await makeScreenshot({ + selector: + '[data-visual-test="badge-bottom-right"] .dnb-badge__root', + }) + expect(screenshot).toMatchImageSnapshot() + }) + }) + describe('alternatives', () => { + it('have to match alternative having icon as a child', async () => { + const screenshot = await makeScreenshot({ + selector: + '[data-visual-test="badge-alternative-icon"] .dnb-badge__root', + }) + expect(screenshot).toMatchImageSnapshot() + }) + it('have to match alternative having img as a child', async () => { + const screenshot = await makeScreenshot({ + selector: + '[data-visual-test="badge-alternative-img"] .dnb-badge__root', + }) + expect(screenshot).toMatchImageSnapshot() + }) + }) +}) diff --git a/packages/dnb-eufemia/src/components/badge/__tests__/__image_snapshots__/badge-alternatives-have-to-match-alternative-having-icon-as-a-child.snap.png b/packages/dnb-eufemia/src/components/badge/__tests__/__image_snapshots__/badge-alternatives-have-to-match-alternative-having-icon-as-a-child.snap.png new file mode 100644 index 00000000000..bdf746b86ab Binary files /dev/null and b/packages/dnb-eufemia/src/components/badge/__tests__/__image_snapshots__/badge-alternatives-have-to-match-alternative-having-icon-as-a-child.snap.png differ diff --git a/packages/dnb-eufemia/src/components/badge/__tests__/__image_snapshots__/badge-alternatives-have-to-match-alternative-having-img-as-a-child.snap.png b/packages/dnb-eufemia/src/components/badge/__tests__/__image_snapshots__/badge-alternatives-have-to-match-alternative-having-img-as-a-child.snap.png new file mode 100644 index 00000000000..1712bc56261 Binary files /dev/null and b/packages/dnb-eufemia/src/components/badge/__tests__/__image_snapshots__/badge-alternatives-have-to-match-alternative-having-img-as-a-child.snap.png differ diff --git a/packages/dnb-eufemia/src/components/badge/__tests__/__image_snapshots__/badge-positioning-have-to-match-bottom-left-positioning.snap.png b/packages/dnb-eufemia/src/components/badge/__tests__/__image_snapshots__/badge-positioning-have-to-match-bottom-left-positioning.snap.png new file mode 100644 index 00000000000..89948899f5b Binary files /dev/null and b/packages/dnb-eufemia/src/components/badge/__tests__/__image_snapshots__/badge-positioning-have-to-match-bottom-left-positioning.snap.png differ diff --git a/packages/dnb-eufemia/src/components/badge/__tests__/__image_snapshots__/badge-positioning-have-to-match-bottom-right-positioning.snap.png b/packages/dnb-eufemia/src/components/badge/__tests__/__image_snapshots__/badge-positioning-have-to-match-bottom-right-positioning.snap.png new file mode 100644 index 00000000000..c4409f5b5db Binary files /dev/null and b/packages/dnb-eufemia/src/components/badge/__tests__/__image_snapshots__/badge-positioning-have-to-match-bottom-right-positioning.snap.png differ diff --git a/packages/dnb-eufemia/src/components/badge/__tests__/__image_snapshots__/badge-positioning-have-to-match-top-left-positioning.snap.png b/packages/dnb-eufemia/src/components/badge/__tests__/__image_snapshots__/badge-positioning-have-to-match-top-left-positioning.snap.png new file mode 100644 index 00000000000..c4cbfd3c668 Binary files /dev/null and b/packages/dnb-eufemia/src/components/badge/__tests__/__image_snapshots__/badge-positioning-have-to-match-top-left-positioning.snap.png differ diff --git a/packages/dnb-eufemia/src/components/badge/__tests__/__image_snapshots__/badge-positioning-have-to-match-top-right-positioning.snap.png b/packages/dnb-eufemia/src/components/badge/__tests__/__image_snapshots__/badge-positioning-have-to-match-top-right-positioning.snap.png new file mode 100644 index 00000000000..dce89646e4d Binary files /dev/null and b/packages/dnb-eufemia/src/components/badge/__tests__/__image_snapshots__/badge-positioning-have-to-match-top-right-positioning.snap.png differ diff --git a/packages/dnb-eufemia/src/components/badge/__tests__/__image_snapshots__/badge-variant-have-to-match-variant-information-as-default-variant.snap.png b/packages/dnb-eufemia/src/components/badge/__tests__/__image_snapshots__/badge-variant-have-to-match-variant-information-as-default-variant.snap.png new file mode 100644 index 00000000000..0d3bf84bfff Binary files /dev/null and b/packages/dnb-eufemia/src/components/badge/__tests__/__image_snapshots__/badge-variant-have-to-match-variant-information-as-default-variant.snap.png differ diff --git a/packages/dnb-eufemia/src/components/badge/__tests__/__image_snapshots__/badge-variant-have-to-match-variant-information-for-avatar-as-content.snap.png b/packages/dnb-eufemia/src/components/badge/__tests__/__image_snapshots__/badge-variant-have-to-match-variant-information-for-avatar-as-content.snap.png new file mode 100644 index 00000000000..0ba47075999 Binary files /dev/null and b/packages/dnb-eufemia/src/components/badge/__tests__/__image_snapshots__/badge-variant-have-to-match-variant-information-for-avatar-as-content.snap.png differ diff --git a/packages/dnb-eufemia/src/components/badge/__tests__/__image_snapshots__/badge-variant-have-to-match-variant-information-inline-with-text.snap.png b/packages/dnb-eufemia/src/components/badge/__tests__/__image_snapshots__/badge-variant-have-to-match-variant-information-inline-with-text.snap.png new file mode 100644 index 00000000000..81e09cd51db Binary files /dev/null and b/packages/dnb-eufemia/src/components/badge/__tests__/__image_snapshots__/badge-variant-have-to-match-variant-information-inline-with-text.snap.png differ diff --git a/packages/dnb-eufemia/src/components/badge/__tests__/__image_snapshots__/badge-variant-have-to-match-variant-notification-for-avatar-as-content.snap.png b/packages/dnb-eufemia/src/components/badge/__tests__/__image_snapshots__/badge-variant-have-to-match-variant-notification-for-avatar-as-content.snap.png new file mode 100644 index 00000000000..938b6266ee5 Binary files /dev/null and b/packages/dnb-eufemia/src/components/badge/__tests__/__image_snapshots__/badge-variant-have-to-match-variant-notification-for-avatar-as-content.snap.png differ diff --git a/packages/dnb-eufemia/src/components/badge/__tests__/__image_snapshots__/badge-variant-have-to-match-variant-notification-inline-with-text.snap.png b/packages/dnb-eufemia/src/components/badge/__tests__/__image_snapshots__/badge-variant-have-to-match-variant-notification-inline-with-text.snap.png new file mode 100644 index 00000000000..95b67d02839 Binary files /dev/null and b/packages/dnb-eufemia/src/components/badge/__tests__/__image_snapshots__/badge-variant-have-to-match-variant-notification-inline-with-text.snap.png differ diff --git a/packages/dnb-eufemia/src/components/badge/__tests__/__image_snapshots__/badge-variant-have-to-match-variant-notification.snap.png b/packages/dnb-eufemia/src/components/badge/__tests__/__image_snapshots__/badge-variant-have-to-match-variant-notification.snap.png new file mode 100644 index 00000000000..219e2929983 Binary files /dev/null and b/packages/dnb-eufemia/src/components/badge/__tests__/__image_snapshots__/badge-variant-have-to-match-variant-notification.snap.png differ diff --git a/packages/dnb-eufemia/src/components/badge/__tests__/__snapshots__/badge-screenshot-test-js-badge-screenshot-alternatives-have-to-match-alternative-having-icon-as-a-child-1-a469d.snap.png b/packages/dnb-eufemia/src/components/badge/__tests__/__snapshots__/badge-screenshot-test-js-badge-screenshot-alternatives-have-to-match-alternative-having-icon-as-a-child-1-a469d.snap.png deleted file mode 100644 index 9b84c7900e5..00000000000 Binary files a/packages/dnb-eufemia/src/components/badge/__tests__/__snapshots__/badge-screenshot-test-js-badge-screenshot-alternatives-have-to-match-alternative-having-icon-as-a-child-1-a469d.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/badge/__tests__/__snapshots__/badge-screenshot-test-js-badge-screenshot-alternatives-have-to-match-alternative-having-img-as-a-child-1-40538.snap.png b/packages/dnb-eufemia/src/components/badge/__tests__/__snapshots__/badge-screenshot-test-js-badge-screenshot-alternatives-have-to-match-alternative-having-img-as-a-child-1-40538.snap.png deleted file mode 100644 index dc2abcd4b1c..00000000000 Binary files a/packages/dnb-eufemia/src/components/badge/__tests__/__snapshots__/badge-screenshot-test-js-badge-screenshot-alternatives-have-to-match-alternative-having-img-as-a-child-1-40538.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/badge/__tests__/__snapshots__/badge-screenshot-test-js-badge-screenshot-positioning-have-to-match-bottom-left-positioning-1-7e19b.snap.png b/packages/dnb-eufemia/src/components/badge/__tests__/__snapshots__/badge-screenshot-test-js-badge-screenshot-positioning-have-to-match-bottom-left-positioning-1-7e19b.snap.png deleted file mode 100644 index d7bb7c46cdc..00000000000 Binary files a/packages/dnb-eufemia/src/components/badge/__tests__/__snapshots__/badge-screenshot-test-js-badge-screenshot-positioning-have-to-match-bottom-left-positioning-1-7e19b.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/badge/__tests__/__snapshots__/badge-screenshot-test-js-badge-screenshot-positioning-have-to-match-bottom-right-positioning-1-33f3f.snap.png b/packages/dnb-eufemia/src/components/badge/__tests__/__snapshots__/badge-screenshot-test-js-badge-screenshot-positioning-have-to-match-bottom-right-positioning-1-33f3f.snap.png deleted file mode 100644 index 0d863b1e8ef..00000000000 Binary files a/packages/dnb-eufemia/src/components/badge/__tests__/__snapshots__/badge-screenshot-test-js-badge-screenshot-positioning-have-to-match-bottom-right-positioning-1-33f3f.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/badge/__tests__/__snapshots__/badge-screenshot-test-js-badge-screenshot-positioning-have-to-match-top-left-positioning-1-4e8be.snap.png b/packages/dnb-eufemia/src/components/badge/__tests__/__snapshots__/badge-screenshot-test-js-badge-screenshot-positioning-have-to-match-top-left-positioning-1-4e8be.snap.png deleted file mode 100644 index c3d5f3a317d..00000000000 Binary files a/packages/dnb-eufemia/src/components/badge/__tests__/__snapshots__/badge-screenshot-test-js-badge-screenshot-positioning-have-to-match-top-left-positioning-1-4e8be.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/badge/__tests__/__snapshots__/badge-screenshot-test-js-badge-screenshot-positioning-have-to-match-top-right-positioning-1-1da84.snap.png b/packages/dnb-eufemia/src/components/badge/__tests__/__snapshots__/badge-screenshot-test-js-badge-screenshot-positioning-have-to-match-top-right-positioning-1-1da84.snap.png deleted file mode 100644 index 443388aa98e..00000000000 Binary files a/packages/dnb-eufemia/src/components/badge/__tests__/__snapshots__/badge-screenshot-test-js-badge-screenshot-positioning-have-to-match-top-right-positioning-1-1da84.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/badge/__tests__/__snapshots__/badge-screenshot-test-js-badge-screenshot-variant-have-to-match-variant-information-as-default-variant-1-a2182.snap.png b/packages/dnb-eufemia/src/components/badge/__tests__/__snapshots__/badge-screenshot-test-js-badge-screenshot-variant-have-to-match-variant-information-as-default-variant-1-a2182.snap.png deleted file mode 100644 index b0a240ead67..00000000000 Binary files a/packages/dnb-eufemia/src/components/badge/__tests__/__snapshots__/badge-screenshot-test-js-badge-screenshot-variant-have-to-match-variant-information-as-default-variant-1-a2182.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/badge/__tests__/__snapshots__/badge-screenshot-test-js-badge-screenshot-variant-have-to-match-variant-information-for-avatar-as-content-1-f8c09.snap.png b/packages/dnb-eufemia/src/components/badge/__tests__/__snapshots__/badge-screenshot-test-js-badge-screenshot-variant-have-to-match-variant-information-for-avatar-as-content-1-f8c09.snap.png deleted file mode 100644 index 3787cd81719..00000000000 Binary files a/packages/dnb-eufemia/src/components/badge/__tests__/__snapshots__/badge-screenshot-test-js-badge-screenshot-variant-have-to-match-variant-information-for-avatar-as-content-1-f8c09.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/badge/__tests__/__snapshots__/badge-screenshot-test-js-badge-screenshot-variant-have-to-match-variant-information-inline-with-text-1-53324.snap.png b/packages/dnb-eufemia/src/components/badge/__tests__/__snapshots__/badge-screenshot-test-js-badge-screenshot-variant-have-to-match-variant-information-inline-with-text-1-53324.snap.png deleted file mode 100644 index 5c0ca87e08b..00000000000 Binary files a/packages/dnb-eufemia/src/components/badge/__tests__/__snapshots__/badge-screenshot-test-js-badge-screenshot-variant-have-to-match-variant-information-inline-with-text-1-53324.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/badge/__tests__/__snapshots__/badge-screenshot-test-js-badge-screenshot-variant-have-to-match-variant-notification-1-f3afe.snap.png b/packages/dnb-eufemia/src/components/badge/__tests__/__snapshots__/badge-screenshot-test-js-badge-screenshot-variant-have-to-match-variant-notification-1-f3afe.snap.png deleted file mode 100644 index 6292a21434b..00000000000 Binary files a/packages/dnb-eufemia/src/components/badge/__tests__/__snapshots__/badge-screenshot-test-js-badge-screenshot-variant-have-to-match-variant-notification-1-f3afe.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/badge/__tests__/__snapshots__/badge-screenshot-test-js-badge-screenshot-variant-have-to-match-variant-notification-for-avatar-as-content-1-df39e.snap.png b/packages/dnb-eufemia/src/components/badge/__tests__/__snapshots__/badge-screenshot-test-js-badge-screenshot-variant-have-to-match-variant-notification-for-avatar-as-content-1-df39e.snap.png deleted file mode 100644 index aad5965d68b..00000000000 Binary files a/packages/dnb-eufemia/src/components/badge/__tests__/__snapshots__/badge-screenshot-test-js-badge-screenshot-variant-have-to-match-variant-notification-for-avatar-as-content-1-df39e.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/badge/__tests__/__snapshots__/badge-screenshot-test-js-badge-screenshot-variant-have-to-match-variant-notification-inline-with-text-1-6f56f.snap.png b/packages/dnb-eufemia/src/components/badge/__tests__/__snapshots__/badge-screenshot-test-js-badge-screenshot-variant-have-to-match-variant-notification-inline-with-text-1-6f56f.snap.png deleted file mode 100644 index c703da3ce4e..00000000000 Binary files a/packages/dnb-eufemia/src/components/badge/__tests__/__snapshots__/badge-screenshot-test-js-badge-screenshot-variant-have-to-match-variant-notification-inline-with-text-1-6f56f.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/breadcrumb/__tests__/Breadcrumb.screenshot.test.ts b/packages/dnb-eufemia/src/components/breadcrumb/__tests__/Breadcrumb.screenshot.test.ts index b0ca5d96591..18774e04c0b 100644 --- a/packages/dnb-eufemia/src/components/breadcrumb/__tests__/Breadcrumb.screenshot.test.ts +++ b/packages/dnb-eufemia/src/components/breadcrumb/__tests__/Breadcrumb.screenshot.test.ts @@ -4,29 +4,29 @@ */ import { - testPageScreenshot, + makeScreenshot, setupPageScreenshot, } from '../../../core/jest/jestSetupScreenshots' -describe('Breadcrumb screenshot', () => { +describe('Breadcrumb', () => { setupPageScreenshot({ url: '/uilib/components/breadcrumb/demos' }) it('have to match Breadcrumb single', async () => { - const screenshot = await testPageScreenshot({ + const screenshot = await makeScreenshot({ selector: '[data-visual-test="breadcrumb-single"] .dnb-breadcrumb', }) expect(screenshot).toMatchImageSnapshot() }) it('have to match Breadcrumb multiple', async () => { - const screenshot = await testPageScreenshot({ + const screenshot = await makeScreenshot({ selector: '[data-visual-test="breadcrumb-multiple"] .dnb-breadcrumb', }) expect(screenshot).toMatchImageSnapshot() }) it('have to match Breadcrumb multiple with children', async () => { - const screenshot = await testPageScreenshot({ + const screenshot = await makeScreenshot({ selector: '[data-visual-test="breadcrumb-multiple-children"] .dnb-breadcrumb', }) @@ -34,14 +34,14 @@ describe('Breadcrumb screenshot', () => { }) it('have to match Breadcrumb collapse', async () => { - const screenshot = await testPageScreenshot({ + const screenshot = await makeScreenshot({ selector: '[data-visual-test="breadcrumb-collapse"] .dnb-breadcrumb', }) expect(screenshot).toMatchImageSnapshot() }) it('have to match Breadcrumb collapse opened', async () => { - const screenshot = await testPageScreenshot({ + const screenshot = await makeScreenshot({ selector: '[data-visual-test="breadcrumb-collapse-open"] .dnb-breadcrumb', }) @@ -49,7 +49,7 @@ describe('Breadcrumb screenshot', () => { }) it('have to match Breadcrumb focus state', async () => { - const screenshot = await testPageScreenshot({ + const screenshot = await makeScreenshot({ selector: '[data-visual-test="breadcrumb-multiple"] .dnb-breadcrumb', screenshotSelector: '[data-visual-test="breadcrumb-multiple"] .dnb-breadcrumb .dnb-breadcrumb__bar', diff --git a/packages/dnb-eufemia/src/components/breadcrumb/__tests__/__image_snapshots__/breadcrumb-have-to-match-breadcrumb-collapse-opened.snap.png b/packages/dnb-eufemia/src/components/breadcrumb/__tests__/__image_snapshots__/breadcrumb-have-to-match-breadcrumb-collapse-opened.snap.png new file mode 100644 index 00000000000..701da646e5d Binary files /dev/null and b/packages/dnb-eufemia/src/components/breadcrumb/__tests__/__image_snapshots__/breadcrumb-have-to-match-breadcrumb-collapse-opened.snap.png differ diff --git a/packages/dnb-eufemia/src/components/breadcrumb/__tests__/__image_snapshots__/breadcrumb-have-to-match-breadcrumb-collapse.snap.png b/packages/dnb-eufemia/src/components/breadcrumb/__tests__/__image_snapshots__/breadcrumb-have-to-match-breadcrumb-collapse.snap.png new file mode 100644 index 00000000000..b2049404f7f Binary files /dev/null and b/packages/dnb-eufemia/src/components/breadcrumb/__tests__/__image_snapshots__/breadcrumb-have-to-match-breadcrumb-collapse.snap.png differ diff --git a/packages/dnb-eufemia/src/components/breadcrumb/__tests__/__image_snapshots__/breadcrumb-have-to-match-breadcrumb-focus-state.snap.png b/packages/dnb-eufemia/src/components/breadcrumb/__tests__/__image_snapshots__/breadcrumb-have-to-match-breadcrumb-focus-state.snap.png new file mode 100644 index 00000000000..ab4b6f0b40a Binary files /dev/null and b/packages/dnb-eufemia/src/components/breadcrumb/__tests__/__image_snapshots__/breadcrumb-have-to-match-breadcrumb-focus-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/breadcrumb/__tests__/__image_snapshots__/breadcrumb-have-to-match-breadcrumb-multiple-with-children.snap.png b/packages/dnb-eufemia/src/components/breadcrumb/__tests__/__image_snapshots__/breadcrumb-have-to-match-breadcrumb-multiple-with-children.snap.png new file mode 100644 index 00000000000..289e60ce240 Binary files /dev/null and b/packages/dnb-eufemia/src/components/breadcrumb/__tests__/__image_snapshots__/breadcrumb-have-to-match-breadcrumb-multiple-with-children.snap.png differ diff --git a/packages/dnb-eufemia/src/components/breadcrumb/__tests__/__image_snapshots__/breadcrumb-have-to-match-breadcrumb-multiple.snap.png b/packages/dnb-eufemia/src/components/breadcrumb/__tests__/__image_snapshots__/breadcrumb-have-to-match-breadcrumb-multiple.snap.png new file mode 100644 index 00000000000..4526381ee0f Binary files /dev/null and b/packages/dnb-eufemia/src/components/breadcrumb/__tests__/__image_snapshots__/breadcrumb-have-to-match-breadcrumb-multiple.snap.png differ diff --git a/packages/dnb-eufemia/src/components/breadcrumb/__tests__/__image_snapshots__/breadcrumb-have-to-match-breadcrumb-single.snap.png b/packages/dnb-eufemia/src/components/breadcrumb/__tests__/__image_snapshots__/breadcrumb-have-to-match-breadcrumb-single.snap.png new file mode 100644 index 00000000000..c7db3fb33ee Binary files /dev/null and b/packages/dnb-eufemia/src/components/breadcrumb/__tests__/__image_snapshots__/breadcrumb-have-to-match-breadcrumb-single.snap.png differ diff --git a/packages/dnb-eufemia/src/components/breadcrumb/__tests__/__snapshots__/breadcrumb-screenshot-test-ts-breadcrumb-screenshot-have-to-match-breadcrumb-collapse-1-c7a95.snap.png b/packages/dnb-eufemia/src/components/breadcrumb/__tests__/__snapshots__/breadcrumb-screenshot-test-ts-breadcrumb-screenshot-have-to-match-breadcrumb-collapse-1-c7a95.snap.png deleted file mode 100644 index 2b2815d34b2..00000000000 Binary files a/packages/dnb-eufemia/src/components/breadcrumb/__tests__/__snapshots__/breadcrumb-screenshot-test-ts-breadcrumb-screenshot-have-to-match-breadcrumb-collapse-1-c7a95.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/breadcrumb/__tests__/__snapshots__/breadcrumb-screenshot-test-ts-breadcrumb-screenshot-have-to-match-breadcrumb-collapse-opened-1-f4b6d.snap.png b/packages/dnb-eufemia/src/components/breadcrumb/__tests__/__snapshots__/breadcrumb-screenshot-test-ts-breadcrumb-screenshot-have-to-match-breadcrumb-collapse-opened-1-f4b6d.snap.png deleted file mode 100644 index c7acc8c2c5f..00000000000 Binary files a/packages/dnb-eufemia/src/components/breadcrumb/__tests__/__snapshots__/breadcrumb-screenshot-test-ts-breadcrumb-screenshot-have-to-match-breadcrumb-collapse-opened-1-f4b6d.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/breadcrumb/__tests__/__snapshots__/breadcrumb-screenshot-test-ts-breadcrumb-screenshot-have-to-match-breadcrumb-multiple-1-46050.snap.png b/packages/dnb-eufemia/src/components/breadcrumb/__tests__/__snapshots__/breadcrumb-screenshot-test-ts-breadcrumb-screenshot-have-to-match-breadcrumb-multiple-1-46050.snap.png deleted file mode 100644 index 0e20272bfa3..00000000000 Binary files a/packages/dnb-eufemia/src/components/breadcrumb/__tests__/__snapshots__/breadcrumb-screenshot-test-ts-breadcrumb-screenshot-have-to-match-breadcrumb-multiple-1-46050.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/breadcrumb/__tests__/__snapshots__/breadcrumb-screenshot-test-ts-breadcrumb-screenshot-have-to-match-breadcrumb-multiple-with-children-1-a7948.snap.png b/packages/dnb-eufemia/src/components/breadcrumb/__tests__/__snapshots__/breadcrumb-screenshot-test-ts-breadcrumb-screenshot-have-to-match-breadcrumb-multiple-with-children-1-a7948.snap.png deleted file mode 100644 index 6ff9d8e6c39..00000000000 Binary files a/packages/dnb-eufemia/src/components/breadcrumb/__tests__/__snapshots__/breadcrumb-screenshot-test-ts-breadcrumb-screenshot-have-to-match-breadcrumb-multiple-with-children-1-a7948.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/breadcrumb/__tests__/__snapshots__/breadcrumb-screenshot-test-ts-breadcrumb-screenshot-have-to-match-breadcrumb-single-1-21525.snap.png b/packages/dnb-eufemia/src/components/breadcrumb/__tests__/__snapshots__/breadcrumb-screenshot-test-ts-breadcrumb-screenshot-have-to-match-breadcrumb-single-1-21525.snap.png deleted file mode 100644 index 5b4ac520fbb..00000000000 Binary files a/packages/dnb-eufemia/src/components/breadcrumb/__tests__/__snapshots__/breadcrumb-screenshot-test-ts-breadcrumb-screenshot-have-to-match-breadcrumb-single-1-21525.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/Button.screenshot.test.js b/packages/dnb-eufemia/src/components/button/__tests__/Button.screenshot.test.js deleted file mode 100644 index f60be0e1511..00000000000 --- a/packages/dnb-eufemia/src/components/button/__tests__/Button.screenshot.test.js +++ /dev/null @@ -1,279 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - isCI, - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -describe('Button primary screenshot', () => { - setupPageScreenshot({ url: '/uilib/components/button/demos' }) - - if (!isCI) { - it('have to match primary button with href', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="button-anchor"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - } - - it('have to match "dnb-button--primary"', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="button-primary"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match "dnb-button--primary" with focus state', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="button-primary"]', - simulate: 'focus', // should be tested first - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match "dnb-button--primary" with hover state', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="button-primary"]', - simulate: 'hover', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match a stretched button', async () => { - const screenshot = await testPageScreenshot({ - style: { - 'min-width': '20rem', - }, - selector: '[data-visual-test="button-stretch"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match "dnb-button--primary" with active state', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="button-primary"]', - simulate: 'active', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Button secondary screenshot', () => { - setupPageScreenshot({ url: '/uilib/components/button/demos' }) - - it('have to match "dnb-button--secondary"', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="button-secondary"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match "dnb-button--secondary" with focus state', async () => { - const screenshot = await testPageScreenshot({ - style: { - 'padding-right': '2rem', - }, - selector: '[data-visual-test="button-secondary"]', - simulate: 'focus', // should be tested first - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match "dnb-button--secondary" with hover state', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="button-secondary"]', - simulate: 'hover', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match "dnb-button--secondary" with active state', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="button-secondary"]', - simulate: 'active', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Button icon screenshot', () => { - setupPageScreenshot({ url: '/uilib/components/button/demos' }) - - it('have to match icon button', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="button-icon"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match icon button with focus state', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="button-icon"]', - simulate: 'focus', // should be tested first - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match icon button with hover state', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="button-icon"]', - simulate: 'hover', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match icon button with active state', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="button-icon"]', - simulate: 'active', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Button target blank', () => { - it('have to match with tooltip', async () => { - const screenshot = await testPageScreenshot({ - style: { - 'padding-top': '2rem', - }, - selector: '[data-visual-test="button-anchor"]', - simulateSelector: - '[data-visual-test="button-anchor"] a[target="_blank"]', - simulate: 'hover', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Button unstyled screenshot', () => { - setupPageScreenshot({ url: '/uilib/components/button/demos' }) - - it('have to match "dnb-button--unstyled" with icon', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="button-unstyled"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Button tertiary screenshot', () => { - setupPageScreenshot({ url: '/uilib/components/button/demos' }) - - it('have to match "dnb-button--tertiary" without icon', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="button-tertiary-no-icon"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match "dnb-button--tertiary"', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="button-tertiary"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match "dnb-button--tertiary" with focus state', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="button-tertiary"]', - simulate: 'focus', // should be tested first - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match "dnb-button--tertiary" with hover state', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="button-tertiary"]', - simulate: 'hover', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match "dnb-button--tertiary" with active state', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="button-tertiary"]', - simulate: 'active', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match all tertiary buttons', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="button-tertiary-all"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match tertiary with top icon', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="button-tertiary-top"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match disabled buttons', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="button-disabled"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match button with custom content', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="button-custom-content"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match tertiary button with text wrap', async () => { - const screenshot = await testPageScreenshot({ - style: { - width: '20rem', - height: '6rem', - }, - selector: '[data-visual-test="button-tertiary-wrap"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Button signal screenshot', () => { - setupPageScreenshot({ url: '/uilib/components/button/demos' }) - - it('have to match "dnb-button--signal"', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="button-signal"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match "dnb-button--signal" with focus state', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="button-signal"]', - simulate: 'focus', // should be tested first - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match "dnb-button--signal" with hover state', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="button-signal"]', - simulate: 'hover', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match "dnb-button--signal" with active state', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="button-signal"]', - simulate: 'active', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/components/button/__tests__/Button.screenshot.test.ts b/packages/dnb-eufemia/src/components/button/__tests__/Button.screenshot.test.ts new file mode 100644 index 00000000000..b2f6ea473f5 --- /dev/null +++ b/packages/dnb-eufemia/src/components/button/__tests__/Button.screenshot.test.ts @@ -0,0 +1,271 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + isCI, + makeScreenshot, + setupPageScreenshot, +} from '../../../core/jest/jestSetupScreenshots' + +describe('Button', () => { + describe('primary', () => { + setupPageScreenshot({ url: '/uilib/components/button/demos' }) + + if (!isCI) { + it('have to match primary button with href', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="button-anchor"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + } + + it('have to match "dnb-button--primary"', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="button-primary"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match "dnb-button--primary" with focus state', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="button-primary"]', + simulate: 'focus', // should be tested first + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match "dnb-button--primary" with hover state', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="button-primary"]', + simulate: 'hover', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match a stretched button', async () => { + const screenshot = await makeScreenshot({ + style: { + 'min-width': '20rem', + }, + selector: '[data-visual-test="button-stretch"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match "dnb-button--primary" with active state', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="button-primary"]', + simulate: 'active', + }) + expect(screenshot).toMatchImageSnapshot() + }) + }) + + describe('secondary', () => { + it('have to match "dnb-button--secondary"', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="button-secondary"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match "dnb-button--secondary" with focus state', async () => { + const screenshot = await makeScreenshot({ + style: { + 'padding-right': '2rem', + }, + selector: '[data-visual-test="button-secondary"]', + simulate: 'focus', // should be tested first + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match "dnb-button--secondary" with hover state', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="button-secondary"]', + simulate: 'hover', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match "dnb-button--secondary" with active state', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="button-secondary"]', + simulate: 'active', + }) + expect(screenshot).toMatchImageSnapshot() + }) + }) + + describe('icon', () => { + it('have to match icon button', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="button-icon"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match icon button with focus state', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="button-icon"]', + simulate: 'focus', // should be tested first + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match icon button with hover state', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="button-icon"]', + simulate: 'hover', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match icon button with active state', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="button-icon"]', + simulate: 'active', + }) + expect(screenshot).toMatchImageSnapshot() + }) + }) + + describe('target blank', () => { + it('have to match with tooltip', async () => { + const screenshot = await makeScreenshot({ + style: { + 'padding-top': '2rem', + }, + selector: '[data-visual-test="button-anchor"]', + simulateSelector: + '[data-visual-test="button-anchor"] a[target="_blank"]', + simulate: 'hover', + }) + expect(screenshot).toMatchImageSnapshot() + }) + }) + + describe('unstyled', () => { + it('have to match "dnb-button--unstyled" with icon', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="button-unstyled"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + }) + + describe('tertiary', () => { + it('have to match "dnb-button--tertiary" without icon', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="button-tertiary-no-icon"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match "dnb-button--tertiary"', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="button-tertiary"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match "dnb-button--tertiary" with focus state', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="button-tertiary"]', + simulate: 'focus', // should be tested first + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match "dnb-button--tertiary" with hover state', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="button-tertiary"]', + simulate: 'hover', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match "dnb-button--tertiary" with active state', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="button-tertiary"]', + simulate: 'active', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match all tertiary buttons', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="button-tertiary-all"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match tertiary with top icon', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="button-tertiary-top"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match disabled buttons', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="button-disabled"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match button with custom content', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="button-custom-content"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match tertiary button with text wrap', async () => { + const screenshot = await makeScreenshot({ + style: { + width: '20rem', + height: '6rem', + }, + selector: '[data-visual-test="button-tertiary-wrap"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + }) + + describe('signal', () => { + it('have to match "dnb-button--signal"', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="button-signal"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match "dnb-button--signal" with focus state', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="button-signal"]', + simulate: 'focus', // should be tested first + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match "dnb-button--signal" with hover state', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="button-signal"]', + simulate: 'hover', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match "dnb-button--signal" with active state', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="button-signal"]', + simulate: 'active', + }) + expect(screenshot).toMatchImageSnapshot() + }) + }) +}) diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-icon-have-to-match-icon-button-with-active-state.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-icon-have-to-match-icon-button-with-active-state.snap.png new file mode 100644 index 00000000000..c1dfe919dff Binary files /dev/null and b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-icon-have-to-match-icon-button-with-active-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-icon-have-to-match-icon-button-with-focus-state.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-icon-have-to-match-icon-button-with-focus-state.snap.png new file mode 100644 index 00000000000..fddf8becee4 Binary files /dev/null and b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-icon-have-to-match-icon-button-with-focus-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-icon-have-to-match-icon-button-with-hover-state.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-icon-have-to-match-icon-button-with-hover-state.snap.png new file mode 100644 index 00000000000..e5760dd5281 Binary files /dev/null and b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-icon-have-to-match-icon-button-with-hover-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-icon-have-to-match-icon-button.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-icon-have-to-match-icon-button.snap.png new file mode 100644 index 00000000000..d83542f131a Binary files /dev/null and b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-icon-have-to-match-icon-button.snap.png differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-primary-have-to-match-a-stretched-button.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-primary-have-to-match-a-stretched-button.snap.png new file mode 100644 index 00000000000..c487a1d9a7b Binary files /dev/null and b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-primary-have-to-match-a-stretched-button.snap.png differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-primary-have-to-match-dnb-button-primary-with-active-state.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-primary-have-to-match-dnb-button-primary-with-active-state.snap.png new file mode 100644 index 00000000000..d2512fca621 Binary files /dev/null and b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-primary-have-to-match-dnb-button-primary-with-active-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-primary-have-to-match-dnb-button-primary-with-focus-state.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-primary-have-to-match-dnb-button-primary-with-focus-state.snap.png new file mode 100644 index 00000000000..9451d318e2b Binary files /dev/null and b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-primary-have-to-match-dnb-button-primary-with-focus-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-primary-have-to-match-dnb-button-primary-with-hover-state.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-primary-have-to-match-dnb-button-primary-with-hover-state.snap.png new file mode 100644 index 00000000000..e730afa0a3d Binary files /dev/null and b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-primary-have-to-match-dnb-button-primary-with-hover-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-primary-have-to-match-dnb-button-primary.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-primary-have-to-match-dnb-button-primary.snap.png new file mode 100644 index 00000000000..eff825c47bd Binary files /dev/null and b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-primary-have-to-match-dnb-button-primary.snap.png differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-primary-have-to-match-primary-button-with-href.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-primary-have-to-match-primary-button-with-href.snap.png new file mode 100644 index 00000000000..cf6eb9d7fa6 Binary files /dev/null and b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-primary-have-to-match-primary-button-with-href.snap.png differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-secondary-have-to-match-dnb-button-secondary-with-active-state.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-secondary-have-to-match-dnb-button-secondary-with-active-state.snap.png new file mode 100644 index 00000000000..97e9f352bdc Binary files /dev/null and b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-secondary-have-to-match-dnb-button-secondary-with-active-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-secondary-have-to-match-dnb-button-secondary-with-focus-state.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-secondary-have-to-match-dnb-button-secondary-with-focus-state.snap.png new file mode 100644 index 00000000000..1ce0b0c70ce Binary files /dev/null and b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-secondary-have-to-match-dnb-button-secondary-with-focus-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-secondary-have-to-match-dnb-button-secondary-with-hover-state.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-secondary-have-to-match-dnb-button-secondary-with-hover-state.snap.png new file mode 100644 index 00000000000..75890c914fe Binary files /dev/null and b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-secondary-have-to-match-dnb-button-secondary-with-hover-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-secondary-have-to-match-dnb-button-secondary.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-secondary-have-to-match-dnb-button-secondary.snap.png new file mode 100644 index 00000000000..0a51169fd1c Binary files /dev/null and b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-secondary-have-to-match-dnb-button-secondary.snap.png differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-signal-have-to-match-dnb-button-signal-with-active-state.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-signal-have-to-match-dnb-button-signal-with-active-state.snap.png new file mode 100644 index 00000000000..365a6553669 Binary files /dev/null and b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-signal-have-to-match-dnb-button-signal-with-active-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-signal-have-to-match-dnb-button-signal-with-focus-state.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-signal-have-to-match-dnb-button-signal-with-focus-state.snap.png new file mode 100644 index 00000000000..21f9b057118 Binary files /dev/null and b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-signal-have-to-match-dnb-button-signal-with-focus-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-signal-have-to-match-dnb-button-signal-with-hover-state.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-signal-have-to-match-dnb-button-signal-with-hover-state.snap.png new file mode 100644 index 00000000000..6c2ea48ada3 Binary files /dev/null and b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-signal-have-to-match-dnb-button-signal-with-hover-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-signal-have-to-match-dnb-button-signal.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-signal-have-to-match-dnb-button-signal.snap.png new file mode 100644 index 00000000000..365a6553669 Binary files /dev/null and b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-signal-have-to-match-dnb-button-signal.snap.png differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-target-blank-have-to-match-with-tooltip.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-target-blank-have-to-match-with-tooltip.snap.png new file mode 100644 index 00000000000..870cbffc343 Binary files /dev/null and b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-target-blank-have-to-match-with-tooltip.snap.png differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-tertiary-have-to-match-all-tertiary-buttons.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-tertiary-have-to-match-all-tertiary-buttons.snap.png new file mode 100644 index 00000000000..97b9771207a Binary files /dev/null and b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-tertiary-have-to-match-all-tertiary-buttons.snap.png differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-tertiary-have-to-match-button-with-custom-content.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-tertiary-have-to-match-button-with-custom-content.snap.png new file mode 100644 index 00000000000..c6c6e84a2c9 Binary files /dev/null and b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-tertiary-have-to-match-button-with-custom-content.snap.png differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-tertiary-have-to-match-disabled-buttons.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-tertiary-have-to-match-disabled-buttons.snap.png new file mode 100644 index 00000000000..5f7b666d5e1 Binary files /dev/null and b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-tertiary-have-to-match-disabled-buttons.snap.png differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-tertiary-have-to-match-dnb-button-tertiary-with-active-state.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-tertiary-have-to-match-dnb-button-tertiary-with-active-state.snap.png new file mode 100644 index 00000000000..01e79661811 Binary files /dev/null and b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-tertiary-have-to-match-dnb-button-tertiary-with-active-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-tertiary-have-to-match-dnb-button-tertiary-with-focus-state.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-tertiary-have-to-match-dnb-button-tertiary-with-focus-state.snap.png new file mode 100644 index 00000000000..8429e4f06fe Binary files /dev/null and b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-tertiary-have-to-match-dnb-button-tertiary-with-focus-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-tertiary-have-to-match-dnb-button-tertiary-with-hover-state.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-tertiary-have-to-match-dnb-button-tertiary-with-hover-state.snap.png new file mode 100644 index 00000000000..2e8ad98779b Binary files /dev/null and b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-tertiary-have-to-match-dnb-button-tertiary-with-hover-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-tertiary-have-to-match-dnb-button-tertiary-without-icon.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-tertiary-have-to-match-dnb-button-tertiary-without-icon.snap.png new file mode 100644 index 00000000000..1ebdb7460ee Binary files /dev/null and b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-tertiary-have-to-match-dnb-button-tertiary-without-icon.snap.png differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-tertiary-have-to-match-dnb-button-tertiary.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-tertiary-have-to-match-dnb-button-tertiary.snap.png new file mode 100644 index 00000000000..01e79661811 Binary files /dev/null and b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-tertiary-have-to-match-dnb-button-tertiary.snap.png differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-tertiary-have-to-match-tertiary-button-with-text-wrap.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-tertiary-have-to-match-tertiary-button-with-text-wrap.snap.png new file mode 100644 index 00000000000..b2c736a28d4 Binary files /dev/null and b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-tertiary-have-to-match-tertiary-button-with-text-wrap.snap.png differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-tertiary-have-to-match-tertiary-with-top-icon.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-tertiary-have-to-match-tertiary-with-top-icon.snap.png new file mode 100644 index 00000000000..866ad8d0bda Binary files /dev/null and b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-tertiary-have-to-match-tertiary-with-top-icon.snap.png differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-unstyled-have-to-match-dnb-button-unstyled-with-icon.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-unstyled-have-to-match-dnb-button-unstyled-with-icon.snap.png new file mode 100644 index 00000000000..433b806257b Binary files /dev/null and b/packages/dnb-eufemia/src/components/button/__tests__/__image_snapshots__/button-unstyled-have-to-match-dnb-button-unstyled-with-icon.snap.png differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-icon-screenshot-have-to-match-icon-button-1-c5174.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-icon-screenshot-have-to-match-icon-button-1-c5174.snap.png deleted file mode 100644 index 036291051ce..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-icon-screenshot-have-to-match-icon-button-1-c5174.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-icon-screenshot-have-to-match-icon-button-with-active-state-1-6b1d3.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-icon-screenshot-have-to-match-icon-button-with-active-state-1-6b1d3.snap.png deleted file mode 100644 index 4025a28c690..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-icon-screenshot-have-to-match-icon-button-with-active-state-1-6b1d3.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-icon-screenshot-have-to-match-icon-button-with-focus-state-1-4841f.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-icon-screenshot-have-to-match-icon-button-with-focus-state-1-4841f.snap.png deleted file mode 100644 index 332d2da94d9..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-icon-screenshot-have-to-match-icon-button-with-focus-state-1-4841f.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-icon-screenshot-have-to-match-icon-button-with-hover-state-1-713bd.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-icon-screenshot-have-to-match-icon-button-with-hover-state-1-713bd.snap.png deleted file mode 100644 index 4494e17166a..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-icon-screenshot-have-to-match-icon-button-with-hover-state-1-713bd.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-primary-screenshot-have-to-match-a-stretched-button-1-c2fae.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-primary-screenshot-have-to-match-a-stretched-button-1-c2fae.snap.png deleted file mode 100644 index 5c749c4cc95..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-primary-screenshot-have-to-match-a-stretched-button-1-c2fae.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-primary-screenshot-have-to-match-dnb-button-primary-1-cefbc.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-primary-screenshot-have-to-match-dnb-button-primary-1-cefbc.snap.png deleted file mode 100644 index f0a9696251c..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-primary-screenshot-have-to-match-dnb-button-primary-1-cefbc.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-primary-screenshot-have-to-match-dnb-button-primary-with-active-state-1-007c9.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-primary-screenshot-have-to-match-dnb-button-primary-with-active-state-1-007c9.snap.png deleted file mode 100644 index d6f53b2ecb2..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-primary-screenshot-have-to-match-dnb-button-primary-with-active-state-1-007c9.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-primary-screenshot-have-to-match-dnb-button-primary-with-focus-state-1-7423b.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-primary-screenshot-have-to-match-dnb-button-primary-with-focus-state-1-7423b.snap.png deleted file mode 100644 index f8afa224c87..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-primary-screenshot-have-to-match-dnb-button-primary-with-focus-state-1-7423b.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-primary-screenshot-have-to-match-dnb-button-primary-with-focus-state-2-4d984.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-primary-screenshot-have-to-match-dnb-button-primary-with-focus-state-2-4d984.snap.png deleted file mode 100644 index 30c3bbf5499..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-primary-screenshot-have-to-match-dnb-button-primary-with-focus-state-2-4d984.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-primary-screenshot-have-to-match-dnb-button-primary-with-hover-state-1-2c9fb.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-primary-screenshot-have-to-match-dnb-button-primary-with-hover-state-1-2c9fb.snap.png deleted file mode 100644 index 23804c3b96f..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-primary-screenshot-have-to-match-dnb-button-primary-with-hover-state-1-2c9fb.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-primary-screenshot-have-to-match-primary-button-with-href-1-1b254.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-primary-screenshot-have-to-match-primary-button-with-href-1-1b254.snap.png deleted file mode 100644 index 1d2efbdfd77..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-primary-screenshot-have-to-match-primary-button-with-href-1-1b254.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-screenshot-have-to-match-dnb-button-primary-1-8399a.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-screenshot-have-to-match-dnb-button-primary-1-8399a.snap.png deleted file mode 100644 index 81e19307355..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-screenshot-have-to-match-dnb-button-primary-1-8399a.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-screenshot-have-to-match-dnb-button-primary-with-active-state-1-d4f1f.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-screenshot-have-to-match-dnb-button-primary-with-active-state-1-d4f1f.snap.png deleted file mode 100644 index 7b128111fc4..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-screenshot-have-to-match-dnb-button-primary-with-active-state-1-d4f1f.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-screenshot-have-to-match-dnb-button-primary-with-focus-state-1-a3c02.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-screenshot-have-to-match-dnb-button-primary-with-focus-state-1-a3c02.snap.png deleted file mode 100644 index 28d331d2af3..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-screenshot-have-to-match-dnb-button-primary-with-focus-state-1-a3c02.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-screenshot-have-to-match-dnb-button-primary-with-hover-state-1-a79c3.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-screenshot-have-to-match-dnb-button-primary-with-hover-state-1-a79c3.snap.png deleted file mode 100644 index 32fbba2b09c..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-screenshot-have-to-match-dnb-button-primary-with-hover-state-1-a79c3.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-screenshot-have-to-match-dnb-button-secondary-1-b265a.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-screenshot-have-to-match-dnb-button-secondary-1-b265a.snap.png deleted file mode 100644 index dd267e0f471..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-screenshot-have-to-match-dnb-button-secondary-1-b265a.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-screenshot-have-to-match-dnb-button-signal-with-hover-state-1-6667b.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-screenshot-have-to-match-dnb-button-signal-with-hover-state-1-6667b.snap.png deleted file mode 100644 index b5334ba29de..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-screenshot-have-to-match-dnb-button-signal-with-hover-state-1-6667b.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-screenshot-have-to-match-dnb-button-tertiary-1-03c5d.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-screenshot-have-to-match-dnb-button-tertiary-1-03c5d.snap.png deleted file mode 100644 index ec2b4ec818d..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-screenshot-have-to-match-dnb-button-tertiary-1-03c5d.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-screenshot-have-to-match-dnb-button-tertiary-with-focus-state-1-8b90b.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-screenshot-have-to-match-dnb-button-tertiary-with-focus-state-1-8b90b.snap.png deleted file mode 100644 index f1ce3bb9071..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-screenshot-have-to-match-dnb-button-tertiary-with-focus-state-1-8b90b.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-screenshot-have-to-match-dnb-button-tertiary-with-hover-state-1-6991b.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-screenshot-have-to-match-dnb-button-tertiary-with-hover-state-1-6991b.snap.png deleted file mode 100644 index 9e2c9785e75..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-screenshot-have-to-match-dnb-button-tertiary-with-hover-state-1-6991b.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-screenshot-have-to-match-primary-button-with-href-1-600d4.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-screenshot-have-to-match-primary-button-with-href-1-600d4.snap.png deleted file mode 100644 index 1893d982d46..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-screenshot-have-to-match-primary-button-with-href-1-600d4.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-secondary-screenshot-have-to-match-dnb-button-secondary-1-3c9e3.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-secondary-screenshot-have-to-match-dnb-button-secondary-1-3c9e3.snap.png deleted file mode 100644 index 9d283d60969..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-secondary-screenshot-have-to-match-dnb-button-secondary-1-3c9e3.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-secondary-screenshot-have-to-match-dnb-button-secondary-with-active-state-1-39e18.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-secondary-screenshot-have-to-match-dnb-button-secondary-with-active-state-1-39e18.snap.png deleted file mode 100644 index 023a0715c67..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-secondary-screenshot-have-to-match-dnb-button-secondary-with-active-state-1-39e18.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-secondary-screenshot-have-to-match-dnb-button-secondary-with-focus-state-1-0ef19.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-secondary-screenshot-have-to-match-dnb-button-secondary-with-focus-state-1-0ef19.snap.png deleted file mode 100644 index 36daa526c3c..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-secondary-screenshot-have-to-match-dnb-button-secondary-with-focus-state-1-0ef19.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-secondary-screenshot-have-to-match-dnb-button-secondary-with-hover-state-1-37a06.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-secondary-screenshot-have-to-match-dnb-button-secondary-with-hover-state-1-37a06.snap.png deleted file mode 100644 index c32bd809818..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-secondary-screenshot-have-to-match-dnb-button-secondary-with-hover-state-1-37a06.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-signal-screenshot-have-to-match-dnb-button-signal-1-c260e.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-signal-screenshot-have-to-match-dnb-button-signal-1-c260e.snap.png deleted file mode 100644 index c355221e0b7..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-signal-screenshot-have-to-match-dnb-button-signal-1-c260e.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-signal-screenshot-have-to-match-dnb-button-signal-with-active-state-1-c8166.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-signal-screenshot-have-to-match-dnb-button-signal-with-active-state-1-c8166.snap.png deleted file mode 100644 index c355221e0b7..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-signal-screenshot-have-to-match-dnb-button-signal-with-active-state-1-c8166.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-signal-screenshot-have-to-match-dnb-button-signal-with-focus-state-1-b6a47.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-signal-screenshot-have-to-match-dnb-button-signal-with-focus-state-1-b6a47.snap.png deleted file mode 100644 index 5fc75c0863a..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-signal-screenshot-have-to-match-dnb-button-signal-with-focus-state-1-b6a47.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-signal-screenshot-have-to-match-dnb-button-signal-with-focus-state-2-3459e.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-signal-screenshot-have-to-match-dnb-button-signal-with-focus-state-2-3459e.snap.png deleted file mode 100644 index 43563da3978..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-signal-screenshot-have-to-match-dnb-button-signal-with-focus-state-2-3459e.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-signal-screenshot-have-to-match-dnb-button-signal-with-hover-state-1-b9b21.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-signal-screenshot-have-to-match-dnb-button-signal-with-hover-state-1-b9b21.snap.png deleted file mode 100644 index ecb6c9a0605..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-signal-screenshot-have-to-match-dnb-button-signal-with-hover-state-1-b9b21.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-target-blank-have-to-match-with-toolip-1-68f55.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-target-blank-have-to-match-with-toolip-1-68f55.snap.png deleted file mode 100644 index 13a6de6d6b2..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-target-blank-have-to-match-with-toolip-1-68f55.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-target-blank-have-to-match-with-tooltip-1-b282d.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-target-blank-have-to-match-with-tooltip-1-b282d.snap.png deleted file mode 100644 index d75cc277557..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-target-blank-have-to-match-with-tooltip-1-b282d.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-tertiary-screenshot-have-to-match-all-tertiary-buttons-1-81956.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-tertiary-screenshot-have-to-match-all-tertiary-buttons-1-81956.snap.png deleted file mode 100644 index 00966d025cc..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-tertiary-screenshot-have-to-match-all-tertiary-buttons-1-81956.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-tertiary-screenshot-have-to-match-button-with-custom-content-1-c38a4.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-tertiary-screenshot-have-to-match-button-with-custom-content-1-c38a4.snap.png deleted file mode 100644 index 073ad9bf359..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-tertiary-screenshot-have-to-match-button-with-custom-content-1-c38a4.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-tertiary-screenshot-have-to-match-disabled-buttons-1-ef6fe.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-tertiary-screenshot-have-to-match-disabled-buttons-1-ef6fe.snap.png deleted file mode 100644 index 5fc54ec5a54..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-tertiary-screenshot-have-to-match-disabled-buttons-1-ef6fe.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-tertiary-screenshot-have-to-match-dnb-button-tertiary-1-85395.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-tertiary-screenshot-have-to-match-dnb-button-tertiary-1-85395.snap.png deleted file mode 100644 index 27e29a1bf1f..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-tertiary-screenshot-have-to-match-dnb-button-tertiary-1-85395.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-tertiary-screenshot-have-to-match-dnb-button-tertiary-with-active-state-1-32a3c.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-tertiary-screenshot-have-to-match-dnb-button-tertiary-with-active-state-1-32a3c.snap.png deleted file mode 100644 index 27e29a1bf1f..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-tertiary-screenshot-have-to-match-dnb-button-tertiary-with-active-state-1-32a3c.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-tertiary-screenshot-have-to-match-dnb-button-tertiary-with-focus-state-1-7fc7a.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-tertiary-screenshot-have-to-match-dnb-button-tertiary-with-focus-state-1-7fc7a.snap.png deleted file mode 100644 index 416b0d92351..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-tertiary-screenshot-have-to-match-dnb-button-tertiary-with-focus-state-1-7fc7a.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-tertiary-screenshot-have-to-match-dnb-button-tertiary-with-hover-state-1-cac6d.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-tertiary-screenshot-have-to-match-dnb-button-tertiary-with-hover-state-1-cac6d.snap.png deleted file mode 100644 index 70890c05c78..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-tertiary-screenshot-have-to-match-dnb-button-tertiary-with-hover-state-1-cac6d.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-tertiary-screenshot-have-to-match-dnb-button-tertiary-without-icon-1-42663.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-tertiary-screenshot-have-to-match-dnb-button-tertiary-without-icon-1-42663.snap.png deleted file mode 100644 index 8ee38edbfbd..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-tertiary-screenshot-have-to-match-dnb-button-tertiary-without-icon-1-42663.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-tertiary-screenshot-have-to-match-tertiary-button-with-text-wrap-1-6d941.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-tertiary-screenshot-have-to-match-tertiary-button-with-text-wrap-1-6d941.snap.png deleted file mode 100644 index 31635d01a87..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-tertiary-screenshot-have-to-match-tertiary-button-with-text-wrap-1-6d941.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-tertiary-screenshot-have-to-match-tertiary-with-top-icon-1-210ac.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-tertiary-screenshot-have-to-match-tertiary-with-top-icon-1-210ac.snap.png deleted file mode 100644 index c75bef3621c..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-tertiary-screenshot-have-to-match-tertiary-with-top-icon-1-210ac.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-unstyled-screenshot-have-to-match-dnb-button-unstyled-with-icon-1-7e92e.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-unstyled-screenshot-have-to-match-dnb-button-unstyled-with-icon-1-7e92e.snap.png deleted file mode 100644 index a61f2292d99..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-unstyled-screenshot-have-to-match-dnb-button-unstyled-with-icon-1-7e92e.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/themes/Button.eiendom.screenshot.test.js b/packages/dnb-eufemia/src/components/button/__tests__/themes/Button.eiendom.screenshot.test.js deleted file mode 100644 index b0e409920c8..00000000000 --- a/packages/dnb-eufemia/src/components/button/__tests__/themes/Button.eiendom.screenshot.test.js +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Screenshot Test - * - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../../core/jest/jestSetupScreenshots' - -describe('Button with eiendom theme', () => { - setupPageScreenshot({ - url: '/uilib/components/button/demos?dnb-theme=eiendom', - }) - - it('have to match "dnb-button--primary"', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="button-primary"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match "dnb-button--secondary"', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="button-secondary"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match icon button', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="button-icon"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match "dnb-button--tertiary"', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="button-tertiary-all"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match disabled button', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="button-disabled"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/components/button/__tests__/themes/Button.eiendom.screenshot.test.ts b/packages/dnb-eufemia/src/components/button/__tests__/themes/Button.eiendom.screenshot.test.ts new file mode 100644 index 00000000000..b625fca4d99 --- /dev/null +++ b/packages/dnb-eufemia/src/components/button/__tests__/themes/Button.eiendom.screenshot.test.ts @@ -0,0 +1,50 @@ +/** + * Screenshot Test + * + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../../../core/jest/jestSetupScreenshots' + +describe('Button with eiendom theme', () => { + setupPageScreenshot({ + url: '/uilib/components/button/demos?dnb-theme=eiendom', + }) + + it('have to match "dnb-button--primary"', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="button-primary"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match "dnb-button--secondary"', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="button-secondary"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match icon button', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="button-icon"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match "dnb-button--tertiary"', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="button-tertiary-all"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match disabled button', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="button-disabled"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/components/button/__tests__/themes/__image_snapshots__/button-with-eiendom-theme-have-to-match-disabled-button.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/themes/__image_snapshots__/button-with-eiendom-theme-have-to-match-disabled-button.snap.png new file mode 100644 index 00000000000..fc873fc8efe Binary files /dev/null and b/packages/dnb-eufemia/src/components/button/__tests__/themes/__image_snapshots__/button-with-eiendom-theme-have-to-match-disabled-button.snap.png differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/themes/__image_snapshots__/button-with-eiendom-theme-have-to-match-dnb-button-primary.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/themes/__image_snapshots__/button-with-eiendom-theme-have-to-match-dnb-button-primary.snap.png new file mode 100644 index 00000000000..39269c559e6 Binary files /dev/null and b/packages/dnb-eufemia/src/components/button/__tests__/themes/__image_snapshots__/button-with-eiendom-theme-have-to-match-dnb-button-primary.snap.png differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/themes/__image_snapshots__/button-with-eiendom-theme-have-to-match-dnb-button-secondary.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/themes/__image_snapshots__/button-with-eiendom-theme-have-to-match-dnb-button-secondary.snap.png new file mode 100644 index 00000000000..80605383a20 Binary files /dev/null and b/packages/dnb-eufemia/src/components/button/__tests__/themes/__image_snapshots__/button-with-eiendom-theme-have-to-match-dnb-button-secondary.snap.png differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/themes/__image_snapshots__/button-with-eiendom-theme-have-to-match-dnb-button-tertiary.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/themes/__image_snapshots__/button-with-eiendom-theme-have-to-match-dnb-button-tertiary.snap.png new file mode 100644 index 00000000000..95395fe49f9 Binary files /dev/null and b/packages/dnb-eufemia/src/components/button/__tests__/themes/__image_snapshots__/button-with-eiendom-theme-have-to-match-dnb-button-tertiary.snap.png differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/themes/__image_snapshots__/button-with-eiendom-theme-have-to-match-icon-button.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/themes/__image_snapshots__/button-with-eiendom-theme-have-to-match-icon-button.snap.png new file mode 100644 index 00000000000..32fdca0c59f Binary files /dev/null and b/packages/dnb-eufemia/src/components/button/__tests__/themes/__image_snapshots__/button-with-eiendom-theme-have-to-match-icon-button.snap.png differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/themes/__snapshots__/button-eiendom-screenshot-test-js-button-with-eiendom-theme-have-to-match-disabled-button-1-6ea03.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/themes/__snapshots__/button-eiendom-screenshot-test-js-button-with-eiendom-theme-have-to-match-disabled-button-1-6ea03.snap.png deleted file mode 100644 index eacf1a56b21..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/themes/__snapshots__/button-eiendom-screenshot-test-js-button-with-eiendom-theme-have-to-match-disabled-button-1-6ea03.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/themes/__snapshots__/button-eiendom-screenshot-test-js-button-with-eiendom-theme-have-to-match-dnb-button-primary-1-f4d57.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/themes/__snapshots__/button-eiendom-screenshot-test-js-button-with-eiendom-theme-have-to-match-dnb-button-primary-1-f4d57.snap.png deleted file mode 100644 index a55dae194af..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/themes/__snapshots__/button-eiendom-screenshot-test-js-button-with-eiendom-theme-have-to-match-dnb-button-primary-1-f4d57.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/themes/__snapshots__/button-eiendom-screenshot-test-js-button-with-eiendom-theme-have-to-match-dnb-button-secondary-1-2a519.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/themes/__snapshots__/button-eiendom-screenshot-test-js-button-with-eiendom-theme-have-to-match-dnb-button-secondary-1-2a519.snap.png deleted file mode 100644 index 79f79530af7..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/themes/__snapshots__/button-eiendom-screenshot-test-js-button-with-eiendom-theme-have-to-match-dnb-button-secondary-1-2a519.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/themes/__snapshots__/button-eiendom-screenshot-test-js-button-with-eiendom-theme-have-to-match-dnb-button-tertiary-1-3e815.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/themes/__snapshots__/button-eiendom-screenshot-test-js-button-with-eiendom-theme-have-to-match-dnb-button-tertiary-1-3e815.snap.png deleted file mode 100644 index 8f4ce2b4d56..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/themes/__snapshots__/button-eiendom-screenshot-test-js-button-with-eiendom-theme-have-to-match-dnb-button-tertiary-1-3e815.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/button/__tests__/themes/__snapshots__/button-eiendom-screenshot-test-js-button-with-eiendom-theme-have-to-match-icon-button-1-cc4d3.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/themes/__snapshots__/button-eiendom-screenshot-test-js-button-with-eiendom-theme-have-to-match-icon-button-1-cc4d3.snap.png deleted file mode 100644 index 2393d8e25ca..00000000000 Binary files a/packages/dnb-eufemia/src/components/button/__tests__/themes/__snapshots__/button-eiendom-screenshot-test-js-button-with-eiendom-theme-have-to-match-icon-button-1-cc4d3.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/checkbox/__tests__/Checkbox.screenshot.test.js b/packages/dnb-eufemia/src/components/checkbox/__tests__/Checkbox.screenshot.test.js deleted file mode 100644 index 1fe9f349ec3..00000000000 --- a/packages/dnb-eufemia/src/components/checkbox/__tests__/Checkbox.screenshot.test.js +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -describe('Checkbox unchecked screenshot', () => { - setupPageScreenshot({ url: '/uilib/components/checkbox/demos' }) - - it('have to match checkbox in unchecked state', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="checkbox-default"] .dnb-checkbox', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match checkbox in unchecked state with focus', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="checkbox-default"] .dnb-checkbox', - simulateSelector: - '[data-visual-test="checkbox-default"] .dnb-checkbox__input', - simulate: 'focus', // should be tested first - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match checkbox in unchecked state with hover', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="checkbox-default"] .dnb-checkbox', - simulateSelector: - '[data-visual-test="checkbox-default"] .dnb-checkbox__input', - simulate: 'hover', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -// NB: Because of focus simulation and screenshotElement.press('Tab') -// we have to run the two focus simulations in a separate run each -describe('Checkbox checked screenshot', () => { - setupPageScreenshot({ url: '/uilib/components/checkbox/demos' }) - - it('have to match checkbox in checked state', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="checkbox-checked"] .dnb-checkbox', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match checkbox in checked state with focus', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="checkbox-checked"] .dnb-checkbox', - simulateSelector: - '[data-visual-test="checkbox-checked"] .dnb-checkbox__input', - simulate: 'focus', // should be tested first - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match checkbox in checked state with hover', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="checkbox-checked"] .dnb-checkbox', - simulateSelector: - '[data-visual-test="checkbox-checked"] .dnb-checkbox__input', - simulate: 'hover', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match different checkbox sizes', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="checkbox-sizes"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match disabled checkbox', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="checkbox-disabled"] .dnb-checkbox', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match checkbox in error state', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="checkbox-error"] .dnb-checkbox', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/components/checkbox/__tests__/Checkbox.screenshot.test.ts b/packages/dnb-eufemia/src/components/checkbox/__tests__/Checkbox.screenshot.test.ts new file mode 100644 index 00000000000..90c138f93e3 --- /dev/null +++ b/packages/dnb-eufemia/src/components/checkbox/__tests__/Checkbox.screenshot.test.ts @@ -0,0 +1,94 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../../core/jest/jestSetupScreenshots' + +describe('Checkbox', () => { + describe('unchecked', () => { + setupPageScreenshot({ url: '/uilib/components/checkbox/demos' }) + + it('have to match checkbox in unchecked state', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="checkbox-default"] .dnb-checkbox', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match checkbox in unchecked state with focus', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="checkbox-default"] .dnb-checkbox', + simulateSelector: + '[data-visual-test="checkbox-default"] .dnb-checkbox__input', + simulate: 'focus', // should be tested first + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match checkbox in unchecked state with hover', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="checkbox-default"] .dnb-checkbox', + simulateSelector: + '[data-visual-test="checkbox-default"] .dnb-checkbox__input', + simulate: 'hover', + }) + expect(screenshot).toMatchImageSnapshot() + }) + }) + + // NB: Because of focus simulation and screenshotElement.press('Tab') + // we have to run the two focus simulations in a separate run each + describe('checked', () => { + it('have to match checkbox in checked state', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="checkbox-checked"] .dnb-checkbox', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match checkbox in checked state with focus', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="checkbox-checked"] .dnb-checkbox', + simulateSelector: + '[data-visual-test="checkbox-checked"] .dnb-checkbox__input', + simulate: 'focus', // should be tested first + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match checkbox in checked state with hover', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="checkbox-checked"] .dnb-checkbox', + simulateSelector: + '[data-visual-test="checkbox-checked"] .dnb-checkbox__input', + simulate: 'hover', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match different checkbox sizes', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="checkbox-sizes"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match disabled checkbox', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="checkbox-disabled"] .dnb-checkbox', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match checkbox in error state', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="checkbox-error"] .dnb-checkbox', + }) + expect(screenshot).toMatchImageSnapshot() + }) + }) +}) diff --git a/packages/dnb-eufemia/src/components/checkbox/__tests__/__image_snapshots__/checkbox-checked-have-to-match-checkbox-in-checked-state-with-focus.snap.png b/packages/dnb-eufemia/src/components/checkbox/__tests__/__image_snapshots__/checkbox-checked-have-to-match-checkbox-in-checked-state-with-focus.snap.png new file mode 100644 index 00000000000..d327a0f55f3 Binary files /dev/null and b/packages/dnb-eufemia/src/components/checkbox/__tests__/__image_snapshots__/checkbox-checked-have-to-match-checkbox-in-checked-state-with-focus.snap.png differ diff --git a/packages/dnb-eufemia/src/components/checkbox/__tests__/__image_snapshots__/checkbox-checked-have-to-match-checkbox-in-checked-state-with-hover.snap.png b/packages/dnb-eufemia/src/components/checkbox/__tests__/__image_snapshots__/checkbox-checked-have-to-match-checkbox-in-checked-state-with-hover.snap.png new file mode 100644 index 00000000000..2dda389b82c Binary files /dev/null and b/packages/dnb-eufemia/src/components/checkbox/__tests__/__image_snapshots__/checkbox-checked-have-to-match-checkbox-in-checked-state-with-hover.snap.png differ diff --git a/packages/dnb-eufemia/src/components/checkbox/__tests__/__image_snapshots__/checkbox-checked-have-to-match-checkbox-in-checked-state.snap.png b/packages/dnb-eufemia/src/components/checkbox/__tests__/__image_snapshots__/checkbox-checked-have-to-match-checkbox-in-checked-state.snap.png new file mode 100644 index 00000000000..02385329618 Binary files /dev/null and b/packages/dnb-eufemia/src/components/checkbox/__tests__/__image_snapshots__/checkbox-checked-have-to-match-checkbox-in-checked-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/checkbox/__tests__/__image_snapshots__/checkbox-checked-have-to-match-checkbox-in-error-state.snap.png b/packages/dnb-eufemia/src/components/checkbox/__tests__/__image_snapshots__/checkbox-checked-have-to-match-checkbox-in-error-state.snap.png new file mode 100644 index 00000000000..60707c63346 Binary files /dev/null and b/packages/dnb-eufemia/src/components/checkbox/__tests__/__image_snapshots__/checkbox-checked-have-to-match-checkbox-in-error-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/checkbox/__tests__/__image_snapshots__/checkbox-checked-have-to-match-different-checkbox-sizes.snap.png b/packages/dnb-eufemia/src/components/checkbox/__tests__/__image_snapshots__/checkbox-checked-have-to-match-different-checkbox-sizes.snap.png new file mode 100644 index 00000000000..25d76120b75 Binary files /dev/null and b/packages/dnb-eufemia/src/components/checkbox/__tests__/__image_snapshots__/checkbox-checked-have-to-match-different-checkbox-sizes.snap.png differ diff --git a/packages/dnb-eufemia/src/components/checkbox/__tests__/__image_snapshots__/checkbox-checked-have-to-match-disabled-checkbox.snap.png b/packages/dnb-eufemia/src/components/checkbox/__tests__/__image_snapshots__/checkbox-checked-have-to-match-disabled-checkbox.snap.png new file mode 100644 index 00000000000..5d57bdb3bcc Binary files /dev/null and b/packages/dnb-eufemia/src/components/checkbox/__tests__/__image_snapshots__/checkbox-checked-have-to-match-disabled-checkbox.snap.png differ diff --git a/packages/dnb-eufemia/src/components/checkbox/__tests__/__image_snapshots__/checkbox-unchecked-have-to-match-checkbox-in-unchecked-state-with-focus.snap.png b/packages/dnb-eufemia/src/components/checkbox/__tests__/__image_snapshots__/checkbox-unchecked-have-to-match-checkbox-in-unchecked-state-with-focus.snap.png new file mode 100644 index 00000000000..858bd1def0c Binary files /dev/null and b/packages/dnb-eufemia/src/components/checkbox/__tests__/__image_snapshots__/checkbox-unchecked-have-to-match-checkbox-in-unchecked-state-with-focus.snap.png differ diff --git a/packages/dnb-eufemia/src/components/checkbox/__tests__/__image_snapshots__/checkbox-unchecked-have-to-match-checkbox-in-unchecked-state-with-hover.snap.png b/packages/dnb-eufemia/src/components/checkbox/__tests__/__image_snapshots__/checkbox-unchecked-have-to-match-checkbox-in-unchecked-state-with-hover.snap.png new file mode 100644 index 00000000000..c3e7991aa5c Binary files /dev/null and b/packages/dnb-eufemia/src/components/checkbox/__tests__/__image_snapshots__/checkbox-unchecked-have-to-match-checkbox-in-unchecked-state-with-hover.snap.png differ diff --git a/packages/dnb-eufemia/src/components/checkbox/__tests__/__image_snapshots__/checkbox-unchecked-have-to-match-checkbox-in-unchecked-state.snap.png b/packages/dnb-eufemia/src/components/checkbox/__tests__/__image_snapshots__/checkbox-unchecked-have-to-match-checkbox-in-unchecked-state.snap.png new file mode 100644 index 00000000000..722d53c8fcc Binary files /dev/null and b/packages/dnb-eufemia/src/components/checkbox/__tests__/__image_snapshots__/checkbox-unchecked-have-to-match-checkbox-in-unchecked-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/checkbox/__tests__/__snapshots__/checkbox-screenshot-test-js-checkbox-checked-screenshot-have-to-match-checkbox-in-checked-state-1-cd57d.snap.png b/packages/dnb-eufemia/src/components/checkbox/__tests__/__snapshots__/checkbox-screenshot-test-js-checkbox-checked-screenshot-have-to-match-checkbox-in-checked-state-1-cd57d.snap.png deleted file mode 100644 index bbbeb9402da..00000000000 Binary files a/packages/dnb-eufemia/src/components/checkbox/__tests__/__snapshots__/checkbox-screenshot-test-js-checkbox-checked-screenshot-have-to-match-checkbox-in-checked-state-1-cd57d.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/checkbox/__tests__/__snapshots__/checkbox-screenshot-test-js-checkbox-checked-screenshot-have-to-match-checkbox-in-checked-state-with-focus-1-68369.snap.png b/packages/dnb-eufemia/src/components/checkbox/__tests__/__snapshots__/checkbox-screenshot-test-js-checkbox-checked-screenshot-have-to-match-checkbox-in-checked-state-with-focus-1-68369.snap.png deleted file mode 100644 index f37ab4ada07..00000000000 Binary files a/packages/dnb-eufemia/src/components/checkbox/__tests__/__snapshots__/checkbox-screenshot-test-js-checkbox-checked-screenshot-have-to-match-checkbox-in-checked-state-with-focus-1-68369.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/checkbox/__tests__/__snapshots__/checkbox-screenshot-test-js-checkbox-checked-screenshot-have-to-match-checkbox-in-checked-state-with-hover-1-7fa0a.snap.png b/packages/dnb-eufemia/src/components/checkbox/__tests__/__snapshots__/checkbox-screenshot-test-js-checkbox-checked-screenshot-have-to-match-checkbox-in-checked-state-with-hover-1-7fa0a.snap.png deleted file mode 100644 index b5c5eae0b9a..00000000000 Binary files a/packages/dnb-eufemia/src/components/checkbox/__tests__/__snapshots__/checkbox-screenshot-test-js-checkbox-checked-screenshot-have-to-match-checkbox-in-checked-state-with-hover-1-7fa0a.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/checkbox/__tests__/__snapshots__/checkbox-screenshot-test-js-checkbox-checked-screenshot-have-to-match-checkbox-in-error-state-1-e6684.snap.png b/packages/dnb-eufemia/src/components/checkbox/__tests__/__snapshots__/checkbox-screenshot-test-js-checkbox-checked-screenshot-have-to-match-checkbox-in-error-state-1-e6684.snap.png deleted file mode 100644 index 5bf5ac67c39..00000000000 Binary files a/packages/dnb-eufemia/src/components/checkbox/__tests__/__snapshots__/checkbox-screenshot-test-js-checkbox-checked-screenshot-have-to-match-checkbox-in-error-state-1-e6684.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/checkbox/__tests__/__snapshots__/checkbox-screenshot-test-js-checkbox-checked-screenshot-have-to-match-different-checkbox-sizes-1-ead80.snap.png b/packages/dnb-eufemia/src/components/checkbox/__tests__/__snapshots__/checkbox-screenshot-test-js-checkbox-checked-screenshot-have-to-match-different-checkbox-sizes-1-ead80.snap.png deleted file mode 100644 index 732bf40ddd0..00000000000 Binary files a/packages/dnb-eufemia/src/components/checkbox/__tests__/__snapshots__/checkbox-screenshot-test-js-checkbox-checked-screenshot-have-to-match-different-checkbox-sizes-1-ead80.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/checkbox/__tests__/__snapshots__/checkbox-screenshot-test-js-checkbox-checked-screenshot-have-to-match-disabled-checkbox-1-b6ffd.snap.png b/packages/dnb-eufemia/src/components/checkbox/__tests__/__snapshots__/checkbox-screenshot-test-js-checkbox-checked-screenshot-have-to-match-disabled-checkbox-1-b6ffd.snap.png deleted file mode 100644 index 66ed6645892..00000000000 Binary files a/packages/dnb-eufemia/src/components/checkbox/__tests__/__snapshots__/checkbox-screenshot-test-js-checkbox-checked-screenshot-have-to-match-disabled-checkbox-1-b6ffd.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/checkbox/__tests__/__snapshots__/checkbox-screenshot-test-js-checkbox-unchecked-screenshot-have-to-match-checkbox-in-unchecked-state-1-24f56.snap.png b/packages/dnb-eufemia/src/components/checkbox/__tests__/__snapshots__/checkbox-screenshot-test-js-checkbox-unchecked-screenshot-have-to-match-checkbox-in-unchecked-state-1-24f56.snap.png deleted file mode 100644 index 49a467e4d75..00000000000 Binary files a/packages/dnb-eufemia/src/components/checkbox/__tests__/__snapshots__/checkbox-screenshot-test-js-checkbox-unchecked-screenshot-have-to-match-checkbox-in-unchecked-state-1-24f56.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/checkbox/__tests__/__snapshots__/checkbox-screenshot-test-js-checkbox-unchecked-screenshot-have-to-match-checkbox-in-unchecked-state-with-focus-1-294d3.snap.png b/packages/dnb-eufemia/src/components/checkbox/__tests__/__snapshots__/checkbox-screenshot-test-js-checkbox-unchecked-screenshot-have-to-match-checkbox-in-unchecked-state-with-focus-1-294d3.snap.png deleted file mode 100644 index bc451bbfe16..00000000000 Binary files a/packages/dnb-eufemia/src/components/checkbox/__tests__/__snapshots__/checkbox-screenshot-test-js-checkbox-unchecked-screenshot-have-to-match-checkbox-in-unchecked-state-with-focus-1-294d3.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/checkbox/__tests__/__snapshots__/checkbox-screenshot-test-js-checkbox-unchecked-screenshot-have-to-match-checkbox-in-unchecked-state-with-hover-1-b3d7b.snap.png b/packages/dnb-eufemia/src/components/checkbox/__tests__/__snapshots__/checkbox-screenshot-test-js-checkbox-unchecked-screenshot-have-to-match-checkbox-in-unchecked-state-with-hover-1-b3d7b.snap.png deleted file mode 100644 index 8e46d944933..00000000000 Binary files a/packages/dnb-eufemia/src/components/checkbox/__tests__/__snapshots__/checkbox-screenshot-test-js-checkbox-unchecked-screenshot-have-to-match-checkbox-in-unchecked-state-with-hover-1-b3d7b.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/date-picker/__tests__/DatePicker.screenshot.test.js b/packages/dnb-eufemia/src/components/date-picker/__tests__/DatePicker.screenshot.test.js deleted file mode 100644 index 6f234a0ad0c..00000000000 --- a/packages/dnb-eufemia/src/components/date-picker/__tests__/DatePicker.screenshot.test.js +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - isCI, - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -describe('DatePicker screenshot', () => { - setupPageScreenshot({ url: '/uilib/components/date-picker/demos' }) - - if (!isCI) { - // skip the input fields, as there is a linux input issue - - it('have to match the input fields', async () => { - const screenshot = await testPageScreenshot({ - selector: - '[data-visual-test="date-picker-input"] .dnb-date-picker__inner', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the date-picker with input in error state', async () => { - const screenshot = await testPageScreenshot({ - style: { - width: '400px', // make sure our input gets an explicit width, because of mac/linux rendering differences - }, - selector: - '[data-visual-test="date-picker-input-error"] .dnb-date-picker__inner', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the sizes', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="date-picker-sizes"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - } - - it('have to match the calendar', async () => { - const screenshot = await testPageScreenshot({ - selector: - '[data-visual-test="date-picker-calendar"] .dnb-date-picker', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the date-picker trigger button', async () => { - const screenshot = await testPageScreenshot({ - selector: - '[data-visual-test="date-picker-trigger-default"] .dnb-date-picker__inner', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the date-picker trigger button in error state', async () => { - const screenshot = await testPageScreenshot({ - selector: - '[data-visual-test="date-picker-trigger-error"] .dnb-date-picker__inner', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/components/date-picker/__tests__/DatePicker.screenshot.test.ts b/packages/dnb-eufemia/src/components/date-picker/__tests__/DatePicker.screenshot.test.ts new file mode 100644 index 00000000000..c348c7221f4 --- /dev/null +++ b/packages/dnb-eufemia/src/components/date-picker/__tests__/DatePicker.screenshot.test.ts @@ -0,0 +1,69 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + isCI, + makeScreenshot, + setupPageScreenshot, +} from '../../../core/jest/jestSetupScreenshots' + +describe('DatePicker', () => { + setupPageScreenshot({ url: '/uilib/components/date-picker/demos' }) + + if (!isCI) { + // skip the input fields, as there is a linux input issue + + it('have to match the input fields', async () => { + const screenshot = await makeScreenshot({ + selector: + '[data-visual-test="date-picker-input"] .dnb-date-picker__inner', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the date-picker with input in error state', async () => { + const screenshot = await makeScreenshot({ + style: { + width: '400px', // make sure our input gets an explicit width, because of mac/linux rendering differences + }, + selector: + '[data-visual-test="date-picker-input-error"] .dnb-date-picker__inner', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the sizes', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="date-picker-sizes"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + } + + it('have to match the calendar', async () => { + const screenshot = await makeScreenshot({ + selector: + '[data-visual-test="date-picker-calendar"] .dnb-date-picker', + waitBeforeSimulate: 200, + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the date-picker trigger button', async () => { + const screenshot = await makeScreenshot({ + selector: + '[data-visual-test="date-picker-trigger-default"] .dnb-date-picker__inner', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the date-picker trigger button in error state', async () => { + const screenshot = await makeScreenshot({ + selector: + '[data-visual-test="date-picker-trigger-error"] .dnb-date-picker__inner', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/components/date-picker/__tests__/__image_snapshots__/datepicker-have-to-match-the-calendar.snap.png b/packages/dnb-eufemia/src/components/date-picker/__tests__/__image_snapshots__/datepicker-have-to-match-the-calendar.snap.png new file mode 100644 index 00000000000..b3dd1088036 Binary files /dev/null and b/packages/dnb-eufemia/src/components/date-picker/__tests__/__image_snapshots__/datepicker-have-to-match-the-calendar.snap.png differ diff --git a/packages/dnb-eufemia/src/components/date-picker/__tests__/__image_snapshots__/datepicker-have-to-match-the-date-picker-trigger-button-in-error-state.snap.png b/packages/dnb-eufemia/src/components/date-picker/__tests__/__image_snapshots__/datepicker-have-to-match-the-date-picker-trigger-button-in-error-state.snap.png new file mode 100644 index 00000000000..9c0e94b2632 Binary files /dev/null and b/packages/dnb-eufemia/src/components/date-picker/__tests__/__image_snapshots__/datepicker-have-to-match-the-date-picker-trigger-button-in-error-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/date-picker/__tests__/__image_snapshots__/datepicker-have-to-match-the-date-picker-trigger-button.snap.png b/packages/dnb-eufemia/src/components/date-picker/__tests__/__image_snapshots__/datepicker-have-to-match-the-date-picker-trigger-button.snap.png new file mode 100644 index 00000000000..8e268d6a664 Binary files /dev/null and b/packages/dnb-eufemia/src/components/date-picker/__tests__/__image_snapshots__/datepicker-have-to-match-the-date-picker-trigger-button.snap.png differ diff --git a/packages/dnb-eufemia/src/components/date-picker/__tests__/__image_snapshots__/datepicker-have-to-match-the-date-picker-with-input-in-error-state.snap.png b/packages/dnb-eufemia/src/components/date-picker/__tests__/__image_snapshots__/datepicker-have-to-match-the-date-picker-with-input-in-error-state.snap.png new file mode 100644 index 00000000000..a8dc15f7937 Binary files /dev/null and b/packages/dnb-eufemia/src/components/date-picker/__tests__/__image_snapshots__/datepicker-have-to-match-the-date-picker-with-input-in-error-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/date-picker/__tests__/__image_snapshots__/datepicker-have-to-match-the-input-fields.snap.png b/packages/dnb-eufemia/src/components/date-picker/__tests__/__image_snapshots__/datepicker-have-to-match-the-input-fields.snap.png new file mode 100644 index 00000000000..4858e4fc0dd Binary files /dev/null and b/packages/dnb-eufemia/src/components/date-picker/__tests__/__image_snapshots__/datepicker-have-to-match-the-input-fields.snap.png differ diff --git a/packages/dnb-eufemia/src/components/date-picker/__tests__/__image_snapshots__/datepicker-have-to-match-the-sizes.snap.png b/packages/dnb-eufemia/src/components/date-picker/__tests__/__image_snapshots__/datepicker-have-to-match-the-sizes.snap.png new file mode 100644 index 00000000000..ba074aea9a4 Binary files /dev/null and b/packages/dnb-eufemia/src/components/date-picker/__tests__/__image_snapshots__/datepicker-have-to-match-the-sizes.snap.png differ diff --git a/packages/dnb-eufemia/src/components/date-picker/__tests__/__snapshots__/date-picker-screenshot-test-js-date-picker-screenshot-have-to-match-the-calendar-1-9e9ea.snap.png b/packages/dnb-eufemia/src/components/date-picker/__tests__/__snapshots__/date-picker-screenshot-test-js-date-picker-screenshot-have-to-match-the-calendar-1-9e9ea.snap.png deleted file mode 100644 index e9597a3d705..00000000000 Binary files a/packages/dnb-eufemia/src/components/date-picker/__tests__/__snapshots__/date-picker-screenshot-test-js-date-picker-screenshot-have-to-match-the-calendar-1-9e9ea.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/date-picker/__tests__/__snapshots__/date-picker-screenshot-test-js-date-picker-screenshot-have-to-match-the-date-picker-trigger-button-1-6c5ae.snap.png b/packages/dnb-eufemia/src/components/date-picker/__tests__/__snapshots__/date-picker-screenshot-test-js-date-picker-screenshot-have-to-match-the-date-picker-trigger-button-1-6c5ae.snap.png deleted file mode 100644 index 5091875033a..00000000000 Binary files a/packages/dnb-eufemia/src/components/date-picker/__tests__/__snapshots__/date-picker-screenshot-test-js-date-picker-screenshot-have-to-match-the-date-picker-trigger-button-1-6c5ae.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/date-picker/__tests__/__snapshots__/date-picker-screenshot-test-js-date-picker-screenshot-have-to-match-the-date-picker-trigger-button-in-error-state-1-d76c4.snap.png b/packages/dnb-eufemia/src/components/date-picker/__tests__/__snapshots__/date-picker-screenshot-test-js-date-picker-screenshot-have-to-match-the-date-picker-trigger-button-in-error-state-1-d76c4.snap.png deleted file mode 100644 index 0c62cd58db0..00000000000 Binary files a/packages/dnb-eufemia/src/components/date-picker/__tests__/__snapshots__/date-picker-screenshot-test-js-date-picker-screenshot-have-to-match-the-date-picker-trigger-button-in-error-state-1-d76c4.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/date-picker/__tests__/__snapshots__/date-picker-screenshot-test-js-date-picker-screenshot-have-to-match-the-date-picker-with-input-in-error-state-1-10bf9.snap.png b/packages/dnb-eufemia/src/components/date-picker/__tests__/__snapshots__/date-picker-screenshot-test-js-date-picker-screenshot-have-to-match-the-date-picker-with-input-in-error-state-1-10bf9.snap.png deleted file mode 100644 index 09613374b5b..00000000000 Binary files a/packages/dnb-eufemia/src/components/date-picker/__tests__/__snapshots__/date-picker-screenshot-test-js-date-picker-screenshot-have-to-match-the-date-picker-with-input-in-error-state-1-10bf9.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/date-picker/__tests__/__snapshots__/date-picker-screenshot-test-js-date-picker-screenshot-have-to-match-the-input-fields-1-dcc04.snap.png b/packages/dnb-eufemia/src/components/date-picker/__tests__/__snapshots__/date-picker-screenshot-test-js-date-picker-screenshot-have-to-match-the-input-fields-1-dcc04.snap.png deleted file mode 100644 index 378a9f6e365..00000000000 Binary files a/packages/dnb-eufemia/src/components/date-picker/__tests__/__snapshots__/date-picker-screenshot-test-js-date-picker-screenshot-have-to-match-the-input-fields-1-dcc04.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/date-picker/__tests__/__snapshots__/date-picker-screenshot-test-js-date-picker-screenshot-have-to-match-the-sizes-1-b215e.snap.png b/packages/dnb-eufemia/src/components/date-picker/__tests__/__snapshots__/date-picker-screenshot-test-js-date-picker-screenshot-have-to-match-the-sizes-1-b215e.snap.png deleted file mode 100644 index 1e11b2fb3ab..00000000000 Binary files a/packages/dnb-eufemia/src/components/date-picker/__tests__/__snapshots__/date-picker-screenshot-test-js-date-picker-screenshot-have-to-match-the-sizes-1-b215e.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/dialog/__tests__/Dialog.screenshot.test.js b/packages/dnb-eufemia/src/components/dialog/__tests__/Dialog.screenshot.test.js deleted file mode 100644 index 0f141d74cad..00000000000 --- a/packages/dnb-eufemia/src/components/dialog/__tests__/Dialog.screenshot.test.js +++ /dev/null @@ -1,270 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -const pageViewport = { - width: 700, - height: 600, -} - -describe('Dialog screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/dialog/demos', - }) - - it('have to match default dialog trigger', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="dialog-default"] .dnb-modal__trigger', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match suffix dialog trigger', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="dialog-help-button"] .dnb-input', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match custom dialog trigger', async () => { - const screenshot = await testPageScreenshot({ - selector: - '[data-visual-test="dialog-custom-trigger"] .dnb-modal__trigger', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Dialog suffix screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/dialog/demos', - pageViewport, - }) - - it('have to match the dialog help window', async () => { - const screenshot = await testPageScreenshot({ - selector: 'div#dnb-modal-root', // only to make sure we have a valid selector - simulate: 'click', - simulateSelector: - '[data-visual-test="dialog-help-button"] button:first-of-type', - screenshotSelector: '.dnb-modal__content', - rootClassName: 'hide-page-content', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Dialog fullscreen screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/dialog/demos', - pageViewport, - }) - - it('have to match the dialog fullscreen window', async () => { - const screenshot = await testPageScreenshot({ - selector: 'div#dnb-modal-root', // only to make sure we have a valid selector - simulate: 'click', - simulateSelector: - '[data-visual-test="dialog-fullscreen"] button:first-of-type', - screenshotSelector: '.dnb-modal__content', - rootClassName: 'hide-page-content', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Dialog custom trigger screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/dialog/demos', - pageViewport, - }) - - it('have to match the dialog window using custom trigger', async () => { - const screenshot = await testPageScreenshot({ - selector: 'div#dnb-modal-root', // only to make sure we have a valid selector - simulate: 'click', - simulateSelector: - '[data-visual-test="dialog-custom-trigger"] button:first-of-type', - screenshotSelector: '.dnb-modal__content', - rootClassName: 'hide-page-content', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Dialog progressindicator screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/dialog/demos', - pageViewport, - }) - - it('have to match the dialog progressindicator window', async () => { - const screenshot = await testPageScreenshot({ - selector: 'div#dnb-modal-root', // only to make sure we have a valid selector - simulate: 'click', - simulateSelector: - '[data-visual-test="dialog-progress-indicator"] button:first-of-type', - screenshotSelector: '.dnb-modal__content', - rootClassName: 'hide-page-content', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Dialog custom screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/dialog/demos', - pageViewport, - }) - - it('have to match the custom dialog window', async () => { - const screenshot = await testPageScreenshot({ - selector: 'div#dnb-modal-root', // only to make sure we have a valid selector - simulate: 'click', - simulateSelector: - '[data-visual-test="full-dialog"] button:first-of-type', - screenshotSelector: '.dnb-modal__content', - rootClassName: 'hide-page-content', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Dialog confirmation screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/dialog/demos', - pageViewport, - }) - - it('have to match the default confirmation', async () => { - const screenshot = await testPageScreenshot({ - selector: 'div#dnb-modal-root', // only to make sure we have a valid selector - simulate: 'click', - simulateSelector: - '[data-visual-test="dialog-confirm-default"] button:first-of-type', - screenshotSelector: '.dnb-modal__content', - rootClassName: 'hide-page-content', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Dialog confirmation screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/dialog/demos', - pageViewport, - }) - - it('have to match the delete confirmation', async () => { - const screenshot = await testPageScreenshot({ - selector: 'div#dnb-modal-root', // only to make sure we have a valid selector - simulate: 'click', - simulateSelector: - '[data-visual-test="dialog-confirm-delete"] button:first-of-type', - screenshotSelector: '.dnb-modal__content', - rootClassName: 'hide-page-content', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Dialog confirmation screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/dialog/demos', - pageViewport, - }) - it('have to match the logged out confirmation', async () => { - const screenshot = await testPageScreenshot({ - selector: 'div#dnb-modal-root', // only to make sure we have a valid selector - simulate: 'click', - simulateSelector: - '[data-visual-test="dialog-confirm-loggedout"] button:first-of-type', - screenshotSelector: '.dnb-modal__content', - rootClassName: 'hide-page-content', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Dialog confirmation screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/dialog/demos', - pageViewport, - }) - it('have to match the cookie concent confirmation', async () => { - const screenshot = await testPageScreenshot({ - selector: 'div#dnb-modal-root', // only to make sure we have a valid selector - simulate: 'click', - simulateSelector: - '[data-visual-test="dialog-confirm-cookie"] button:first-of-type', - screenshotSelector: '.dnb-modal__content', - rootClassName: 'hide-page-content', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Dialog simple screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/dialog/demos', - pageViewport, - }) - - it('have to match the default dialog window', async () => { - const screenshot = await testPageScreenshot({ - selector: 'div#dnb-modal-root', // only to make sure we have a valid selector - simulate: 'click', - simulateSelector: - '[data-visual-test="dialog-default"] button:first-of-type', - screenshotSelector: '.dnb-modal__content', - rootClassName: 'hide-page-content', - waitBeforeSimulate: 200, - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Dialog scrollable content screenshot', () => { - const pageViewport = { - width: 400, - height: 400, - } - - setupPageScreenshot({ - url: '/uilib/components/dialog/demos', - pageViewport, - }) - - it('have to match scrolled to top', async () => { - await global.__PAGE__.setUserAgent('iPhone OS 15') - const screenshot = await testPageScreenshot({ - selector: 'div#dnb-modal-root', // only to make sure we have a valid selector - simulate: 'click', - simulateSelector: - '[data-visual-test="dialog-scroll-content"] button:first-of-type', - screenshotSelector: '.dnb-modal__content', - rootClassName: 'hide-page-content', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match scrolled to bottom', async () => { - await global.__PAGE__.setUserAgent('iPhone OS 15') - const screenshot = await testPageScreenshot({ - selector: 'div#dnb-modal-root', // only to make sure we have a valid selector - simulate: 'click', - reload: true, // reload because we add `scroll-to-bottom` - simulateSelector: - '[data-visual-test="dialog-scroll-content"] button:first-of-type', - screenshotSelector: '.dnb-modal__content', - rootClassName: ['hide-page-content', 'scroll-to-bottom'], - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/components/dialog/__tests__/Dialog.screenshot.test.ts b/packages/dnb-eufemia/src/components/dialog/__tests__/Dialog.screenshot.test.ts new file mode 100644 index 00000000000..87214756ba8 --- /dev/null +++ b/packages/dnb-eufemia/src/components/dialog/__tests__/Dialog.screenshot.test.ts @@ -0,0 +1,209 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { makeScreenshot } from '../../../core/jest/jestSetupScreenshots' + +describe('Dialog', () => { + const defaults = { + url: '/uilib/components/dialog/demos', + pageViewport: { + width: 700, + height: 600, + }, + } + + it('have to match default dialog trigger', async () => { + const screenshot = await makeScreenshot({ + ...defaults, + selector: '[data-visual-test="dialog-default"] .dnb-modal__trigger', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match suffix dialog trigger', async () => { + const screenshot = await makeScreenshot({ + ...defaults, + selector: '[data-visual-test="dialog-help-button"] .dnb-input', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match custom dialog trigger', async () => { + const screenshot = await makeScreenshot({ + ...defaults, + selector: + '[data-visual-test="dialog-custom-trigger"] .dnb-modal__trigger', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the dialog help window', async () => { + const screenshot = await makeScreenshot({ + ...defaults, + selector: 'div#dnb-modal-root', // only to make sure we have a valid selector + simulate: 'click', + simulateSelector: + '[data-visual-test="dialog-help-button"] button:first-of-type', + screenshotSelector: '.dnb-modal__content', + rootClassName: 'hide-page-content', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the dialog fullscreen window', async () => { + const screenshot = await makeScreenshot({ + ...defaults, + selector: 'div#dnb-modal-root', // only to make sure we have a valid selector + simulate: 'click', + simulateSelector: + '[data-visual-test="dialog-fullscreen"] button:first-of-type', + screenshotSelector: '.dnb-modal__content', + rootClassName: 'hide-page-content', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the dialog window using custom trigger', async () => { + const screenshot = await makeScreenshot({ + ...defaults, + selector: 'div#dnb-modal-root', // only to make sure we have a valid selector + simulate: 'click', + simulateSelector: + '[data-visual-test="dialog-custom-trigger"] button:first-of-type', + screenshotSelector: '.dnb-modal__content', + rootClassName: 'hide-page-content', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the custom dialog window', async () => { + const screenshot = await makeScreenshot({ + ...defaults, + selector: 'div#dnb-modal-root', // only to make sure we have a valid selector + simulate: 'click', + simulateSelector: + '[data-visual-test="full-dialog"] button:first-of-type', + screenshotSelector: '.dnb-modal__content', + rootClassName: 'hide-page-content', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the default dialog window', async () => { + const screenshot = await makeScreenshot({ + ...defaults, + selector: 'div#dnb-modal-root', // only to make sure we have a valid selector + simulate: 'click', + simulateSelector: + '[data-visual-test="dialog-default"] button:first-of-type', + screenshotSelector: '.dnb-modal__content', + rootClassName: 'hide-page-content', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the default confirmation', async () => { + const screenshot = await makeScreenshot({ + ...defaults, + selector: 'div#dnb-modal-root', // only to make sure we have a valid selector + simulate: 'click', + simulateSelector: + '[data-visual-test="dialog-confirm-default"] button:first-of-type', + screenshotSelector: '.dnb-modal__content', + rootClassName: 'hide-page-content', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the delete confirmation', async () => { + const screenshot = await makeScreenshot({ + ...defaults, + selector: 'div#dnb-modal-root', // only to make sure we have a valid selector + simulate: 'click', + simulateSelector: + '[data-visual-test="dialog-confirm-delete"] button:first-of-type', + screenshotSelector: '.dnb-modal__content', + rootClassName: 'hide-page-content', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the logged out confirmation', async () => { + const screenshot = await makeScreenshot({ + ...defaults, + selector: 'div#dnb-modal-root', // only to make sure we have a valid selector + simulate: 'click', + simulateSelector: + '[data-visual-test="dialog-confirm-loggedout"] button:first-of-type', + screenshotSelector: '.dnb-modal__content', + rootClassName: 'hide-page-content', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the cookie concent confirmation', async () => { + const screenshot = await makeScreenshot({ + ...defaults, + selector: 'div#dnb-modal-root', // only to make sure we have a valid selector + simulate: 'click', + simulateSelector: + '[data-visual-test="dialog-confirm-cookie"] button:first-of-type', + screenshotSelector: '.dnb-modal__content', + rootClassName: 'hide-page-content', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the dialog progressindicator window', async () => { + const screenshot = await makeScreenshot({ + ...defaults, + selector: 'div#dnb-modal-root', // only to make sure we have a valid selector + simulate: 'click', + simulateSelector: + '[data-visual-test="dialog-progress-indicator"] button:first-of-type', + screenshotSelector: '.dnb-modal__content', + rootClassName: 'hide-page-content', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + describe('scrollable content', () => { + const defaults = { + url: '/uilib/components/dialog/demos', + pageViewport: { + width: 400, + height: 400, + }, + headers: { 'User-Agent': 'iPhone OS 15' }, + waitAfterSimulateSelector: '.dnb-scroll-view', + } + + it('have to match scrolled to top', async () => { + const screenshot = await makeScreenshot({ + ...defaults, + selector: 'div#dnb-modal-root', // only to make sure we have a valid selector + simulate: 'click', + simulateSelector: + '[data-visual-test="dialog-scroll-content"] button:first-of-type', + screenshotSelector: '.dnb-modal__content', + rootClassName: 'hide-page-content', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match scrolled to bottom', async () => { + const screenshot = await makeScreenshot({ + ...defaults, + selector: 'div#dnb-modal-root', // only to make sure we have a valid selector + simulate: 'click', + simulateSelector: + '[data-visual-test="dialog-scroll-content"] button:first-of-type', + screenshotSelector: '.dnb-modal__content', + rootClassName: ['hide-page-content', 'scroll-to-bottom'], + }) + expect(screenshot).toMatchImageSnapshot() + }) + }) +}) diff --git a/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-have-to-match-custom-dialog-trigger.snap.png b/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-have-to-match-custom-dialog-trigger.snap.png new file mode 100644 index 00000000000..6a1df5d0c0e Binary files /dev/null and b/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-have-to-match-custom-dialog-trigger.snap.png differ diff --git a/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-have-to-match-default-dialog-trigger.snap.png b/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-have-to-match-default-dialog-trigger.snap.png new file mode 100644 index 00000000000..faeec401821 Binary files /dev/null and b/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-have-to-match-default-dialog-trigger.snap.png differ diff --git a/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-have-to-match-suffix-dialog-trigger.snap.png b/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-have-to-match-suffix-dialog-trigger.snap.png new file mode 100644 index 00000000000..73f605f5e3f Binary files /dev/null and b/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-have-to-match-suffix-dialog-trigger.snap.png differ diff --git a/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-have-to-match-the-cookie-concent-confirmation.snap.png b/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-have-to-match-the-cookie-concent-confirmation.snap.png new file mode 100644 index 00000000000..9b2f72b30c5 Binary files /dev/null and b/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-have-to-match-the-cookie-concent-confirmation.snap.png differ diff --git a/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-have-to-match-the-custom-dialog-window.snap.png b/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-have-to-match-the-custom-dialog-window.snap.png new file mode 100644 index 00000000000..926f784356c Binary files /dev/null and b/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-have-to-match-the-custom-dialog-window.snap.png differ diff --git a/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-have-to-match-the-default-confirmation.snap.png b/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-have-to-match-the-default-confirmation.snap.png new file mode 100644 index 00000000000..4a30ce9d97b Binary files /dev/null and b/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-have-to-match-the-default-confirmation.snap.png differ diff --git a/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-have-to-match-the-default-dialog-window.snap.png b/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-have-to-match-the-default-dialog-window.snap.png new file mode 100644 index 00000000000..1c9da00d94d Binary files /dev/null and b/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-have-to-match-the-default-dialog-window.snap.png differ diff --git a/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-have-to-match-the-delete-confirmation.snap.png b/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-have-to-match-the-delete-confirmation.snap.png new file mode 100644 index 00000000000..382a53175da Binary files /dev/null and b/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-have-to-match-the-delete-confirmation.snap.png differ diff --git a/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-have-to-match-the-dialog-fullscreen-window.snap.png b/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-have-to-match-the-dialog-fullscreen-window.snap.png new file mode 100644 index 00000000000..d922c65305c Binary files /dev/null and b/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-have-to-match-the-dialog-fullscreen-window.snap.png differ diff --git a/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-have-to-match-the-dialog-help-window.snap.png b/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-have-to-match-the-dialog-help-window.snap.png new file mode 100644 index 00000000000..84539490925 Binary files /dev/null and b/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-have-to-match-the-dialog-help-window.snap.png differ diff --git a/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-have-to-match-the-dialog-progressindicator-window.snap.png b/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-have-to-match-the-dialog-progressindicator-window.snap.png new file mode 100644 index 00000000000..aeb692788a2 Binary files /dev/null and b/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-have-to-match-the-dialog-progressindicator-window.snap.png differ diff --git a/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-have-to-match-the-dialog-window-using-custom-trigger.snap.png b/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-have-to-match-the-dialog-window-using-custom-trigger.snap.png new file mode 100644 index 00000000000..97340c06832 Binary files /dev/null and b/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-have-to-match-the-dialog-window-using-custom-trigger.snap.png differ diff --git a/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-have-to-match-the-logged-out-confirmation.snap.png b/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-have-to-match-the-logged-out-confirmation.snap.png new file mode 100644 index 00000000000..d908351b69f Binary files /dev/null and b/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-have-to-match-the-logged-out-confirmation.snap.png differ diff --git a/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-scrollable-content-have-to-match-scrolled-to-bottom.snap.png b/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-scrollable-content-have-to-match-scrolled-to-bottom.snap.png new file mode 100644 index 00000000000..a33f2fb1372 Binary files /dev/null and b/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-scrollable-content-have-to-match-scrolled-to-bottom.snap.png differ diff --git a/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-scrollable-content-have-to-match-scrolled-to-top.snap.png b/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-scrollable-content-have-to-match-scrolled-to-top.snap.png new file mode 100644 index 00000000000..a92088ea5de Binary files /dev/null and b/packages/dnb-eufemia/src/components/dialog/__tests__/__image_snapshots__/dialog-scrollable-content-have-to-match-scrolled-to-top.snap.png differ diff --git a/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-confirm-screenshot-have-to-match-the-cookie-concent-confirmation-1-51694.snap.png b/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-confirm-screenshot-have-to-match-the-cookie-concent-confirmation-1-51694.snap.png deleted file mode 100644 index 0711bee34da..00000000000 Binary files a/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-confirm-screenshot-have-to-match-the-cookie-concent-confirmation-1-51694.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-confirm-screenshot-have-to-match-the-delete-confirmation-1-d92d1.snap.png b/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-confirm-screenshot-have-to-match-the-delete-confirmation-1-d92d1.snap.png deleted file mode 100644 index b1404fca22e..00000000000 Binary files a/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-confirm-screenshot-have-to-match-the-delete-confirmation-1-d92d1.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-confirm-screenshot-have-to-match-the-logged-out-confirmation-1-c7817.snap.png b/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-confirm-screenshot-have-to-match-the-logged-out-confirmation-1-c7817.snap.png deleted file mode 100644 index f2f2a409965..00000000000 Binary files a/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-confirm-screenshot-have-to-match-the-logged-out-confirmation-1-c7817.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-confirmation-screenshot-have-to-match-the-cookie-concent-confirmation-1-d7887.snap.png b/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-confirmation-screenshot-have-to-match-the-cookie-concent-confirmation-1-d7887.snap.png deleted file mode 100644 index 2d47714f530..00000000000 Binary files a/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-confirmation-screenshot-have-to-match-the-cookie-concent-confirmation-1-d7887.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-confirmation-screenshot-have-to-match-the-default-confirmation-1-9cac8.snap.png b/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-confirmation-screenshot-have-to-match-the-default-confirmation-1-9cac8.snap.png deleted file mode 100644 index 51a5a0f6b63..00000000000 Binary files a/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-confirmation-screenshot-have-to-match-the-default-confirmation-1-9cac8.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-confirmation-screenshot-have-to-match-the-delete-confirmation-1-43bd3.snap.png b/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-confirmation-screenshot-have-to-match-the-delete-confirmation-1-43bd3.snap.png deleted file mode 100644 index c5829167515..00000000000 Binary files a/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-confirmation-screenshot-have-to-match-the-delete-confirmation-1-43bd3.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-confirmation-screenshot-have-to-match-the-logged-out-confirmation-1-0c48e.snap.png b/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-confirmation-screenshot-have-to-match-the-logged-out-confirmation-1-0c48e.snap.png deleted file mode 100644 index 52cb5deed89..00000000000 Binary files a/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-confirmation-screenshot-have-to-match-the-logged-out-confirmation-1-0c48e.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-custom-screenshot-have-to-match-the-custom-dialog-window-1-46423.snap.png b/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-custom-screenshot-have-to-match-the-custom-dialog-window-1-46423.snap.png deleted file mode 100644 index b25eeab1534..00000000000 Binary files a/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-custom-screenshot-have-to-match-the-custom-dialog-window-1-46423.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-custom-trigger-screenshot-have-to-match-the-dialog-window-using-custom-trigger-1-dd194.snap.png b/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-custom-trigger-screenshot-have-to-match-the-dialog-window-using-custom-trigger-1-dd194.snap.png deleted file mode 100644 index ef9c9f0754f..00000000000 Binary files a/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-custom-trigger-screenshot-have-to-match-the-dialog-window-using-custom-trigger-1-dd194.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-fullscreen-screenshot-have-to-match-the-dialog-fullscreen-window-1-cf329.snap.png b/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-fullscreen-screenshot-have-to-match-the-dialog-fullscreen-window-1-cf329.snap.png deleted file mode 100644 index f1cac38766d..00000000000 Binary files a/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-fullscreen-screenshot-have-to-match-the-dialog-fullscreen-window-1-cf329.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-progressindicator-screenshot-have-to-match-the-dialog-progressindicator-window-1-bf604.snap.png b/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-progressindicator-screenshot-have-to-match-the-dialog-progressindicator-window-1-bf604.snap.png deleted file mode 100644 index 81458254fe6..00000000000 Binary files a/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-progressindicator-screenshot-have-to-match-the-dialog-progressindicator-window-1-bf604.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-screenshot-have-to-match-custom-dialog-trigger-1-519b6.snap.png b/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-screenshot-have-to-match-custom-dialog-trigger-1-519b6.snap.png deleted file mode 100644 index 699cf0044c5..00000000000 Binary files a/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-screenshot-have-to-match-custom-dialog-trigger-1-519b6.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-screenshot-have-to-match-default-dialog-trigger-1-f057a.snap.png b/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-screenshot-have-to-match-default-dialog-trigger-1-f057a.snap.png deleted file mode 100644 index 512beb8ec51..00000000000 Binary files a/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-screenshot-have-to-match-default-dialog-trigger-1-f057a.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-screenshot-have-to-match-suffix-dialog-trigger-1-ace5a.snap.png b/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-screenshot-have-to-match-suffix-dialog-trigger-1-ace5a.snap.png deleted file mode 100644 index d55e1c97ddc..00000000000 Binary files a/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-screenshot-have-to-match-suffix-dialog-trigger-1-ace5a.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-scrollable-content-screenshot-have-to-match-scrolled-to-bottom-1-1a9d5.snap.png b/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-scrollable-content-screenshot-have-to-match-scrolled-to-bottom-1-1a9d5.snap.png deleted file mode 100644 index d1c9d2fd083..00000000000 Binary files a/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-scrollable-content-screenshot-have-to-match-scrolled-to-bottom-1-1a9d5.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-scrollable-content-screenshot-have-to-match-scrolled-to-top-1-67c0c.snap.png b/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-scrollable-content-screenshot-have-to-match-scrolled-to-top-1-67c0c.snap.png deleted file mode 100644 index 5e207fcecbd..00000000000 Binary files a/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-scrollable-content-screenshot-have-to-match-scrolled-to-top-1-67c0c.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-simple-screenshot-have-to-match-the-default-dialog-window-1-b17a5.snap.png b/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-simple-screenshot-have-to-match-the-default-dialog-window-1-b17a5.snap.png deleted file mode 100644 index 619fdab688e..00000000000 Binary files a/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-simple-screenshot-have-to-match-the-default-dialog-window-1-b17a5.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-suffix-screenshot-have-to-match-the-dialog-help-window-1-0eb69.snap.png b/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-suffix-screenshot-have-to-match-the-dialog-help-window-1-0eb69.snap.png deleted file mode 100644 index b3d78b46530..00000000000 Binary files a/packages/dnb-eufemia/src/components/dialog/__tests__/__snapshots__/dialog-screenshot-test-js-dialog-suffix-screenshot-have-to-match-the-dialog-help-window-1-0eb69.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/drawer/__tests__/Drawer.screenshot.test.js b/packages/dnb-eufemia/src/components/drawer/__tests__/Drawer.screenshot.test.js deleted file mode 100644 index bfb952f64ae..00000000000 --- a/packages/dnb-eufemia/src/components/drawer/__tests__/Drawer.screenshot.test.js +++ /dev/null @@ -1,136 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -const pageViewport = { - width: 700, - height: 600, -} - -describe('Drawer screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/drawer/demos', - }) - - it('have to match default drawer trigger with title', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="simple-drawer"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match default drawer trigger', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="full-drawer"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match customized drawer trigger', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="drawer-custom-trigger"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Drawer simple screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/drawer/demos', - pageViewport, - }) - - it('have to match default drawer window', async () => { - const screenshot = await testPageScreenshot({ - selector: 'div#dnb-modal-root', // only to make sure we have a valid selector - simulate: 'click', - simulateSelector: - '[data-visual-test="simple-drawer"] button:first-of-type', - screenshotSelector: '.dnb-modal__content', - rootClassName: 'hide-page-content', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Drawer full screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/drawer/demos', - pageViewport, - }) - - it('have to match default drawer window', async () => { - const screenshot = await testPageScreenshot({ - selector: 'div#dnb-modal-root', // only to make sure we have a valid selector - simulate: 'click', - simulateSelector: - '[data-visual-test="full-drawer"] button:first-of-type', - screenshotSelector: '.dnb-modal__content', - rootClassName: 'hide-page-content', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Drawer custom trigger screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/drawer/demos', - pageViewport, - }) - - it('have to match default drawer window', async () => { - const screenshot = await testPageScreenshot({ - selector: 'div#dnb-modal-root', // only to make sure we have a valid selector - simulate: 'click', - simulateSelector: - '[data-visual-test="callback-drawer"] button:first-of-type', - screenshotSelector: '.dnb-modal__content', - rootClassName: 'hide-page-content', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Drawer no animation/spacing screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/drawer/demos', - pageViewport, - }) - - it('have to match default drawer window', async () => { - const screenshot = await testPageScreenshot({ - selector: 'div#dnb-modal-root', // only to make sure we have a valid selector - simulate: 'click', - simulateSelector: - '[data-visual-test="drawer-no-animation"] button:first-of-type', - screenshotSelector: '.dnb-modal__content', - rootClassName: 'hide-page-content', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Drawer screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/drawer/visual-tests/hidden-tests', - pageViewport, - }) - - it('have to match correct scroll view setup', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="drawer-scroll-view"]', - simulate: 'click', - simulateSelector: - '[data-visual-test="drawer-scroll-view"] button:first-of-type', - screenshotSelector: '.drawer-scroll-view', - rootClassName: 'hide-page-content', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/components/drawer/__tests__/Drawer.screenshot.test.ts b/packages/dnb-eufemia/src/components/drawer/__tests__/Drawer.screenshot.test.ts new file mode 100644 index 00000000000..f3b8386ce66 --- /dev/null +++ b/packages/dnb-eufemia/src/components/drawer/__tests__/Drawer.screenshot.test.ts @@ -0,0 +1,119 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { makeScreenshot } from '../../../core/jest/jestSetupScreenshots' + +const url = '/uilib/components/drawer/demos' +const rootClassName = 'hide-page-content' +const executeBeforeScreenshot = () => { + setTimeout(() => { + document.querySelector('.dnb-scroll-view').scroll({ top: 0 }) + }, 100) +} + +describe('Drawer', () => { + describe('large', () => { + it('have to match default drawer trigger with title', async () => { + const screenshot = await makeScreenshot({ + url, + selector: '[data-visual-test="simple-drawer"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match default drawer trigger', async () => { + const screenshot = await makeScreenshot({ + url, + selector: '[data-visual-test="full-drawer"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match customized drawer trigger', async () => { + const screenshot = await makeScreenshot({ + url, + selector: '[data-visual-test="drawer-custom-trigger"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + }) + + describe('open', () => { + const pageViewport = { + width: 700, + height: 600, + } + + const defaults = { + url, + pageViewport, + rootClassName, + executeBeforeScreenshot, + waitAfterSimulateSelector: '.dnb-scroll-view', + } + + it('have to match simple drawer window', async () => { + const screenshot = await makeScreenshot({ + selector: 'div#dnb-modal-root', // only to make sure we have a valid selector + simulate: 'click', + simulateSelector: + '[data-visual-test="simple-drawer"] button:first-of-type', + screenshotSelector: '.dnb-modal__content', + ...defaults, + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match full drawer window', async () => { + const screenshot = await makeScreenshot({ + selector: 'div#dnb-modal-root', // only to make sure we have a valid selector + simulate: 'click', + simulateSelector: + '[data-visual-test="full-drawer"] button:first-of-type', + screenshotSelector: '.dnb-modal__content', + ...defaults, + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match callback drawer window', async () => { + const screenshot = await makeScreenshot({ + selector: 'div#dnb-modal-root', // only to make sure we have a valid selector + simulate: 'click', + simulateSelector: + '[data-visual-test="callback-drawer"] button:first-of-type', + screenshotSelector: '.dnb-modal__content', + ...defaults, + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match no-animation drawer window', async () => { + const screenshot = await makeScreenshot({ + selector: 'div#dnb-modal-root', // only to make sure we have a valid selector + simulate: 'click', + simulateSelector: + '[data-visual-test="drawer-no-animation"] button:first-of-type', + screenshotSelector: '.dnb-modal__content', + ...defaults, + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match correct scroll view setup', async () => { + const screenshot = await makeScreenshot({ + url: '/uilib/components/drawer/visual-tests/hidden-tests', + pageViewport, + selector: '[data-visual-test="drawer-scroll-view"]', + simulate: 'click', + simulateSelector: + '[data-visual-test="drawer-scroll-view"] button:first-of-type', + screenshotSelector: '.drawer-scroll-view', + rootClassName, + }) + expect(screenshot).toMatchImageSnapshot() + }) + }) +}) diff --git a/packages/dnb-eufemia/src/components/drawer/__tests__/__image_snapshots__/drawer-large-have-to-match-customized-drawer-trigger.snap.png b/packages/dnb-eufemia/src/components/drawer/__tests__/__image_snapshots__/drawer-large-have-to-match-customized-drawer-trigger.snap.png new file mode 100644 index 00000000000..0d2ef0fbd2a Binary files /dev/null and b/packages/dnb-eufemia/src/components/drawer/__tests__/__image_snapshots__/drawer-large-have-to-match-customized-drawer-trigger.snap.png differ diff --git a/packages/dnb-eufemia/src/components/drawer/__tests__/__image_snapshots__/drawer-large-have-to-match-default-drawer-trigger-with-title.snap.png b/packages/dnb-eufemia/src/components/drawer/__tests__/__image_snapshots__/drawer-large-have-to-match-default-drawer-trigger-with-title.snap.png new file mode 100644 index 00000000000..adb7f589a29 Binary files /dev/null and b/packages/dnb-eufemia/src/components/drawer/__tests__/__image_snapshots__/drawer-large-have-to-match-default-drawer-trigger-with-title.snap.png differ diff --git a/packages/dnb-eufemia/src/components/drawer/__tests__/__image_snapshots__/drawer-large-have-to-match-default-drawer-trigger.snap.png b/packages/dnb-eufemia/src/components/drawer/__tests__/__image_snapshots__/drawer-large-have-to-match-default-drawer-trigger.snap.png new file mode 100644 index 00000000000..faeec401821 Binary files /dev/null and b/packages/dnb-eufemia/src/components/drawer/__tests__/__image_snapshots__/drawer-large-have-to-match-default-drawer-trigger.snap.png differ diff --git a/packages/dnb-eufemia/src/components/drawer/__tests__/__image_snapshots__/drawer-open-have-to-match-callback-drawer-window.snap.png b/packages/dnb-eufemia/src/components/drawer/__tests__/__image_snapshots__/drawer-open-have-to-match-callback-drawer-window.snap.png new file mode 100644 index 00000000000..1226ffd83f7 Binary files /dev/null and b/packages/dnb-eufemia/src/components/drawer/__tests__/__image_snapshots__/drawer-open-have-to-match-callback-drawer-window.snap.png differ diff --git a/packages/dnb-eufemia/src/components/drawer/__tests__/__image_snapshots__/drawer-open-have-to-match-correct-scroll-view-setup.snap.png b/packages/dnb-eufemia/src/components/drawer/__tests__/__image_snapshots__/drawer-open-have-to-match-correct-scroll-view-setup.snap.png new file mode 100644 index 00000000000..7bb0d1be8ac Binary files /dev/null and b/packages/dnb-eufemia/src/components/drawer/__tests__/__image_snapshots__/drawer-open-have-to-match-correct-scroll-view-setup.snap.png differ diff --git a/packages/dnb-eufemia/src/components/drawer/__tests__/__image_snapshots__/drawer-open-have-to-match-full-drawer-window.snap.png b/packages/dnb-eufemia/src/components/drawer/__tests__/__image_snapshots__/drawer-open-have-to-match-full-drawer-window.snap.png new file mode 100644 index 00000000000..4b56cfa9b26 Binary files /dev/null and b/packages/dnb-eufemia/src/components/drawer/__tests__/__image_snapshots__/drawer-open-have-to-match-full-drawer-window.snap.png differ diff --git a/packages/dnb-eufemia/src/components/drawer/__tests__/__image_snapshots__/drawer-open-have-to-match-no-animation-drawer-window.snap.png b/packages/dnb-eufemia/src/components/drawer/__tests__/__image_snapshots__/drawer-open-have-to-match-no-animation-drawer-window.snap.png new file mode 100644 index 00000000000..098d7956b3f Binary files /dev/null and b/packages/dnb-eufemia/src/components/drawer/__tests__/__image_snapshots__/drawer-open-have-to-match-no-animation-drawer-window.snap.png differ diff --git a/packages/dnb-eufemia/src/components/drawer/__tests__/__image_snapshots__/drawer-open-have-to-match-simple-drawer-window.snap.png b/packages/dnb-eufemia/src/components/drawer/__tests__/__image_snapshots__/drawer-open-have-to-match-simple-drawer-window.snap.png new file mode 100644 index 00000000000..b7dd335668b Binary files /dev/null and b/packages/dnb-eufemia/src/components/drawer/__tests__/__image_snapshots__/drawer-open-have-to-match-simple-drawer-window.snap.png differ diff --git a/packages/dnb-eufemia/src/components/drawer/__tests__/__snapshots__/drawer-screenshot-test-js-drawer-custom-trigger-screenshot-have-to-match-default-drawer-window-1-61a92.snap.png b/packages/dnb-eufemia/src/components/drawer/__tests__/__snapshots__/drawer-screenshot-test-js-drawer-custom-trigger-screenshot-have-to-match-default-drawer-window-1-61a92.snap.png deleted file mode 100644 index cfabfb46d04..00000000000 Binary files a/packages/dnb-eufemia/src/components/drawer/__tests__/__snapshots__/drawer-screenshot-test-js-drawer-custom-trigger-screenshot-have-to-match-default-drawer-window-1-61a92.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/drawer/__tests__/__snapshots__/drawer-screenshot-test-js-drawer-full-screenshot-have-to-match-default-drawer-window-1-9a1ea.snap.png b/packages/dnb-eufemia/src/components/drawer/__tests__/__snapshots__/drawer-screenshot-test-js-drawer-full-screenshot-have-to-match-default-drawer-window-1-9a1ea.snap.png deleted file mode 100644 index a8c7ae7cbef..00000000000 Binary files a/packages/dnb-eufemia/src/components/drawer/__tests__/__snapshots__/drawer-screenshot-test-js-drawer-full-screenshot-have-to-match-default-drawer-window-1-9a1ea.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/drawer/__tests__/__snapshots__/drawer-screenshot-test-js-drawer-no-animation-spacing-screenshot-have-to-match-default-drawer-window-1-11b99.snap.png b/packages/dnb-eufemia/src/components/drawer/__tests__/__snapshots__/drawer-screenshot-test-js-drawer-no-animation-spacing-screenshot-have-to-match-default-drawer-window-1-11b99.snap.png deleted file mode 100644 index 3954852f395..00000000000 Binary files a/packages/dnb-eufemia/src/components/drawer/__tests__/__snapshots__/drawer-screenshot-test-js-drawer-no-animation-spacing-screenshot-have-to-match-default-drawer-window-1-11b99.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/drawer/__tests__/__snapshots__/drawer-screenshot-test-js-drawer-screenshot-have-to-match-correct-scroll-view-setup-1-ed515.snap.png b/packages/dnb-eufemia/src/components/drawer/__tests__/__snapshots__/drawer-screenshot-test-js-drawer-screenshot-have-to-match-correct-scroll-view-setup-1-ed515.snap.png deleted file mode 100644 index e3bc21b6888..00000000000 Binary files a/packages/dnb-eufemia/src/components/drawer/__tests__/__snapshots__/drawer-screenshot-test-js-drawer-screenshot-have-to-match-correct-scroll-view-setup-1-ed515.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/drawer/__tests__/__snapshots__/drawer-screenshot-test-js-drawer-screenshot-have-to-match-customized-drawer-trigger-1-93330.snap.png b/packages/dnb-eufemia/src/components/drawer/__tests__/__snapshots__/drawer-screenshot-test-js-drawer-screenshot-have-to-match-customized-drawer-trigger-1-93330.snap.png deleted file mode 100644 index 942c384fed8..00000000000 Binary files a/packages/dnb-eufemia/src/components/drawer/__tests__/__snapshots__/drawer-screenshot-test-js-drawer-screenshot-have-to-match-customized-drawer-trigger-1-93330.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/drawer/__tests__/__snapshots__/drawer-screenshot-test-js-drawer-screenshot-have-to-match-default-drawer-trigger-1-794d3.snap.png b/packages/dnb-eufemia/src/components/drawer/__tests__/__snapshots__/drawer-screenshot-test-js-drawer-screenshot-have-to-match-default-drawer-trigger-1-794d3.snap.png deleted file mode 100644 index c90ec240423..00000000000 Binary files a/packages/dnb-eufemia/src/components/drawer/__tests__/__snapshots__/drawer-screenshot-test-js-drawer-screenshot-have-to-match-default-drawer-trigger-1-794d3.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/drawer/__tests__/__snapshots__/drawer-screenshot-test-js-drawer-screenshot-have-to-match-default-drawer-trigger-with-title-1-0c2df.snap.png b/packages/dnb-eufemia/src/components/drawer/__tests__/__snapshots__/drawer-screenshot-test-js-drawer-screenshot-have-to-match-default-drawer-trigger-with-title-1-0c2df.snap.png deleted file mode 100644 index 5628fe74d13..00000000000 Binary files a/packages/dnb-eufemia/src/components/drawer/__tests__/__snapshots__/drawer-screenshot-test-js-drawer-screenshot-have-to-match-default-drawer-trigger-with-title-1-0c2df.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/drawer/__tests__/__snapshots__/drawer-screenshot-test-js-drawer-simple-screenshot-have-to-match-default-drawer-window-1-a61a9.snap.png b/packages/dnb-eufemia/src/components/drawer/__tests__/__snapshots__/drawer-screenshot-test-js-drawer-simple-screenshot-have-to-match-default-drawer-window-1-a61a9.snap.png deleted file mode 100644 index 7551fd4dbb6..00000000000 Binary files a/packages/dnb-eufemia/src/components/drawer/__tests__/__snapshots__/drawer-screenshot-test-js-drawer-simple-screenshot-have-to-match-default-drawer-window-1-a61a9.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/dropdown/__tests__/Dropdown.screenshot.test.js b/packages/dnb-eufemia/src/components/dropdown/__tests__/Dropdown.screenshot.test.js deleted file mode 100644 index 12d68bde944..00000000000 --- a/packages/dnb-eufemia/src/components/dropdown/__tests__/Dropdown.screenshot.test.js +++ /dev/null @@ -1,225 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -describe('Dropdown screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/dropdown/demos', - timeout: 300e3, - }) - - it('have to match the closed dropdown', async () => { - const screenshot = await testPageScreenshot({ - selector: - '[data-visual-test="dropdown-closed"] .dnb-dropdown__inner', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match different sizes', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="dropdown-sizes"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match disabled state', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="dropdown-disabled"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match disabled state', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="dropdown-disabled-tertiary"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the dropdown with icon on left side', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="dropdown-left-icon"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the dropdown with status: error', async () => { - const screenshot = await testPageScreenshot({ - selector: - '[data-visual-test="dropdown-status-error"] .dnb-dropdown__inner', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the dropdown as more_menu', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="dropdown-more_menu"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the dropdown with tertiary button', async () => { - const screenshot = await testPageScreenshot({ - selector: - '[data-visual-test="dropdown-tertiary"] .dnb-dropdown__inner', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the dropdown as action menu', async () => { - const screenshot = await testPageScreenshot({ - selector: - '[data-visual-test="dropdown-action_menu"] .dnb-dropdown__inner', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the closed dropdown with focus', async () => { - const screenshot = await testPageScreenshot({ - selector: - '[data-visual-test="dropdown-closed"] .dnb-dropdown__inner', - simulateSelector: - '[data-visual-test="dropdown-closed"] .dnb-dropdown__trigger', - simulate: 'focus', // should be tested first - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the closed dropdown with hover', async () => { - const screenshot = await testPageScreenshot({ - selector: - '[data-visual-test="dropdown-closed"] .dnb-dropdown__inner', - simulateSelector: - '[data-visual-test="dropdown-closed"] .dnb-dropdown__trigger', - simulate: 'hover', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the dropdown items', async () => { - const screenshot = await testPageScreenshot({ - style: { - width: '14rem', - }, - selector: - '[data-visual-test="dropdown-list"] .dnb-drawer-list__list', - simulateSelector: - '[data-visual-test="dropdown-list"] .dnb-drawer-list__option:nth-of-type(1)', - simulate: 'hover', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the dropdown button in active state', async () => { - const screenshot = await testPageScreenshot({ - selector: - '[data-visual-test="dropdown-closed"] .dnb-dropdown__inner', - simulateSelector: - '[data-visual-test="dropdown-closed"] .dnb-dropdown__trigger', - simulate: 'longclick', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the dropdown button with ellipsis overflow', async () => { - const screenshot = await testPageScreenshot({ - selector: - '[data-visual-test="dropdown-ellipsis"] .dnb-dropdown__inner', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Dropdown screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/dropdown/demos?action_menu-custom', - pageViewport: { - width: 2000, - }, - }) - - it('have to match the dropdown action menu with custom items', async () => { - const screenshot = await testPageScreenshot({ - reload: true, - selector: '[data-visual-test="dropdown-action_menu-custom"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Dropdown screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/dropdown/demos?action_menu-custom', - pageViewport: { - width: 600, - }, - }) - - it('have to match the dropdown action menu in mobile view', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="dropdown-action_menu-custom"]', - style: { - width: '14rem', - }, - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Dropdown screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/dropdown/demos?item-directions', - pageViewport: { - width: 480, - }, - }) - - it('have to match different item directions', async () => { - const screenshot = await testPageScreenshot({ - style: { - 'padding-top': '16rem', - }, - selector: '[data-visual-test="dropdown-item-directions"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Dropdown screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/dropdown/demos?left-side', - pageViewport: { - width: 480, - }, - }) - - it('have to match the dropdown as more_menu opened on left side', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="dropdown-more_menu"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Dropdown screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/dropdown/demos?right-side', - pageViewport: { - width: 480, - }, - }) - - it('have to match the dropdown as more_menu opened on right side', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="dropdown-more_menu"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/components/dropdown/__tests__/Dropdown.screenshot.test.ts b/packages/dnb-eufemia/src/components/dropdown/__tests__/Dropdown.screenshot.test.ts new file mode 100644 index 00000000000..8d6eb1302eb --- /dev/null +++ b/packages/dnb-eufemia/src/components/dropdown/__tests__/Dropdown.screenshot.test.ts @@ -0,0 +1,207 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { makeScreenshot } from '../../../core/jest/jestSetupScreenshots' + +describe('Dropdown', () => { + const defaults = { + url: '/uilib/components/dropdown/demos', + } + + it('have to match the closed dropdown', async () => { + const screenshot = await makeScreenshot({ + ...defaults, + selector: + '[data-visual-test="dropdown-closed"] .dnb-dropdown__inner', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match different sizes', async () => { + const screenshot = await makeScreenshot({ + ...defaults, + selector: '[data-visual-test="dropdown-sizes"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match disabled state', async () => { + const screenshot = await makeScreenshot({ + ...defaults, + selector: '[data-visual-test="dropdown-disabled"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match tertiary variant disabled state', async () => { + const screenshot = await makeScreenshot({ + ...defaults, + selector: '[data-visual-test="dropdown-disabled-tertiary"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the dropdown with icon on left side', async () => { + const screenshot = await makeScreenshot({ + ...defaults, + selector: '[data-visual-test="dropdown-left-icon"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the dropdown with status: error', async () => { + const screenshot = await makeScreenshot({ + ...defaults, + selector: + '[data-visual-test="dropdown-status-error"] .dnb-dropdown__inner', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the dropdown with tertiary button', async () => { + const screenshot = await makeScreenshot({ + ...defaults, + selector: + '[data-visual-test="dropdown-tertiary"] .dnb-dropdown__inner', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the dropdown as action menu', async () => { + const screenshot = await makeScreenshot({ + ...defaults, + selector: + '[data-visual-test="dropdown-action_menu"] .dnb-dropdown__inner', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match different item directions', async () => { + const screenshot = await makeScreenshot({ + url: '/uilib/components/dropdown/demos?item-directions', + pageViewport: { + width: 480, + height: 480, + }, + style: { + 'padding-top': '16rem', + }, + selector: '[data-visual-test="dropdown-item-directions"]', + simulateSelector: + '[data-visual-test="dropdown-item-directions"] .dnb-dropdown__trigger', + waitAfterSimulate: 200, // it takes time for the portal to align + simulate: 'click', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the closed dropdown with focus', async () => { + const screenshot = await makeScreenshot({ + ...defaults, + selector: + '[data-visual-test="dropdown-closed"] .dnb-dropdown__inner', + simulateSelector: + '[data-visual-test="dropdown-closed"] .dnb-dropdown__trigger', + simulate: 'focus', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the closed dropdown with hover', async () => { + const screenshot = await makeScreenshot({ + ...defaults, + selector: + '[data-visual-test="dropdown-closed"] .dnb-dropdown__inner', + simulateSelector: + '[data-visual-test="dropdown-closed"] .dnb-dropdown__trigger', + simulate: 'hover', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the dropdown items', async () => { + const screenshot = await makeScreenshot({ + ...defaults, + style: { + width: '14rem', + }, + selector: + '[data-visual-test="dropdown-list"] .dnb-drawer-list__list', + simulateSelector: + '[data-visual-test="dropdown-list"] .dnb-drawer-list__option:nth-of-type(1)', + simulate: 'hover', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the dropdown button with ellipsis overflow', async () => { + const screenshot = await makeScreenshot({ + ...defaults, + selector: + '[data-visual-test="dropdown-ellipsis"] .dnb-dropdown__inner', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the dropdown action menu with custom items', async () => { + const screenshot = await makeScreenshot({ + url: '/uilib/components/dropdown/demos?action_menu-custom', + pageViewport: { + width: 2000, + }, + selector: '[data-visual-test="dropdown-action_menu-custom"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the dropdown action menu in mobile view', async () => { + const screenshot = await makeScreenshot({ + url: '/uilib/components/dropdown/demos?action_menu-custom', + pageViewport: { + width: 600, + }, + selector: '[data-visual-test="dropdown-action_menu-custom"]', + style: { + width: '14rem', + }, + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the dropdown button in active state', async () => { + const screenshot = await makeScreenshot({ + ...defaults, + selector: + '[data-visual-test="dropdown-closed"] .dnb-dropdown__inner', + simulateSelector: + '[data-visual-test="dropdown-closed"] .dnb-dropdown__trigger', + simulate: 'longclick', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the dropdown as more_menu opened on left side', async () => { + const screenshot = await makeScreenshot({ + url: '/uilib/components/dropdown/demos?left-side', + pageViewport: { + width: 480, + }, + selector: '[data-visual-test="dropdown-more_menu"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the dropdown as more_menu opened on right side', async () => { + const screenshot = await makeScreenshot({ + url: '/uilib/components/dropdown/demos?right-side', + pageViewport: { + width: 480, + height: 480, + }, + selector: '[data-visual-test="dropdown-more_menu"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-different-item-directions.snap.png b/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-different-item-directions.snap.png new file mode 100644 index 00000000000..7d0b77e9a99 Binary files /dev/null and b/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-different-item-directions.snap.png differ diff --git a/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-different-sizes.snap.png b/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-different-sizes.snap.png new file mode 100644 index 00000000000..e88e7096768 Binary files /dev/null and b/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-different-sizes.snap.png differ diff --git a/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-disabled-state.snap.png b/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-disabled-state.snap.png new file mode 100644 index 00000000000..8c30c6d8b43 Binary files /dev/null and b/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-disabled-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-tertiary-variant-disabled-state.snap.png b/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-tertiary-variant-disabled-state.snap.png new file mode 100644 index 00000000000..bb965ffeadd Binary files /dev/null and b/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-tertiary-variant-disabled-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-the-closed-dropdown-with-focus.snap.png b/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-the-closed-dropdown-with-focus.snap.png new file mode 100644 index 00000000000..6acd2897ceb Binary files /dev/null and b/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-the-closed-dropdown-with-focus.snap.png differ diff --git a/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-the-closed-dropdown-with-hover.snap.png b/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-the-closed-dropdown-with-hover.snap.png new file mode 100644 index 00000000000..96a2dd71335 Binary files /dev/null and b/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-the-closed-dropdown-with-hover.snap.png differ diff --git a/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-the-closed-dropdown.snap.png b/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-the-closed-dropdown.snap.png new file mode 100644 index 00000000000..f5e36a35353 Binary files /dev/null and b/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-the-closed-dropdown.snap.png differ diff --git a/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-the-dropdown-action-menu-in-mobile-view.snap.png b/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-the-dropdown-action-menu-in-mobile-view.snap.png new file mode 100644 index 00000000000..aa2875adc61 Binary files /dev/null and b/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-the-dropdown-action-menu-in-mobile-view.snap.png differ diff --git a/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-the-dropdown-action-menu-with-custom-items.snap.png b/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-the-dropdown-action-menu-with-custom-items.snap.png new file mode 100644 index 00000000000..1d1ec8d382d Binary files /dev/null and b/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-the-dropdown-action-menu-with-custom-items.snap.png differ diff --git a/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-the-dropdown-as-action-menu.snap.png b/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-the-dropdown-as-action-menu.snap.png new file mode 100644 index 00000000000..fabfb126636 Binary files /dev/null and b/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-the-dropdown-as-action-menu.snap.png differ diff --git a/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-the-dropdown-as-more-menu-opened-on-left-side.snap.png b/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-the-dropdown-as-more-menu-opened-on-left-side.snap.png new file mode 100644 index 00000000000..417e72cb144 Binary files /dev/null and b/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-the-dropdown-as-more-menu-opened-on-left-side.snap.png differ diff --git a/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-the-dropdown-as-more-menu-opened-on-right-side.snap.png b/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-the-dropdown-as-more-menu-opened-on-right-side.snap.png new file mode 100644 index 00000000000..dcf9ba5c245 Binary files /dev/null and b/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-the-dropdown-as-more-menu-opened-on-right-side.snap.png differ diff --git a/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-the-dropdown-button-in-active-state.snap.png b/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-the-dropdown-button-in-active-state.snap.png new file mode 100644 index 00000000000..d10280750c8 Binary files /dev/null and b/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-the-dropdown-button-in-active-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-the-dropdown-button-with-ellipsis-overflow.snap.png b/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-the-dropdown-button-with-ellipsis-overflow.snap.png new file mode 100644 index 00000000000..41fbb8cb5c7 Binary files /dev/null and b/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-the-dropdown-button-with-ellipsis-overflow.snap.png differ diff --git a/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-the-dropdown-items.snap.png b/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-the-dropdown-items.snap.png new file mode 100644 index 00000000000..8d7f8df5dfd Binary files /dev/null and b/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-the-dropdown-items.snap.png differ diff --git a/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-the-dropdown-with-icon-on-left-side.snap.png b/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-the-dropdown-with-icon-on-left-side.snap.png new file mode 100644 index 00000000000..0704f4fb066 Binary files /dev/null and b/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-the-dropdown-with-icon-on-left-side.snap.png differ diff --git a/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-the-dropdown-with-status-error.snap.png b/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-the-dropdown-with-status-error.snap.png new file mode 100644 index 00000000000..bf8d9c71c75 Binary files /dev/null and b/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-the-dropdown-with-status-error.snap.png differ diff --git a/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-the-dropdown-with-tertiary-button-1-c6e6d.snap.png b/packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-the-dropdown-with-tertiary-button.snap.png similarity index 100% rename from packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-the-dropdown-with-tertiary-button-1-c6e6d.snap.png rename to packages/dnb-eufemia/src/components/dropdown/__tests__/__image_snapshots__/dropdown-have-to-match-the-dropdown-with-tertiary-button.snap.png diff --git a/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-different-item-directions-1-e7d35.snap.png b/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-different-item-directions-1-e7d35.snap.png deleted file mode 100644 index 71774a2f8d5..00000000000 Binary files a/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-different-item-directions-1-e7d35.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-different-sizes-1-122c3.snap.png b/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-different-sizes-1-122c3.snap.png deleted file mode 100644 index 524c022c338..00000000000 Binary files a/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-different-sizes-1-122c3.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-disabled-state-1-68e0f.snap.png b/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-disabled-state-1-68e0f.snap.png deleted file mode 100644 index 64fef9e9eda..00000000000 Binary files a/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-disabled-state-1-68e0f.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-disabled-state-2-a6154.snap.png b/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-disabled-state-2-a6154.snap.png deleted file mode 100644 index 3b081a329c9..00000000000 Binary files a/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-disabled-state-2-a6154.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-the-closed-dropdown-1-a44f1.snap.png b/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-the-closed-dropdown-1-a44f1.snap.png deleted file mode 100644 index fba35bee4eb..00000000000 Binary files a/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-the-closed-dropdown-1-a44f1.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-the-closed-dropdown-with-focus-1-f250e.snap.png b/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-the-closed-dropdown-with-focus-1-f250e.snap.png deleted file mode 100644 index f62f224c7fa..00000000000 Binary files a/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-the-closed-dropdown-with-focus-1-f250e.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-the-closed-dropdown-with-hover-1-0d983.snap.png b/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-the-closed-dropdown-with-hover-1-0d983.snap.png deleted file mode 100644 index 5dd99c5cab4..00000000000 Binary files a/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-the-closed-dropdown-with-hover-1-0d983.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-the-dropdown-action-menu-in-mobile-view-1-36302.snap.png b/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-the-dropdown-action-menu-in-mobile-view-1-36302.snap.png deleted file mode 100644 index 7487fa086f3..00000000000 Binary files a/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-the-dropdown-action-menu-in-mobile-view-1-36302.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-the-dropdown-action-menu-with-custom-items-1-c5203.snap.png b/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-the-dropdown-action-menu-with-custom-items-1-c5203.snap.png deleted file mode 100644 index e4ce56e9566..00000000000 Binary files a/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-the-dropdown-action-menu-with-custom-items-1-c5203.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-the-dropdown-as-action-menu-1-1fa81.snap.png b/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-the-dropdown-as-action-menu-1-1fa81.snap.png deleted file mode 100644 index dcd2a4109b9..00000000000 Binary files a/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-the-dropdown-as-action-menu-1-1fa81.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-the-dropdown-as-more-menu-1-9f0ca.snap.png b/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-the-dropdown-as-more-menu-1-9f0ca.snap.png deleted file mode 100644 index ebbc9631bda..00000000000 Binary files a/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-the-dropdown-as-more-menu-1-9f0ca.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-the-dropdown-as-more-menu-opened-on-left-side-1-216e9.snap.png b/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-the-dropdown-as-more-menu-opened-on-left-side-1-216e9.snap.png deleted file mode 100644 index 98dbc861b32..00000000000 Binary files a/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-the-dropdown-as-more-menu-opened-on-left-side-1-216e9.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-the-dropdown-as-more-menu-opened-on-right-side-1-80e0e.snap.png b/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-the-dropdown-as-more-menu-opened-on-right-side-1-80e0e.snap.png deleted file mode 100644 index c948c86ba9b..00000000000 Binary files a/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-the-dropdown-as-more-menu-opened-on-right-side-1-80e0e.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-the-dropdown-button-in-active-state-1-4517e.snap.png b/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-the-dropdown-button-in-active-state-1-4517e.snap.png deleted file mode 100644 index c2f11d08044..00000000000 Binary files a/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-the-dropdown-button-in-active-state-1-4517e.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-the-dropdown-button-with-ellipsis-overflow-1-19163.snap.png b/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-the-dropdown-button-with-ellipsis-overflow-1-19163.snap.png deleted file mode 100644 index d37cb9a673c..00000000000 Binary files a/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-the-dropdown-button-with-ellipsis-overflow-1-19163.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-the-dropdown-items-1-aa276.snap.png b/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-the-dropdown-items-1-aa276.snap.png deleted file mode 100644 index f7222e39cdd..00000000000 Binary files a/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-the-dropdown-items-1-aa276.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-the-dropdown-with-icon-on-left-side-1-f6386.snap.png b/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-the-dropdown-with-icon-on-left-side-1-f6386.snap.png deleted file mode 100644 index 4371b60e960..00000000000 Binary files a/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-the-dropdown-with-icon-on-left-side-1-f6386.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-the-dropdown-with-status-error-1-87cb7.snap.png b/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-the-dropdown-with-status-error-1-87cb7.snap.png deleted file mode 100644 index 5b58179e214..00000000000 Binary files a/packages/dnb-eufemia/src/components/dropdown/__tests__/__snapshots__/dropdown-screenshot-test-js-dropdown-screenshot-have-to-match-the-dropdown-with-status-error-1-87cb7.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/form-label/__tests__/FormLabel.screenshot.test.js b/packages/dnb-eufemia/src/components/form-label/__tests__/FormLabel.screenshot.test.js deleted file mode 100644 index 7f553df0b5e..00000000000 --- a/packages/dnb-eufemia/src/components/form-label/__tests__/FormLabel.screenshot.test.js +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -describe('FormLabel screenshot', () => { - setupPageScreenshot({ url: '/uilib/components/form-label/demos' }) - // const style = { - // // Grid makes the pixel height 100% correct - // display: 'grid' - // } - - it('have to match default form-label', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="form-label-default"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match default form-label with hover', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="form-label-default"]', - simulate: 'hover', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match vertical form-label', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="form-label-vertical"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/components/form-label/__tests__/FormLabel.screenshot.test.ts b/packages/dnb-eufemia/src/components/form-label/__tests__/FormLabel.screenshot.test.ts new file mode 100644 index 00000000000..b6c483b2a48 --- /dev/null +++ b/packages/dnb-eufemia/src/components/form-label/__tests__/FormLabel.screenshot.test.ts @@ -0,0 +1,35 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../../core/jest/jestSetupScreenshots' + +describe('FormLabel', () => { + setupPageScreenshot({ url: '/uilib/components/form-label/demos' }) + + it('have to match default form-label', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="form-label-default"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match default form-label with hover', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="form-label-default"]', + simulate: 'hover', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match vertical form-label', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="form-label-vertical"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/components/form-label/__tests__/__image_snapshots__/formlabel-have-to-match-default-form-label-with-hover.snap.png b/packages/dnb-eufemia/src/components/form-label/__tests__/__image_snapshots__/formlabel-have-to-match-default-form-label-with-hover.snap.png new file mode 100644 index 00000000000..55b4fa88899 Binary files /dev/null and b/packages/dnb-eufemia/src/components/form-label/__tests__/__image_snapshots__/formlabel-have-to-match-default-form-label-with-hover.snap.png differ diff --git a/packages/dnb-eufemia/src/components/form-label/__tests__/__image_snapshots__/formlabel-have-to-match-default-form-label.snap.png b/packages/dnb-eufemia/src/components/form-label/__tests__/__image_snapshots__/formlabel-have-to-match-default-form-label.snap.png new file mode 100644 index 00000000000..c5b09d8928a Binary files /dev/null and b/packages/dnb-eufemia/src/components/form-label/__tests__/__image_snapshots__/formlabel-have-to-match-default-form-label.snap.png differ diff --git a/packages/dnb-eufemia/src/components/form-label/__tests__/__image_snapshots__/formlabel-have-to-match-vertical-form-label.snap.png b/packages/dnb-eufemia/src/components/form-label/__tests__/__image_snapshots__/formlabel-have-to-match-vertical-form-label.snap.png new file mode 100644 index 00000000000..de5da037330 Binary files /dev/null and b/packages/dnb-eufemia/src/components/form-label/__tests__/__image_snapshots__/formlabel-have-to-match-vertical-form-label.snap.png differ diff --git a/packages/dnb-eufemia/src/components/form-label/__tests__/__snapshots__/form-label-screenshot-test-js-form-label-screenshot-have-to-match-default-form-label-1-e0957.snap.png b/packages/dnb-eufemia/src/components/form-label/__tests__/__snapshots__/form-label-screenshot-test-js-form-label-screenshot-have-to-match-default-form-label-1-e0957.snap.png deleted file mode 100644 index f001b4d0e25..00000000000 Binary files a/packages/dnb-eufemia/src/components/form-label/__tests__/__snapshots__/form-label-screenshot-test-js-form-label-screenshot-have-to-match-default-form-label-1-e0957.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/form-label/__tests__/__snapshots__/form-label-screenshot-test-js-form-label-screenshot-have-to-match-default-form-label-with-hover-1-ae13a.snap.png b/packages/dnb-eufemia/src/components/form-label/__tests__/__snapshots__/form-label-screenshot-test-js-form-label-screenshot-have-to-match-default-form-label-with-hover-1-ae13a.snap.png deleted file mode 100644 index 1c7c87296d2..00000000000 Binary files a/packages/dnb-eufemia/src/components/form-label/__tests__/__snapshots__/form-label-screenshot-test-js-form-label-screenshot-have-to-match-default-form-label-with-hover-1-ae13a.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/form-label/__tests__/__snapshots__/form-label-screenshot-test-js-form-label-screenshot-have-to-match-vertical-form-label-1-ca57c.snap.png b/packages/dnb-eufemia/src/components/form-label/__tests__/__snapshots__/form-label-screenshot-test-js-form-label-screenshot-have-to-match-vertical-form-label-1-ca57c.snap.png deleted file mode 100644 index 1486aac639e..00000000000 Binary files a/packages/dnb-eufemia/src/components/form-label/__tests__/__snapshots__/form-label-screenshot-test-js-form-label-screenshot-have-to-match-vertical-form-label-1-ca57c.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/form-row/__tests__/FormRow.screenshot.test.js b/packages/dnb-eufemia/src/components/form-row/__tests__/FormRow.screenshot.test.js deleted file mode 100644 index c8eeb639288..00000000000 --- a/packages/dnb-eufemia/src/components/form-row/__tests__/FormRow.screenshot.test.js +++ /dev/null @@ -1,141 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - isCI, - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -if (isCI) { - jest.setTimeout(20e3) -} - -describe('FormRow screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/form-row/demos', - }) - - it('have to match default form-row', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="form-row-default"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match vertical form-row label', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="form-row-vertical-label"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match legend usage', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="form-row-legend"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match vertical form-row label with a button', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="form-row-vertical-label-button"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match vertical form-row', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="form-row-vertical"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match horizontal form-row', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="form-row-horizontal-no_wrap"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match horizontal wrap', async () => { - const screenshot = await testPageScreenshot({ - wrapperStyle: { - width: '80rem', - }, - selector: '[data-visual-test="form-row-horizontal-wrap"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match a combined form-row', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="form-row-combined"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - if (!isCI) { - const wrapperStyle = { - overflow: 'hidden', - } - - it('have to match "horizontal direction" with all components', async () => { - const screenshot = await testPageScreenshot({ - wrapperStyle, - selector: '[data-visual-test="form-row-all-horizontal-direction"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match "vertical direction" with all components', async () => { - const screenshot = await testPageScreenshot({ - wrapperStyle, - selector: '[data-visual-test="form-row-all-vertical-direction"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match "vertical everything" with all components', async () => { - const screenshot = await testPageScreenshot({ - wrapperStyle, - selector: '[data-visual-test="form-row-all-vertical-everything"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match "vertical label direction" with all components', async () => { - const screenshot = await testPageScreenshot({ - wrapperStyle, - selector: - '[data-visual-test="form-row-all-vertical-label-direction"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match "vertical label direction" (no label) with all components', async () => { - const screenshot = await testPageScreenshot({ - wrapperStyle, - selector: - '[data-visual-test="form-row-all-vertical-label-direction-no-label"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match centered form-row', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="form-row-centered"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match all stretch components', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="form-row-all-stretch-components"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - } -}) diff --git a/packages/dnb-eufemia/src/components/form-row/__tests__/FormRow.screenshot.test.ts b/packages/dnb-eufemia/src/components/form-row/__tests__/FormRow.screenshot.test.ts new file mode 100644 index 00000000000..81a9654b13b --- /dev/null +++ b/packages/dnb-eufemia/src/components/form-row/__tests__/FormRow.screenshot.test.ts @@ -0,0 +1,141 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + isCI, + makeScreenshot, + setupPageScreenshot, +} from '../../../core/jest/jestSetupScreenshots' + +if (isCI) { + jest.setTimeout(20e3) +} + +describe('FormRow', () => { + setupPageScreenshot({ + url: '/uilib/components/form-row/demos', + }) + + it('have to match default form-row', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="form-row-default"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match vertical form-row label', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="form-row-vertical-label"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match legend usage', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="form-row-legend"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match vertical form-row label with a button', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="form-row-vertical-label-button"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match vertical form-row', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="form-row-vertical"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match horizontal form-row', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="form-row-horizontal-no_wrap"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match horizontal wrap', async () => { + const screenshot = await makeScreenshot({ + wrapperStyle: { + width: '80rem', + }, + selector: '[data-visual-test="form-row-horizontal-wrap"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match a combined form-row', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="form-row-combined"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + if (!isCI) { + const wrapperStyle = { + overflow: 'hidden', + } + + it('have to match "horizontal direction" with all components', async () => { + const screenshot = await makeScreenshot({ + wrapperStyle, + selector: '[data-visual-test="form-row-all-horizontal-direction"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match "vertical direction" with all components', async () => { + const screenshot = await makeScreenshot({ + wrapperStyle, + selector: '[data-visual-test="form-row-all-vertical-direction"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match "vertical everything" with all components', async () => { + const screenshot = await makeScreenshot({ + wrapperStyle, + selector: '[data-visual-test="form-row-all-vertical-everything"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match "vertical label direction" with all components', async () => { + const screenshot = await makeScreenshot({ + wrapperStyle, + selector: + '[data-visual-test="form-row-all-vertical-label-direction"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match "vertical label direction" (no label) with all components', async () => { + const screenshot = await makeScreenshot({ + wrapperStyle, + selector: + '[data-visual-test="form-row-all-vertical-label-direction-no-label"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match centered form-row', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="form-row-centered"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match all stretch components', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="form-row-all-stretch-components"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + } +}) diff --git a/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-a-combined-form-row.snap.png b/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-a-combined-form-row.snap.png new file mode 100644 index 00000000000..1fa2e9382c9 Binary files /dev/null and b/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-a-combined-form-row.snap.png differ diff --git a/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-all-stretch-components.snap.png b/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-all-stretch-components.snap.png new file mode 100644 index 00000000000..4ce0532453d Binary files /dev/null and b/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-all-stretch-components.snap.png differ diff --git a/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-centered-form-row.snap.png b/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-centered-form-row.snap.png new file mode 100644 index 00000000000..4f9e9e4022c Binary files /dev/null and b/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-centered-form-row.snap.png differ diff --git a/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-default-form-row.snap.png b/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-default-form-row.snap.png new file mode 100644 index 00000000000..999a8f75af0 Binary files /dev/null and b/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-default-form-row.snap.png differ diff --git a/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-horizontal-direction-with-all-components.snap.png b/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-horizontal-direction-with-all-components.snap.png new file mode 100644 index 00000000000..ca9007aa0f9 Binary files /dev/null and b/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-horizontal-direction-with-all-components.snap.png differ diff --git a/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-horizontal-form-row.snap.png b/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-horizontal-form-row.snap.png new file mode 100644 index 00000000000..a2ca09b2962 Binary files /dev/null and b/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-horizontal-form-row.snap.png differ diff --git a/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-horizontal-wrap.snap.png b/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-horizontal-wrap.snap.png new file mode 100644 index 00000000000..9cb958df95f Binary files /dev/null and b/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-horizontal-wrap.snap.png differ diff --git a/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-legend-usage.snap.png b/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-legend-usage.snap.png new file mode 100644 index 00000000000..a7bc94dd5cc Binary files /dev/null and b/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-legend-usage.snap.png differ diff --git a/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-vertical-direction-with-all-components.snap.png b/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-vertical-direction-with-all-components.snap.png new file mode 100644 index 00000000000..80402e4d694 Binary files /dev/null and b/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-vertical-direction-with-all-components.snap.png differ diff --git a/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-vertical-everything-with-all-components.snap.png b/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-vertical-everything-with-all-components.snap.png new file mode 100644 index 00000000000..1f3bef98f03 Binary files /dev/null and b/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-vertical-everything-with-all-components.snap.png differ diff --git a/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-vertical-form-row-label-with-a-button.snap.png b/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-vertical-form-row-label-with-a-button.snap.png new file mode 100644 index 00000000000..a267186d524 Binary files /dev/null and b/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-vertical-form-row-label-with-a-button.snap.png differ diff --git a/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-vertical-form-row-label.snap.png b/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-vertical-form-row-label.snap.png new file mode 100644 index 00000000000..05bf88aa310 Binary files /dev/null and b/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-vertical-form-row-label.snap.png differ diff --git a/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-vertical-form-row.snap.png b/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-vertical-form-row.snap.png new file mode 100644 index 00000000000..b919892cfd7 Binary files /dev/null and b/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-vertical-form-row.snap.png differ diff --git a/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-vertical-label-direction-no-label-with-all-components.snap.png b/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-vertical-label-direction-no-label-with-all-components.snap.png new file mode 100644 index 00000000000..ef022baba68 Binary files /dev/null and b/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-vertical-label-direction-no-label-with-all-components.snap.png differ diff --git a/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-vertical-label-direction-with-all-components.snap.png b/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-vertical-label-direction-with-all-components.snap.png new file mode 100644 index 00000000000..364f939a45c Binary files /dev/null and b/packages/dnb-eufemia/src/components/form-row/__tests__/__image_snapshots__/formrow-have-to-match-vertical-label-direction-with-all-components.snap.png differ diff --git a/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-a-combined-form-row-1-0cc4d.snap.png b/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-a-combined-form-row-1-0cc4d.snap.png deleted file mode 100644 index a22d3f3768b..00000000000 Binary files a/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-a-combined-form-row-1-0cc4d.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-all-stretch-components-1-13f61.snap.png b/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-all-stretch-components-1-13f61.snap.png deleted file mode 100644 index c1ba862e858..00000000000 Binary files a/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-all-stretch-components-1-13f61.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-centered-form-row-1-09e9b.snap.png b/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-centered-form-row-1-09e9b.snap.png deleted file mode 100644 index 94fe7d84658..00000000000 Binary files a/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-centered-form-row-1-09e9b.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-default-form-row-1-eb4b4.snap.png b/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-default-form-row-1-eb4b4.snap.png deleted file mode 100644 index a37590e388a..00000000000 Binary files a/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-default-form-row-1-eb4b4.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-horizontal-direction-with-all-components-1-6ebdd.snap.png b/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-horizontal-direction-with-all-components-1-6ebdd.snap.png deleted file mode 100644 index 2d336ad168c..00000000000 Binary files a/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-horizontal-direction-with-all-components-1-6ebdd.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-horizontal-form-row-1-9bfef.snap.png b/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-horizontal-form-row-1-9bfef.snap.png deleted file mode 100644 index da526492f84..00000000000 Binary files a/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-horizontal-form-row-1-9bfef.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-horizontal-wrap-1-fc531.snap.png b/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-horizontal-wrap-1-fc531.snap.png deleted file mode 100644 index f780c748954..00000000000 Binary files a/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-horizontal-wrap-1-fc531.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-legend-usage-1-1212d.snap.png b/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-legend-usage-1-1212d.snap.png deleted file mode 100644 index d6d369da192..00000000000 Binary files a/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-legend-usage-1-1212d.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-vertical-direction-with-all-components-1-a19d9.snap.png b/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-vertical-direction-with-all-components-1-a19d9.snap.png deleted file mode 100644 index 94ef6c724ab..00000000000 Binary files a/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-vertical-direction-with-all-components-1-a19d9.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-vertical-everything-with-all-components-1-307fd.snap.png b/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-vertical-everything-with-all-components-1-307fd.snap.png deleted file mode 100644 index af74d5a7d7f..00000000000 Binary files a/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-vertical-everything-with-all-components-1-307fd.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-vertical-form-row-1-06900.snap.png b/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-vertical-form-row-1-06900.snap.png deleted file mode 100644 index 2e955d082b5..00000000000 Binary files a/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-vertical-form-row-1-06900.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-vertical-form-row-label-1-7028c.snap.png b/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-vertical-form-row-label-1-7028c.snap.png deleted file mode 100644 index 28d330220ab..00000000000 Binary files a/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-vertical-form-row-label-1-7028c.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-vertical-form-row-label-with-a-button-1-f31c7.snap.png b/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-vertical-form-row-label-with-a-button-1-f31c7.snap.png deleted file mode 100644 index 305c1040d5f..00000000000 Binary files a/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-vertical-form-row-label-with-a-button-1-f31c7.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-vertical-label-direction-no-label-with-all-components-1-f6c47.snap.png b/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-vertical-label-direction-no-label-with-all-components-1-f6c47.snap.png deleted file mode 100644 index d3a1e792822..00000000000 Binary files a/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-vertical-label-direction-no-label-with-all-components-1-f6c47.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-vertical-label-direction-with-all-components-1-7c1aa.snap.png b/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-vertical-label-direction-with-all-components-1-7c1aa.snap.png deleted file mode 100644 index 18a21df3fb5..00000000000 Binary files a/packages/dnb-eufemia/src/components/form-row/__tests__/__snapshots__/form-row-screenshot-test-js-form-row-screenshot-have-to-match-vertical-label-direction-with-all-components-1-7c1aa.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/form-set/__tests__/FormSet.screenshot.test.js b/packages/dnb-eufemia/src/components/form-set/__tests__/FormSet.screenshot.test.js deleted file mode 100644 index 0e184cf863a..00000000000 --- a/packages/dnb-eufemia/src/components/form-set/__tests__/FormSet.screenshot.test.js +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -describe('FormSet screenshot', () => { - // const style = { - // width: '60rem' // make sure our input gets an explicit width, because of mac/linux rendering differences - // } - setupPageScreenshot({ url: '/uilib/components/form-set/demos' }) - - it('have to match default form-set', async () => { - const screenshot = await testPageScreenshot({ - style: { - width: '40rem', // make sure our input gets an explicit width, because of mac/linux rendering differences - }, - selector: '[data-visual-test="form-set-default"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match vertical form-set', async () => { - const screenshot = await testPageScreenshot({ - style: { - width: '30rem', // make sure our input gets an explicit width, because of mac/linux rendering differences - }, - selector: '[data-visual-test="form-set-vertical"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/components/form-set/__tests__/FormSet.screenshot.test.ts b/packages/dnb-eufemia/src/components/form-set/__tests__/FormSet.screenshot.test.ts new file mode 100644 index 00000000000..27dd2a1e2a7 --- /dev/null +++ b/packages/dnb-eufemia/src/components/form-set/__tests__/FormSet.screenshot.test.ts @@ -0,0 +1,33 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../../core/jest/jestSetupScreenshots' + +describe('FormSet', () => { + setupPageScreenshot({ url: '/uilib/components/form-set/demos' }) + + it('have to match default form-set', async () => { + const screenshot = await makeScreenshot({ + style: { + width: '40rem', // make sure our input gets an explicit width, because of mac/linux rendering differences + }, + selector: '[data-visual-test="form-set-default"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match vertical form-set', async () => { + const screenshot = await makeScreenshot({ + style: { + width: '30rem', // make sure our input gets an explicit width, because of mac/linux rendering differences + }, + selector: '[data-visual-test="form-set-vertical"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/components/form-set/__tests__/__image_snapshots__/formset-have-to-match-default-form-set.snap.png b/packages/dnb-eufemia/src/components/form-set/__tests__/__image_snapshots__/formset-have-to-match-default-form-set.snap.png new file mode 100644 index 00000000000..df62d7964e2 Binary files /dev/null and b/packages/dnb-eufemia/src/components/form-set/__tests__/__image_snapshots__/formset-have-to-match-default-form-set.snap.png differ diff --git a/packages/dnb-eufemia/src/components/form-set/__tests__/__image_snapshots__/formset-have-to-match-vertical-form-set.snap.png b/packages/dnb-eufemia/src/components/form-set/__tests__/__image_snapshots__/formset-have-to-match-vertical-form-set.snap.png new file mode 100644 index 00000000000..a96f044e331 Binary files /dev/null and b/packages/dnb-eufemia/src/components/form-set/__tests__/__image_snapshots__/formset-have-to-match-vertical-form-set.snap.png differ diff --git a/packages/dnb-eufemia/src/components/form-set/__tests__/__snapshots__/form-set-screenshot-test-js-form-set-screenshot-have-to-match-default-form-set-1-361e8.snap.png b/packages/dnb-eufemia/src/components/form-set/__tests__/__snapshots__/form-set-screenshot-test-js-form-set-screenshot-have-to-match-default-form-set-1-361e8.snap.png deleted file mode 100644 index 72e9eab74a7..00000000000 Binary files a/packages/dnb-eufemia/src/components/form-set/__tests__/__snapshots__/form-set-screenshot-test-js-form-set-screenshot-have-to-match-default-form-set-1-361e8.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/form-set/__tests__/__snapshots__/form-set-screenshot-test-js-form-set-screenshot-have-to-match-vertical-form-set-1-837ff.snap.png b/packages/dnb-eufemia/src/components/form-set/__tests__/__snapshots__/form-set-screenshot-test-js-form-set-screenshot-have-to-match-vertical-form-set-1-837ff.snap.png deleted file mode 100644 index 11fb432d3a1..00000000000 Binary files a/packages/dnb-eufemia/src/components/form-set/__tests__/__snapshots__/form-set-screenshot-test-js-form-set-screenshot-have-to-match-vertical-form-set-1-837ff.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/form-status/__tests__/FormStatus.screenshot.test.js b/packages/dnb-eufemia/src/components/form-status/__tests__/FormStatus.screenshot.test.js deleted file mode 100644 index 80bc7353aee..00000000000 --- a/packages/dnb-eufemia/src/components/form-status/__tests__/FormStatus.screenshot.test.js +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -describe('FormStatus screenshot', () => { - setupPageScreenshot({ url: '/uilib/components/form-status/demos' }) - const style = { - 'max-width': '60rem', // make sure our input gets an explicit width, because of mac/linux rendering differences - } - - it('have to match the form-status with icon', async () => { - const screenshot = await testPageScreenshot({ - style, - selector: '[data-visual-test="form-status"] .dnb-form-status', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the info state', async () => { - const screenshot = await testPageScreenshot({ - style, - selector: '[data-visual-test="form-status-info"] .dnb-form-status', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match with stretch prop', async () => { - const screenshot = await testPageScreenshot({ - style: { - 'min-width': '60rem', - }, - selector: - '[data-visual-test="form-status-stretch"] .dnb-form-status', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the warn state', async () => { - const screenshot = await testPageScreenshot({ - style, - selector: '[data-visual-test="form-status-warn"] .dnb-form-status', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the marketing state', async () => { - const screenshot = await testPageScreenshot({ - style, - selector: '[data-visual-test="form-status-marketing"] .dnb-form-status', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match custom content', async () => { - const screenshot = await testPageScreenshot({ - style, - selector: '[data-visual-test="form-status-custom"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match icons used in the icon component', async () => { - const screenshot = await testPageScreenshot({ - style, - selector: '[data-visual-test="form-status-icons"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/components/form-status/__tests__/FormStatus.screenshot.test.ts b/packages/dnb-eufemia/src/components/form-status/__tests__/FormStatus.screenshot.test.ts new file mode 100644 index 00000000000..58de0a6a908 --- /dev/null +++ b/packages/dnb-eufemia/src/components/form-status/__tests__/FormStatus.screenshot.test.ts @@ -0,0 +1,76 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../../core/jest/jestSetupScreenshots' + +describe('FormStatus', () => { + setupPageScreenshot({ url: '/uilib/components/form-status/demos' }) + const style = { + 'max-width': '60rem', // make sure our input gets an explicit width, because of mac/linux rendering differences + } + + it('have to match the form-status with icon', async () => { + const screenshot = await makeScreenshot({ + style, + selector: '[data-visual-test="form-status"] .dnb-form-status', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the info state', async () => { + const screenshot = await makeScreenshot({ + style, + selector: '[data-visual-test="form-status-info"] .dnb-form-status', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match with stretch prop', async () => { + const screenshot = await makeScreenshot({ + style: { + 'min-width': '60rem', + }, + selector: + '[data-visual-test="form-status-stretch"] .dnb-form-status', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the warn state', async () => { + const screenshot = await makeScreenshot({ + style, + selector: '[data-visual-test="form-status-warn"] .dnb-form-status', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the marketing state', async () => { + const screenshot = await makeScreenshot({ + style, + selector: + '[data-visual-test="form-status-marketing"] .dnb-form-status', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match custom content', async () => { + const screenshot = await makeScreenshot({ + style, + selector: '[data-visual-test="form-status-custom"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match icons used in the icon component', async () => { + const screenshot = await makeScreenshot({ + style, + selector: '[data-visual-test="form-status-icons"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/components/form-status/__tests__/__image_snapshots__/formstatus-have-to-match-custom-content.snap.png b/packages/dnb-eufemia/src/components/form-status/__tests__/__image_snapshots__/formstatus-have-to-match-custom-content.snap.png new file mode 100644 index 00000000000..df25259147d Binary files /dev/null and b/packages/dnb-eufemia/src/components/form-status/__tests__/__image_snapshots__/formstatus-have-to-match-custom-content.snap.png differ diff --git a/packages/dnb-eufemia/src/components/form-status/__tests__/__image_snapshots__/formstatus-have-to-match-icons-used-in-the-icon-component.snap.png b/packages/dnb-eufemia/src/components/form-status/__tests__/__image_snapshots__/formstatus-have-to-match-icons-used-in-the-icon-component.snap.png new file mode 100644 index 00000000000..386fc3fedb1 Binary files /dev/null and b/packages/dnb-eufemia/src/components/form-status/__tests__/__image_snapshots__/formstatus-have-to-match-icons-used-in-the-icon-component.snap.png differ diff --git a/packages/dnb-eufemia/src/components/form-status/__tests__/__image_snapshots__/formstatus-have-to-match-the-form-status-with-icon.snap.png b/packages/dnb-eufemia/src/components/form-status/__tests__/__image_snapshots__/formstatus-have-to-match-the-form-status-with-icon.snap.png new file mode 100644 index 00000000000..919076c3297 Binary files /dev/null and b/packages/dnb-eufemia/src/components/form-status/__tests__/__image_snapshots__/formstatus-have-to-match-the-form-status-with-icon.snap.png differ diff --git a/packages/dnb-eufemia/src/components/form-status/__tests__/__image_snapshots__/formstatus-have-to-match-the-info-state.snap.png b/packages/dnb-eufemia/src/components/form-status/__tests__/__image_snapshots__/formstatus-have-to-match-the-info-state.snap.png new file mode 100644 index 00000000000..0d57360c9bb Binary files /dev/null and b/packages/dnb-eufemia/src/components/form-status/__tests__/__image_snapshots__/formstatus-have-to-match-the-info-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/form-status/__tests__/__image_snapshots__/formstatus-have-to-match-the-marketing-state.snap.png b/packages/dnb-eufemia/src/components/form-status/__tests__/__image_snapshots__/formstatus-have-to-match-the-marketing-state.snap.png new file mode 100644 index 00000000000..36de80ddf86 Binary files /dev/null and b/packages/dnb-eufemia/src/components/form-status/__tests__/__image_snapshots__/formstatus-have-to-match-the-marketing-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/form-status/__tests__/__image_snapshots__/formstatus-have-to-match-the-warn-state.snap.png b/packages/dnb-eufemia/src/components/form-status/__tests__/__image_snapshots__/formstatus-have-to-match-the-warn-state.snap.png new file mode 100644 index 00000000000..e53f66a11b9 Binary files /dev/null and b/packages/dnb-eufemia/src/components/form-status/__tests__/__image_snapshots__/formstatus-have-to-match-the-warn-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/form-status/__tests__/__image_snapshots__/formstatus-have-to-match-with-stretch-prop.snap.png b/packages/dnb-eufemia/src/components/form-status/__tests__/__image_snapshots__/formstatus-have-to-match-with-stretch-prop.snap.png new file mode 100644 index 00000000000..371173ee27d Binary files /dev/null and b/packages/dnb-eufemia/src/components/form-status/__tests__/__image_snapshots__/formstatus-have-to-match-with-stretch-prop.snap.png differ diff --git a/packages/dnb-eufemia/src/components/form-status/__tests__/__snapshots__/form-status-screenshot-test-js-form-status-screenshot-have-to-match-custom-content-1-f2fd5.snap.png b/packages/dnb-eufemia/src/components/form-status/__tests__/__snapshots__/form-status-screenshot-test-js-form-status-screenshot-have-to-match-custom-content-1-f2fd5.snap.png deleted file mode 100644 index 74fc387b574..00000000000 Binary files a/packages/dnb-eufemia/src/components/form-status/__tests__/__snapshots__/form-status-screenshot-test-js-form-status-screenshot-have-to-match-custom-content-1-f2fd5.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/form-status/__tests__/__snapshots__/form-status-screenshot-test-js-form-status-screenshot-have-to-match-icons-used-in-the-icon-component-1-ec863.snap.png b/packages/dnb-eufemia/src/components/form-status/__tests__/__snapshots__/form-status-screenshot-test-js-form-status-screenshot-have-to-match-icons-used-in-the-icon-component-1-ec863.snap.png deleted file mode 100644 index a0b77c745dd..00000000000 Binary files a/packages/dnb-eufemia/src/components/form-status/__tests__/__snapshots__/form-status-screenshot-test-js-form-status-screenshot-have-to-match-icons-used-in-the-icon-component-1-ec863.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/form-status/__tests__/__snapshots__/form-status-screenshot-test-js-form-status-screenshot-have-to-match-the-form-status-with-icon-1-3af4e.snap.png b/packages/dnb-eufemia/src/components/form-status/__tests__/__snapshots__/form-status-screenshot-test-js-form-status-screenshot-have-to-match-the-form-status-with-icon-1-3af4e.snap.png deleted file mode 100644 index 35a4d49e7d9..00000000000 Binary files a/packages/dnb-eufemia/src/components/form-status/__tests__/__snapshots__/form-status-screenshot-test-js-form-status-screenshot-have-to-match-the-form-status-with-icon-1-3af4e.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/form-status/__tests__/__snapshots__/form-status-screenshot-test-js-form-status-screenshot-have-to-match-the-info-state-1-8d514.snap.png b/packages/dnb-eufemia/src/components/form-status/__tests__/__snapshots__/form-status-screenshot-test-js-form-status-screenshot-have-to-match-the-info-state-1-8d514.snap.png deleted file mode 100644 index 8915be8d5b3..00000000000 Binary files a/packages/dnb-eufemia/src/components/form-status/__tests__/__snapshots__/form-status-screenshot-test-js-form-status-screenshot-have-to-match-the-info-state-1-8d514.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/form-status/__tests__/__snapshots__/form-status-screenshot-test-js-form-status-screenshot-have-to-match-the-marketing-state-1-3eb2e.snap.png b/packages/dnb-eufemia/src/components/form-status/__tests__/__snapshots__/form-status-screenshot-test-js-form-status-screenshot-have-to-match-the-marketing-state-1-3eb2e.snap.png deleted file mode 100644 index 9411ac0f68d..00000000000 Binary files a/packages/dnb-eufemia/src/components/form-status/__tests__/__snapshots__/form-status-screenshot-test-js-form-status-screenshot-have-to-match-the-marketing-state-1-3eb2e.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/form-status/__tests__/__snapshots__/form-status-screenshot-test-js-form-status-screenshot-have-to-match-the-warn-state-1-65621.snap.png b/packages/dnb-eufemia/src/components/form-status/__tests__/__snapshots__/form-status-screenshot-test-js-form-status-screenshot-have-to-match-the-warn-state-1-65621.snap.png deleted file mode 100644 index c62c9aae717..00000000000 Binary files a/packages/dnb-eufemia/src/components/form-status/__tests__/__snapshots__/form-status-screenshot-test-js-form-status-screenshot-have-to-match-the-warn-state-1-65621.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/form-status/__tests__/__snapshots__/form-status-screenshot-test-js-form-status-screenshot-have-to-match-with-stretch-prop-1-c31b1.snap.png b/packages/dnb-eufemia/src/components/form-status/__tests__/__snapshots__/form-status-screenshot-test-js-form-status-screenshot-have-to-match-with-stretch-prop-1-c31b1.snap.png deleted file mode 100644 index ea1d48be8b9..00000000000 Binary files a/packages/dnb-eufemia/src/components/form-status/__tests__/__snapshots__/form-status-screenshot-test-js-form-status-screenshot-have-to-match-with-stretch-prop-1-c31b1.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/global-error/__tests__/GlobalError.screenshot.test.js b/packages/dnb-eufemia/src/components/global-error/__tests__/GlobalError.screenshot.test.js deleted file mode 100644 index 109f622aea0..00000000000 --- a/packages/dnb-eufemia/src/components/global-error/__tests__/GlobalError.screenshot.test.js +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -describe('GlobalError screenshot', () => { - const style = { width: '25em' } - setupPageScreenshot({ - url: '/uilib/components/global-error/demos', - }) - - it('have to match the 404 status', async () => { - const screenshot = await testPageScreenshot({ - style, - selector: '[data-visual-test="global-error-404"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the 500 status', async () => { - const screenshot = await testPageScreenshot({ - style, - selector: '[data-visual-test="global-error-500"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/components/global-error/__tests__/GlobalError.screenshot.test.ts b/packages/dnb-eufemia/src/components/global-error/__tests__/GlobalError.screenshot.test.ts new file mode 100644 index 00000000000..1d523b5bc05 --- /dev/null +++ b/packages/dnb-eufemia/src/components/global-error/__tests__/GlobalError.screenshot.test.ts @@ -0,0 +1,32 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../../core/jest/jestSetupScreenshots' + +describe('GlobalError', () => { + const style = { width: '25em' } + setupPageScreenshot({ + url: '/uilib/components/global-error/demos', + }) + + it('have to match the 404 status', async () => { + const screenshot = await makeScreenshot({ + style, + selector: '[data-visual-test="global-error-404"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the 500 status', async () => { + const screenshot = await makeScreenshot({ + style, + selector: '[data-visual-test="global-error-500"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/components/global-error/__tests__/__image_snapshots__/globalerror-have-to-match-the-404-status.snap.png b/packages/dnb-eufemia/src/components/global-error/__tests__/__image_snapshots__/globalerror-have-to-match-the-404-status.snap.png new file mode 100644 index 00000000000..4f73ae091d6 Binary files /dev/null and b/packages/dnb-eufemia/src/components/global-error/__tests__/__image_snapshots__/globalerror-have-to-match-the-404-status.snap.png differ diff --git a/packages/dnb-eufemia/src/components/global-error/__tests__/__image_snapshots__/globalerror-have-to-match-the-500-status.snap.png b/packages/dnb-eufemia/src/components/global-error/__tests__/__image_snapshots__/globalerror-have-to-match-the-500-status.snap.png new file mode 100644 index 00000000000..e37cda5760d Binary files /dev/null and b/packages/dnb-eufemia/src/components/global-error/__tests__/__image_snapshots__/globalerror-have-to-match-the-500-status.snap.png differ diff --git a/packages/dnb-eufemia/src/components/global-error/__tests__/__snapshots__/global-error-screenshot-test-js-global-error-screenshot-have-to-match-the-404-status-1-d106c.snap.png b/packages/dnb-eufemia/src/components/global-error/__tests__/__snapshots__/global-error-screenshot-test-js-global-error-screenshot-have-to-match-the-404-status-1-d106c.snap.png deleted file mode 100644 index c073169bf32..00000000000 Binary files a/packages/dnb-eufemia/src/components/global-error/__tests__/__snapshots__/global-error-screenshot-test-js-global-error-screenshot-have-to-match-the-404-status-1-d106c.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/global-error/__tests__/__snapshots__/global-error-screenshot-test-js-global-error-screenshot-have-to-match-the-500-status-1-98b80.snap.png b/packages/dnb-eufemia/src/components/global-error/__tests__/__snapshots__/global-error-screenshot-test-js-global-error-screenshot-have-to-match-the-500-status-1-98b80.snap.png deleted file mode 100644 index 35cf8af5a83..00000000000 Binary files a/packages/dnb-eufemia/src/components/global-error/__tests__/__snapshots__/global-error-screenshot-test-js-global-error-screenshot-have-to-match-the-500-status-1-98b80.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/global-status/__tests__/GlobalStatus.screenshot.test.js b/packages/dnb-eufemia/src/components/global-status/__tests__/GlobalStatus.screenshot.test.js deleted file mode 100644 index 5d56a25a4aa..00000000000 --- a/packages/dnb-eufemia/src/components/global-status/__tests__/GlobalStatus.screenshot.test.js +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -const style = { width: '25rem' } - -describe('GlobalStatus screenshot', () => { - setupPageScreenshot({ url: '/uilib/components/global-status/demos' }) - - it('have to match the default state with custom content', async () => { - const screenshot = await testPageScreenshot({ - style, - selector: '[data-visual-test="global-status"] .dnb-global-status', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the info state and custom content', async () => { - const screenshot = await testPageScreenshot({ - style, - selector: - '[data-visual-test="global-status-info"] .dnb-global-status', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the close button in focus state', async () => { - const screenshot = await testPageScreenshot({ - style, - selector: '[data-visual-test="global-status"] .dnb-global-status', - simulateSelector: - '[data-visual-test="global-status"] .dnb-global-status__close-button', - simulate: 'focus', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the close button in hover state', async () => { - const screenshot = await testPageScreenshot({ - style, - selector: '[data-visual-test="global-status"] .dnb-global-status', - simulateSelector: - '[data-visual-test="global-status"] .dnb-global-status__close-button', - simulate: 'hover', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/components/global-status/__tests__/GlobalStatus.screenshot.test.ts b/packages/dnb-eufemia/src/components/global-status/__tests__/GlobalStatus.screenshot.test.ts new file mode 100644 index 00000000000..ca29cc0d1ef --- /dev/null +++ b/packages/dnb-eufemia/src/components/global-status/__tests__/GlobalStatus.screenshot.test.ts @@ -0,0 +1,54 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../../core/jest/jestSetupScreenshots' + +const style = { width: '25rem' } + +describe('GlobalStatus', () => { + setupPageScreenshot({ url: '/uilib/components/global-status/demos' }) + + it('have to match the default state with custom content', async () => { + const screenshot = await makeScreenshot({ + style, + selector: '[data-visual-test="global-status"] .dnb-global-status', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the info state and custom content', async () => { + const screenshot = await makeScreenshot({ + style, + selector: + '[data-visual-test="global-status-info"] .dnb-global-status', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the close button in focus state', async () => { + const screenshot = await makeScreenshot({ + style, + selector: '[data-visual-test="global-status"] .dnb-global-status', + simulateSelector: + '[data-visual-test="global-status"] .dnb-global-status__close-button', + simulate: 'focus', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the close button in hover state', async () => { + const screenshot = await makeScreenshot({ + style, + selector: '[data-visual-test="global-status"] .dnb-global-status', + simulateSelector: + '[data-visual-test="global-status"] .dnb-global-status__close-button', + simulate: 'hover', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/components/global-status/__tests__/__image_snapshots__/globalstatus-have-to-match-the-close-button-in-focus-state.snap.png b/packages/dnb-eufemia/src/components/global-status/__tests__/__image_snapshots__/globalstatus-have-to-match-the-close-button-in-focus-state.snap.png new file mode 100644 index 00000000000..9c27c61943b Binary files /dev/null and b/packages/dnb-eufemia/src/components/global-status/__tests__/__image_snapshots__/globalstatus-have-to-match-the-close-button-in-focus-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/global-status/__tests__/__image_snapshots__/globalstatus-have-to-match-the-close-button-in-hover-state.snap.png b/packages/dnb-eufemia/src/components/global-status/__tests__/__image_snapshots__/globalstatus-have-to-match-the-close-button-in-hover-state.snap.png new file mode 100644 index 00000000000..c8b0fb839c3 Binary files /dev/null and b/packages/dnb-eufemia/src/components/global-status/__tests__/__image_snapshots__/globalstatus-have-to-match-the-close-button-in-hover-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/global-status/__tests__/__image_snapshots__/globalstatus-have-to-match-the-default-state-with-custom-content.snap.png b/packages/dnb-eufemia/src/components/global-status/__tests__/__image_snapshots__/globalstatus-have-to-match-the-default-state-with-custom-content.snap.png new file mode 100644 index 00000000000..c113cf4ae16 Binary files /dev/null and b/packages/dnb-eufemia/src/components/global-status/__tests__/__image_snapshots__/globalstatus-have-to-match-the-default-state-with-custom-content.snap.png differ diff --git a/packages/dnb-eufemia/src/components/global-status/__tests__/__image_snapshots__/globalstatus-have-to-match-the-info-state-and-custom-content.snap.png b/packages/dnb-eufemia/src/components/global-status/__tests__/__image_snapshots__/globalstatus-have-to-match-the-info-state-and-custom-content.snap.png new file mode 100644 index 00000000000..b788789fb40 Binary files /dev/null and b/packages/dnb-eufemia/src/components/global-status/__tests__/__image_snapshots__/globalstatus-have-to-match-the-info-state-and-custom-content.snap.png differ diff --git a/packages/dnb-eufemia/src/components/global-status/__tests__/__snapshots__/global-status-screenshot-test-js-global-status-screenshot-have-to-match-the-close-button-in-focus-state-1-fe2ef.snap.png b/packages/dnb-eufemia/src/components/global-status/__tests__/__snapshots__/global-status-screenshot-test-js-global-status-screenshot-have-to-match-the-close-button-in-focus-state-1-fe2ef.snap.png deleted file mode 100644 index 2be0a0859ec..00000000000 Binary files a/packages/dnb-eufemia/src/components/global-status/__tests__/__snapshots__/global-status-screenshot-test-js-global-status-screenshot-have-to-match-the-close-button-in-focus-state-1-fe2ef.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/global-status/__tests__/__snapshots__/global-status-screenshot-test-js-global-status-screenshot-have-to-match-the-close-button-in-hover-state-1-235e6.snap.png b/packages/dnb-eufemia/src/components/global-status/__tests__/__snapshots__/global-status-screenshot-test-js-global-status-screenshot-have-to-match-the-close-button-in-hover-state-1-235e6.snap.png deleted file mode 100644 index 18f725acac2..00000000000 Binary files a/packages/dnb-eufemia/src/components/global-status/__tests__/__snapshots__/global-status-screenshot-test-js-global-status-screenshot-have-to-match-the-close-button-in-hover-state-1-235e6.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/global-status/__tests__/__snapshots__/global-status-screenshot-test-js-global-status-screenshot-have-to-match-the-default-state-with-custom-content-1-12528.snap.png b/packages/dnb-eufemia/src/components/global-status/__tests__/__snapshots__/global-status-screenshot-test-js-global-status-screenshot-have-to-match-the-default-state-with-custom-content-1-12528.snap.png deleted file mode 100644 index 80e133302de..00000000000 Binary files a/packages/dnb-eufemia/src/components/global-status/__tests__/__snapshots__/global-status-screenshot-test-js-global-status-screenshot-have-to-match-the-default-state-with-custom-content-1-12528.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/global-status/__tests__/__snapshots__/global-status-screenshot-test-js-global-status-screenshot-have-to-match-the-info-state-and-custom-content-1-618a4.snap.png b/packages/dnb-eufemia/src/components/global-status/__tests__/__snapshots__/global-status-screenshot-test-js-global-status-screenshot-have-to-match-the-info-state-and-custom-content-1-618a4.snap.png deleted file mode 100644 index 151018ddb2d..00000000000 Binary files a/packages/dnb-eufemia/src/components/global-status/__tests__/__snapshots__/global-status-screenshot-test-js-global-status-screenshot-have-to-match-the-info-state-and-custom-content-1-618a4.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/heading/__tests__/Heading.screenshot.test.js b/packages/dnb-eufemia/src/components/heading/__tests__/Heading.screenshot.test.js deleted file mode 100644 index 8ac93e37d22..00000000000 --- a/packages/dnb-eufemia/src/components/heading/__tests__/Heading.screenshot.test.js +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -describe('Heading screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/heading/demos', - }) - - it('have to match default headings', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="heading-default"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match headings with context usage', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="heading-context"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match headings with manual mixin', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="heading-mixin"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/components/heading/__tests__/Heading.screenshot.test.ts b/packages/dnb-eufemia/src/components/heading/__tests__/Heading.screenshot.test.ts new file mode 100644 index 00000000000..28622f2261f --- /dev/null +++ b/packages/dnb-eufemia/src/components/heading/__tests__/Heading.screenshot.test.ts @@ -0,0 +1,36 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../../core/jest/jestSetupScreenshots' + +describe('Heading', () => { + setupPageScreenshot({ + url: '/uilib/components/heading/demos', + }) + + it('have to match default headings', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="heading-default"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match headings with context usage', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="heading-context"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match headings with manual mixin', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="heading-mixin"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/components/heading/__tests__/__image_snapshots__/heading-have-to-match-default-headings.snap.png b/packages/dnb-eufemia/src/components/heading/__tests__/__image_snapshots__/heading-have-to-match-default-headings.snap.png new file mode 100644 index 00000000000..0cdbaad4d0e Binary files /dev/null and b/packages/dnb-eufemia/src/components/heading/__tests__/__image_snapshots__/heading-have-to-match-default-headings.snap.png differ diff --git a/packages/dnb-eufemia/src/components/heading/__tests__/__image_snapshots__/heading-have-to-match-headings-with-context-usage.snap.png b/packages/dnb-eufemia/src/components/heading/__tests__/__image_snapshots__/heading-have-to-match-headings-with-context-usage.snap.png new file mode 100644 index 00000000000..73ea7ec4641 Binary files /dev/null and b/packages/dnb-eufemia/src/components/heading/__tests__/__image_snapshots__/heading-have-to-match-headings-with-context-usage.snap.png differ diff --git a/packages/dnb-eufemia/src/components/heading/__tests__/__image_snapshots__/heading-have-to-match-headings-with-manual-mixin.snap.png b/packages/dnb-eufemia/src/components/heading/__tests__/__image_snapshots__/heading-have-to-match-headings-with-manual-mixin.snap.png new file mode 100644 index 00000000000..2826d5abad0 Binary files /dev/null and b/packages/dnb-eufemia/src/components/heading/__tests__/__image_snapshots__/heading-have-to-match-headings-with-manual-mixin.snap.png differ diff --git a/packages/dnb-eufemia/src/components/heading/__tests__/__snapshots__/heading-screenshot-test-js-heading-screenshot-have-to-match-default-headings-1-70c28.snap.png b/packages/dnb-eufemia/src/components/heading/__tests__/__snapshots__/heading-screenshot-test-js-heading-screenshot-have-to-match-default-headings-1-70c28.snap.png deleted file mode 100644 index 4de87571b33..00000000000 Binary files a/packages/dnb-eufemia/src/components/heading/__tests__/__snapshots__/heading-screenshot-test-js-heading-screenshot-have-to-match-default-headings-1-70c28.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/heading/__tests__/__snapshots__/heading-screenshot-test-js-heading-screenshot-have-to-match-headings-with-context-usage-1-7e5b1.snap.png b/packages/dnb-eufemia/src/components/heading/__tests__/__snapshots__/heading-screenshot-test-js-heading-screenshot-have-to-match-headings-with-context-usage-1-7e5b1.snap.png deleted file mode 100644 index 33deeab3e12..00000000000 Binary files a/packages/dnb-eufemia/src/components/heading/__tests__/__snapshots__/heading-screenshot-test-js-heading-screenshot-have-to-match-headings-with-context-usage-1-7e5b1.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/heading/__tests__/__snapshots__/heading-screenshot-test-js-heading-screenshot-have-to-match-headings-with-manual-mixin-1-d4686.snap.png b/packages/dnb-eufemia/src/components/heading/__tests__/__snapshots__/heading-screenshot-test-js-heading-screenshot-have-to-match-headings-with-manual-mixin-1-d4686.snap.png deleted file mode 100644 index 64345d6d14b..00000000000 Binary files a/packages/dnb-eufemia/src/components/heading/__tests__/__snapshots__/heading-screenshot-test-js-heading-screenshot-have-to-match-headings-with-manual-mixin-1-d4686.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/help-button/__tests__/HelpButton.screenshot.test.js b/packages/dnb-eufemia/src/components/help-button/__tests__/HelpButton.screenshot.test.js deleted file mode 100644 index c57b328c9c8..00000000000 --- a/packages/dnb-eufemia/src/components/help-button/__tests__/HelpButton.screenshot.test.js +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -describe('HelpButton screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/help-button/demos', - }) - - it('have to match default help button', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="help-button-default"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match help button sizes', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="help-button-sizes"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match help button suffix', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="help-button-suffix"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match help button used inside text', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="help-button-inline"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/components/help-button/__tests__/HelpButton.screenshot.test.ts b/packages/dnb-eufemia/src/components/help-button/__tests__/HelpButton.screenshot.test.ts new file mode 100644 index 00000000000..86a15076fbb --- /dev/null +++ b/packages/dnb-eufemia/src/components/help-button/__tests__/HelpButton.screenshot.test.ts @@ -0,0 +1,43 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../../core/jest/jestSetupScreenshots' + +describe('HelpButton', () => { + setupPageScreenshot({ + url: '/uilib/components/help-button/demos', + }) + + it('have to match default help button', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="help-button-default"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match help button sizes', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="help-button-sizes"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match help button suffix', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="help-button-suffix"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match help button used inside text', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="help-button-inline"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/components/help-button/__tests__/__image_snapshots__/helpbutton-have-to-match-default-help-button.snap.png b/packages/dnb-eufemia/src/components/help-button/__tests__/__image_snapshots__/helpbutton-have-to-match-default-help-button.snap.png new file mode 100644 index 00000000000..faeec401821 Binary files /dev/null and b/packages/dnb-eufemia/src/components/help-button/__tests__/__image_snapshots__/helpbutton-have-to-match-default-help-button.snap.png differ diff --git a/packages/dnb-eufemia/src/components/help-button/__tests__/__image_snapshots__/helpbutton-have-to-match-help-button-sizes.snap.png b/packages/dnb-eufemia/src/components/help-button/__tests__/__image_snapshots__/helpbutton-have-to-match-help-button-sizes.snap.png new file mode 100644 index 00000000000..c04583b2184 Binary files /dev/null and b/packages/dnb-eufemia/src/components/help-button/__tests__/__image_snapshots__/helpbutton-have-to-match-help-button-sizes.snap.png differ diff --git a/packages/dnb-eufemia/src/components/help-button/__tests__/__image_snapshots__/helpbutton-have-to-match-help-button-suffix.snap.png b/packages/dnb-eufemia/src/components/help-button/__tests__/__image_snapshots__/helpbutton-have-to-match-help-button-suffix.snap.png new file mode 100644 index 00000000000..7c98785ce02 Binary files /dev/null and b/packages/dnb-eufemia/src/components/help-button/__tests__/__image_snapshots__/helpbutton-have-to-match-help-button-suffix.snap.png differ diff --git a/packages/dnb-eufemia/src/components/help-button/__tests__/__image_snapshots__/helpbutton-have-to-match-help-button-used-inside-text.snap.png b/packages/dnb-eufemia/src/components/help-button/__tests__/__image_snapshots__/helpbutton-have-to-match-help-button-used-inside-text.snap.png new file mode 100644 index 00000000000..811ed77292d Binary files /dev/null and b/packages/dnb-eufemia/src/components/help-button/__tests__/__image_snapshots__/helpbutton-have-to-match-help-button-used-inside-text.snap.png differ diff --git a/packages/dnb-eufemia/src/components/help-button/__tests__/__snapshots__/help-button-screenshot-test-js-help-button-screenshot-have-to-match-default-help-button-1-3df43.snap.png b/packages/dnb-eufemia/src/components/help-button/__tests__/__snapshots__/help-button-screenshot-test-js-help-button-screenshot-have-to-match-default-help-button-1-3df43.snap.png deleted file mode 100644 index f37e5c156f6..00000000000 Binary files a/packages/dnb-eufemia/src/components/help-button/__tests__/__snapshots__/help-button-screenshot-test-js-help-button-screenshot-have-to-match-default-help-button-1-3df43.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/help-button/__tests__/__snapshots__/help-button-screenshot-test-js-help-button-screenshot-have-to-match-help-button-sizes-1-1e2c2.snap.png b/packages/dnb-eufemia/src/components/help-button/__tests__/__snapshots__/help-button-screenshot-test-js-help-button-screenshot-have-to-match-help-button-sizes-1-1e2c2.snap.png deleted file mode 100644 index 9f2335e62fa..00000000000 Binary files a/packages/dnb-eufemia/src/components/help-button/__tests__/__snapshots__/help-button-screenshot-test-js-help-button-screenshot-have-to-match-help-button-sizes-1-1e2c2.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/help-button/__tests__/__snapshots__/help-button-screenshot-test-js-help-button-screenshot-have-to-match-help-button-suffix-1-70294.snap.png b/packages/dnb-eufemia/src/components/help-button/__tests__/__snapshots__/help-button-screenshot-test-js-help-button-screenshot-have-to-match-help-button-suffix-1-70294.snap.png deleted file mode 100644 index 0ee8aaf92f1..00000000000 Binary files a/packages/dnb-eufemia/src/components/help-button/__tests__/__snapshots__/help-button-screenshot-test-js-help-button-screenshot-have-to-match-help-button-suffix-1-70294.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/help-button/__tests__/__snapshots__/help-button-screenshot-test-js-help-button-screenshot-have-to-match-help-button-used-inside-text-1-2f9fa.snap.png b/packages/dnb-eufemia/src/components/help-button/__tests__/__snapshots__/help-button-screenshot-test-js-help-button-screenshot-have-to-match-help-button-used-inside-text-1-2f9fa.snap.png deleted file mode 100644 index 7386671e860..00000000000 Binary files a/packages/dnb-eufemia/src/components/help-button/__tests__/__snapshots__/help-button-screenshot-test-js-help-button-screenshot-have-to-match-help-button-used-inside-text-1-2f9fa.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/icon/__tests__/Icon.screenshot.test.js b/packages/dnb-eufemia/src/components/icon/__tests__/Icon.screenshot.test.js deleted file mode 100644 index b82dedfda5e..00000000000 --- a/packages/dnb-eufemia/src/components/icon/__tests__/Icon.screenshot.test.js +++ /dev/null @@ -1,131 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -describe('Icon screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/icon/demos', - }) - - it('have to match default icons setup', async () => { - const screenshot = await testPageScreenshot({ - style: { - // Flex makes the pixel height 100% correct - display: 'flex', - 'align-items': 'center', - }, - selector: '[data-visual-test="icon-default"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match inherited sized icons', async () => { - const screenshot = await testPageScreenshot({ - style: { - // Flex makes the pixel height 100% correct - display: 'flex', - 'align-items': 'center', - }, - selector: '[data-visual-test="icon-inherit-sized"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match icons with border', async () => { - const screenshot = await testPageScreenshot({ - style: { - // Flex makes the pixel height 100% correct - display: 'flex', - 'align-items': 'center', - }, - selector: '[data-visual-test="icon-border"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match icons with colors', async () => { - const screenshot = await testPageScreenshot({ - style: { - // Flex makes the pixel height 100% correct - display: 'flex', - 'align-items': 'center', - }, - selector: '[data-visual-test="icon-colors"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match responsive icons', async () => { - const screenshot = await testPageScreenshot({ - style: { - // Flex makes the pixel height 100% correct - display: 'flex', - 'align-items': 'center', - }, - selector: '[data-visual-test="icon-medium"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Icon screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/icon/demos', - }) - - it('have to match all primary icons', async () => { - const screenshot = await testPageScreenshot({ - style: { - display: 'inline-flex', - 'flex-wrap': 'wrap', - width: '30rem', - }, - selector: '[data-visual-test="icon-all-primary"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match all secondary icons', async () => { - const screenshot = await testPageScreenshot({ - style: { - display: 'inline-flex', - 'flex-wrap': 'wrap', - width: '30rem', - }, - selector: '[data-visual-test="icon-all-secondary"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match all primary icons with color', async () => { - const screenshot = await testPageScreenshot({ - style: { - display: 'inline-flex', - 'flex-wrap': 'wrap', - width: '30rem', - color: 'tomato', - }, - selector: '[data-visual-test="icon-all-primary"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match all secondary icons with color', async () => { - const screenshot = await testPageScreenshot({ - style: { - display: 'inline-flex', - 'flex-wrap': 'wrap', - width: '30rem', - color: 'blue', - }, - selector: '[data-visual-test="icon-all-secondary"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/components/icon/__tests__/Icon.screenshot.test.ts b/packages/dnb-eufemia/src/components/icon/__tests__/Icon.screenshot.test.ts new file mode 100644 index 00000000000..5236138e83e --- /dev/null +++ b/packages/dnb-eufemia/src/components/icon/__tests__/Icon.screenshot.test.ts @@ -0,0 +1,131 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../../core/jest/jestSetupScreenshots' + +describe('Icon', () => { + setupPageScreenshot({ + url: '/uilib/components/icon/demos', + }) + + it('have to match default icons setup', async () => { + const screenshot = await makeScreenshot({ + style: { + // Flex makes the pixel height 100% correct + display: 'flex', + 'align-items': 'center', + }, + selector: '[data-visual-test="icon-default"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match inherited sized icons', async () => { + const screenshot = await makeScreenshot({ + style: { + // Flex makes the pixel height 100% correct + display: 'flex', + 'align-items': 'center', + }, + selector: '[data-visual-test="icon-inherit-sized"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match icons with border', async () => { + const screenshot = await makeScreenshot({ + style: { + // Flex makes the pixel height 100% correct + display: 'flex', + 'align-items': 'center', + }, + selector: '[data-visual-test="icon-border"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match icons with colors', async () => { + const screenshot = await makeScreenshot({ + style: { + // Flex makes the pixel height 100% correct + display: 'flex', + 'align-items': 'center', + }, + selector: '[data-visual-test="icon-colors"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match responsive icons', async () => { + const screenshot = await makeScreenshot({ + style: { + // Flex makes the pixel height 100% correct + display: 'flex', + 'align-items': 'center', + }, + selector: '[data-visual-test="icon-medium"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) + +describe('Icon', () => { + setupPageScreenshot({ + url: '/uilib/components/icon/demos', + }) + + it('have to match all primary icons', async () => { + const screenshot = await makeScreenshot({ + style: { + display: 'inline-flex', + 'flex-wrap': 'wrap', + width: '30rem', + }, + selector: '[data-visual-test="icon-all-primary"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match all secondary icons', async () => { + const screenshot = await makeScreenshot({ + style: { + display: 'inline-flex', + 'flex-wrap': 'wrap', + width: '30rem', + }, + selector: '[data-visual-test="icon-all-secondary"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match all primary icons with color', async () => { + const screenshot = await makeScreenshot({ + style: { + display: 'inline-flex', + 'flex-wrap': 'wrap', + width: '30rem', + color: 'tomato', + }, + selector: '[data-visual-test="icon-all-primary"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match all secondary icons with color', async () => { + const screenshot = await makeScreenshot({ + style: { + display: 'inline-flex', + 'flex-wrap': 'wrap', + width: '30rem', + color: 'blue', + }, + selector: '[data-visual-test="icon-all-secondary"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/components/icon/__tests__/__image_snapshots__/icon-have-to-match-all-primary-icons-with-color.snap.png b/packages/dnb-eufemia/src/components/icon/__tests__/__image_snapshots__/icon-have-to-match-all-primary-icons-with-color.snap.png new file mode 100644 index 00000000000..f98624abf7f Binary files /dev/null and b/packages/dnb-eufemia/src/components/icon/__tests__/__image_snapshots__/icon-have-to-match-all-primary-icons-with-color.snap.png differ diff --git a/packages/dnb-eufemia/src/components/icon/__tests__/__image_snapshots__/icon-have-to-match-all-primary-icons.snap.png b/packages/dnb-eufemia/src/components/icon/__tests__/__image_snapshots__/icon-have-to-match-all-primary-icons.snap.png new file mode 100644 index 00000000000..ab0ff0dda4b Binary files /dev/null and b/packages/dnb-eufemia/src/components/icon/__tests__/__image_snapshots__/icon-have-to-match-all-primary-icons.snap.png differ diff --git a/packages/dnb-eufemia/src/components/icon/__tests__/__image_snapshots__/icon-have-to-match-all-secondary-icons-with-color.snap.png b/packages/dnb-eufemia/src/components/icon/__tests__/__image_snapshots__/icon-have-to-match-all-secondary-icons-with-color.snap.png new file mode 100644 index 00000000000..7e516f3d14a Binary files /dev/null and b/packages/dnb-eufemia/src/components/icon/__tests__/__image_snapshots__/icon-have-to-match-all-secondary-icons-with-color.snap.png differ diff --git a/packages/dnb-eufemia/src/components/icon/__tests__/__image_snapshots__/icon-have-to-match-all-secondary-icons.snap.png b/packages/dnb-eufemia/src/components/icon/__tests__/__image_snapshots__/icon-have-to-match-all-secondary-icons.snap.png new file mode 100644 index 00000000000..94fb1d13201 Binary files /dev/null and b/packages/dnb-eufemia/src/components/icon/__tests__/__image_snapshots__/icon-have-to-match-all-secondary-icons.snap.png differ diff --git a/packages/dnb-eufemia/src/components/icon/__tests__/__image_snapshots__/icon-have-to-match-default-icons-setup.snap.png b/packages/dnb-eufemia/src/components/icon/__tests__/__image_snapshots__/icon-have-to-match-default-icons-setup.snap.png new file mode 100644 index 00000000000..9a79ea43de1 Binary files /dev/null and b/packages/dnb-eufemia/src/components/icon/__tests__/__image_snapshots__/icon-have-to-match-default-icons-setup.snap.png differ diff --git a/packages/dnb-eufemia/src/components/icon/__tests__/__image_snapshots__/icon-have-to-match-icons-with-border.snap.png b/packages/dnb-eufemia/src/components/icon/__tests__/__image_snapshots__/icon-have-to-match-icons-with-border.snap.png new file mode 100644 index 00000000000..18534a9f719 Binary files /dev/null and b/packages/dnb-eufemia/src/components/icon/__tests__/__image_snapshots__/icon-have-to-match-icons-with-border.snap.png differ diff --git a/packages/dnb-eufemia/src/components/icon/__tests__/__image_snapshots__/icon-have-to-match-icons-with-colors.snap.png b/packages/dnb-eufemia/src/components/icon/__tests__/__image_snapshots__/icon-have-to-match-icons-with-colors.snap.png new file mode 100644 index 00000000000..99d9482d258 Binary files /dev/null and b/packages/dnb-eufemia/src/components/icon/__tests__/__image_snapshots__/icon-have-to-match-icons-with-colors.snap.png differ diff --git a/packages/dnb-eufemia/src/components/icon/__tests__/__image_snapshots__/icon-have-to-match-inherited-sized-icons.snap.png b/packages/dnb-eufemia/src/components/icon/__tests__/__image_snapshots__/icon-have-to-match-inherited-sized-icons.snap.png new file mode 100644 index 00000000000..3109298e12c Binary files /dev/null and b/packages/dnb-eufemia/src/components/icon/__tests__/__image_snapshots__/icon-have-to-match-inherited-sized-icons.snap.png differ diff --git a/packages/dnb-eufemia/src/components/icon/__tests__/__image_snapshots__/icon-have-to-match-responsive-icons.snap.png b/packages/dnb-eufemia/src/components/icon/__tests__/__image_snapshots__/icon-have-to-match-responsive-icons.snap.png new file mode 100644 index 00000000000..8888dd2e6be Binary files /dev/null and b/packages/dnb-eufemia/src/components/icon/__tests__/__image_snapshots__/icon-have-to-match-responsive-icons.snap.png differ diff --git a/packages/dnb-eufemia/src/components/icon/__tests__/__snapshots__/icon-screenshot-test-js-icon-screenshot-have-to-match-all-primary-icons-1-34b9c.snap.png b/packages/dnb-eufemia/src/components/icon/__tests__/__snapshots__/icon-screenshot-test-js-icon-screenshot-have-to-match-all-primary-icons-1-34b9c.snap.png deleted file mode 100644 index e3a5cb4bffe..00000000000 Binary files a/packages/dnb-eufemia/src/components/icon/__tests__/__snapshots__/icon-screenshot-test-js-icon-screenshot-have-to-match-all-primary-icons-1-34b9c.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/icon/__tests__/__snapshots__/icon-screenshot-test-js-icon-screenshot-have-to-match-all-primary-icons-with-color-1-e94bf.snap.png b/packages/dnb-eufemia/src/components/icon/__tests__/__snapshots__/icon-screenshot-test-js-icon-screenshot-have-to-match-all-primary-icons-with-color-1-e94bf.snap.png deleted file mode 100644 index a1c5989dc3d..00000000000 Binary files a/packages/dnb-eufemia/src/components/icon/__tests__/__snapshots__/icon-screenshot-test-js-icon-screenshot-have-to-match-all-primary-icons-with-color-1-e94bf.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/icon/__tests__/__snapshots__/icon-screenshot-test-js-icon-screenshot-have-to-match-all-secondary-icons-1-25470.snap.png b/packages/dnb-eufemia/src/components/icon/__tests__/__snapshots__/icon-screenshot-test-js-icon-screenshot-have-to-match-all-secondary-icons-1-25470.snap.png deleted file mode 100644 index 6bccec7e6ff..00000000000 Binary files a/packages/dnb-eufemia/src/components/icon/__tests__/__snapshots__/icon-screenshot-test-js-icon-screenshot-have-to-match-all-secondary-icons-1-25470.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/icon/__tests__/__snapshots__/icon-screenshot-test-js-icon-screenshot-have-to-match-all-secondary-icons-with-color-1-04e27.snap.png b/packages/dnb-eufemia/src/components/icon/__tests__/__snapshots__/icon-screenshot-test-js-icon-screenshot-have-to-match-all-secondary-icons-with-color-1-04e27.snap.png deleted file mode 100644 index c99f565121e..00000000000 Binary files a/packages/dnb-eufemia/src/components/icon/__tests__/__snapshots__/icon-screenshot-test-js-icon-screenshot-have-to-match-all-secondary-icons-with-color-1-04e27.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/icon/__tests__/__snapshots__/icon-screenshot-test-js-icon-screenshot-have-to-match-default-icons-setup-1-676e9.snap.png b/packages/dnb-eufemia/src/components/icon/__tests__/__snapshots__/icon-screenshot-test-js-icon-screenshot-have-to-match-default-icons-setup-1-676e9.snap.png deleted file mode 100644 index a88bbde8098..00000000000 Binary files a/packages/dnb-eufemia/src/components/icon/__tests__/__snapshots__/icon-screenshot-test-js-icon-screenshot-have-to-match-default-icons-setup-1-676e9.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/icon/__tests__/__snapshots__/icon-screenshot-test-js-icon-screenshot-have-to-match-icons-with-border-1-1256f.snap.png b/packages/dnb-eufemia/src/components/icon/__tests__/__snapshots__/icon-screenshot-test-js-icon-screenshot-have-to-match-icons-with-border-1-1256f.snap.png deleted file mode 100644 index 5c412a5e593..00000000000 Binary files a/packages/dnb-eufemia/src/components/icon/__tests__/__snapshots__/icon-screenshot-test-js-icon-screenshot-have-to-match-icons-with-border-1-1256f.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/icon/__tests__/__snapshots__/icon-screenshot-test-js-icon-screenshot-have-to-match-icons-with-colors-1-7a207.snap.png b/packages/dnb-eufemia/src/components/icon/__tests__/__snapshots__/icon-screenshot-test-js-icon-screenshot-have-to-match-icons-with-colors-1-7a207.snap.png deleted file mode 100644 index 7e4d2c83864..00000000000 Binary files a/packages/dnb-eufemia/src/components/icon/__tests__/__snapshots__/icon-screenshot-test-js-icon-screenshot-have-to-match-icons-with-colors-1-7a207.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/icon/__tests__/__snapshots__/icon-screenshot-test-js-icon-screenshot-have-to-match-inherited-sized-icons-1-ca348.snap.png b/packages/dnb-eufemia/src/components/icon/__tests__/__snapshots__/icon-screenshot-test-js-icon-screenshot-have-to-match-inherited-sized-icons-1-ca348.snap.png deleted file mode 100644 index 44d1b5ba06b..00000000000 Binary files a/packages/dnb-eufemia/src/components/icon/__tests__/__snapshots__/icon-screenshot-test-js-icon-screenshot-have-to-match-inherited-sized-icons-1-ca348.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/icon/__tests__/__snapshots__/icon-screenshot-test-js-icon-screenshot-have-to-match-responsive-icons-1-7406f.snap.png b/packages/dnb-eufemia/src/components/icon/__tests__/__snapshots__/icon-screenshot-test-js-icon-screenshot-have-to-match-responsive-icons-1-7406f.snap.png deleted file mode 100644 index cf82091c128..00000000000 Binary files a/packages/dnb-eufemia/src/components/icon/__tests__/__snapshots__/icon-screenshot-test-js-icon-screenshot-have-to-match-responsive-icons-1-7406f.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/info-card/__tests__/InfoCard.screenshot.test.js b/packages/dnb-eufemia/src/components/info-card/__tests__/InfoCard.screenshot.test.js deleted file mode 100644 index 70269c6c915..00000000000 --- a/packages/dnb-eufemia/src/components/info-card/__tests__/InfoCard.screenshot.test.js +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -describe('InfoCard screenshot', () => { - setupPageScreenshot({ url: '/uilib/components/info-card/demos' }) - - it('renders correct default component', async () => { - const screenshot = await testPageScreenshot({ - style: { width: '30rem' }, - selector: '[data-visual-test="info-card-basic"] .dnb-info-card', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('renders correct component with title and buttons', async () => { - const screenshot = await testPageScreenshot({ - style: { width: '20rem' }, - selector: '[data-visual-test="info-card-buttons"] .dnb-info-card', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('renders correct component with close button', async () => { - const screenshot = await testPageScreenshot({ - style: { width: '30rem' }, - selector: - '[data-visual-test="info-card-close-button"] .dnb-info-card', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('renders correct component with accept button', async () => { - const screenshot = await testPageScreenshot({ - style: { width: '30rem' }, - selector: - '[data-visual-test="info-card-accept-button"] .dnb-info-card', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('renders the centered component', async () => { - const screenshot = await testPageScreenshot({ - style: { width: '30rem' }, - selector: - '[data-visual-test="info-card-buttons-centered"] .dnb-info-card', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('renders the centered card component', async () => { - const screenshot = await testPageScreenshot({ - style: { width: '30rem' }, - selector: '[data-visual-test="info-card-centered"] .dnb-info-card', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('renders with custom icon', async () => { - const screenshot = await testPageScreenshot({ - style: { width: '30rem' }, - selector: - '[data-visual-test="info-card-custom-icon"] .dnb-info-card', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('renders with custom image', async () => { - const screenshot = await testPageScreenshot({ - style: { width: '30rem' }, - selector: - '[data-visual-test="info-card-custom-image"] .dnb-info-card', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('renders with custom image centered', async () => { - const screenshot = await testPageScreenshot({ - style: { width: '30rem' }, - selector: - '[data-visual-test="info-card-custom-image-centered"] .dnb-info-card', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/components/info-card/__tests__/InfoCard.screenshot.test.ts b/packages/dnb-eufemia/src/components/info-card/__tests__/InfoCard.screenshot.test.ts new file mode 100644 index 00000000000..e68ddb5a7bd --- /dev/null +++ b/packages/dnb-eufemia/src/components/info-card/__tests__/InfoCard.screenshot.test.ts @@ -0,0 +1,91 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../../core/jest/jestSetupScreenshots' + +describe('InfoCard', () => { + setupPageScreenshot({ url: '/uilib/components/info-card/demos' }) + + it('renders correct default component', async () => { + const screenshot = await makeScreenshot({ + style: { width: '30rem' }, + selector: '[data-visual-test="info-card-basic"] .dnb-info-card', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('renders correct component with title and buttons', async () => { + const screenshot = await makeScreenshot({ + style: { width: '20rem' }, + selector: '[data-visual-test="info-card-buttons"] .dnb-info-card', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('renders correct component with close button', async () => { + const screenshot = await makeScreenshot({ + style: { width: '30rem' }, + selector: + '[data-visual-test="info-card-close-button"] .dnb-info-card', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('renders correct component with accept button', async () => { + const screenshot = await makeScreenshot({ + style: { width: '30rem' }, + selector: + '[data-visual-test="info-card-accept-button"] .dnb-info-card', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('renders the centered component', async () => { + const screenshot = await makeScreenshot({ + style: { width: '30rem' }, + selector: + '[data-visual-test="info-card-buttons-centered"] .dnb-info-card', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('renders the centered card component', async () => { + const screenshot = await makeScreenshot({ + style: { width: '30rem' }, + selector: '[data-visual-test="info-card-centered"] .dnb-info-card', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('renders with custom icon', async () => { + const screenshot = await makeScreenshot({ + style: { width: '30rem' }, + selector: + '[data-visual-test="info-card-custom-icon"] .dnb-info-card', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('renders with custom image', async () => { + const screenshot = await makeScreenshot({ + style: { width: '30rem' }, + selector: + '[data-visual-test="info-card-custom-image"] .dnb-info-card', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('renders with custom image centered', async () => { + const screenshot = await makeScreenshot({ + style: { width: '30rem' }, + selector: + '[data-visual-test="info-card-custom-image-centered"] .dnb-info-card', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/components/info-card/__tests__/__image_snapshots__/infocard-renders-correct-component-with-accept-button.snap.png b/packages/dnb-eufemia/src/components/info-card/__tests__/__image_snapshots__/infocard-renders-correct-component-with-accept-button.snap.png new file mode 100644 index 00000000000..29a61e8c904 Binary files /dev/null and b/packages/dnb-eufemia/src/components/info-card/__tests__/__image_snapshots__/infocard-renders-correct-component-with-accept-button.snap.png differ diff --git a/packages/dnb-eufemia/src/components/info-card/__tests__/__image_snapshots__/infocard-renders-correct-component-with-close-button.snap.png b/packages/dnb-eufemia/src/components/info-card/__tests__/__image_snapshots__/infocard-renders-correct-component-with-close-button.snap.png new file mode 100644 index 00000000000..01fb63492b5 Binary files /dev/null and b/packages/dnb-eufemia/src/components/info-card/__tests__/__image_snapshots__/infocard-renders-correct-component-with-close-button.snap.png differ diff --git a/packages/dnb-eufemia/src/components/info-card/__tests__/__image_snapshots__/infocard-renders-correct-component-with-title-and-buttons.snap.png b/packages/dnb-eufemia/src/components/info-card/__tests__/__image_snapshots__/infocard-renders-correct-component-with-title-and-buttons.snap.png new file mode 100644 index 00000000000..26fec291e37 Binary files /dev/null and b/packages/dnb-eufemia/src/components/info-card/__tests__/__image_snapshots__/infocard-renders-correct-component-with-title-and-buttons.snap.png differ diff --git a/packages/dnb-eufemia/src/components/info-card/__tests__/__image_snapshots__/infocard-renders-correct-default-component.snap.png b/packages/dnb-eufemia/src/components/info-card/__tests__/__image_snapshots__/infocard-renders-correct-default-component.snap.png new file mode 100644 index 00000000000..b43b2694f03 Binary files /dev/null and b/packages/dnb-eufemia/src/components/info-card/__tests__/__image_snapshots__/infocard-renders-correct-default-component.snap.png differ diff --git a/packages/dnb-eufemia/src/components/info-card/__tests__/__image_snapshots__/infocard-renders-the-centered-card-component.snap.png b/packages/dnb-eufemia/src/components/info-card/__tests__/__image_snapshots__/infocard-renders-the-centered-card-component.snap.png new file mode 100644 index 00000000000..070d5d897b4 Binary files /dev/null and b/packages/dnb-eufemia/src/components/info-card/__tests__/__image_snapshots__/infocard-renders-the-centered-card-component.snap.png differ diff --git a/packages/dnb-eufemia/src/components/info-card/__tests__/__image_snapshots__/infocard-renders-the-centered-component.snap.png b/packages/dnb-eufemia/src/components/info-card/__tests__/__image_snapshots__/infocard-renders-the-centered-component.snap.png new file mode 100644 index 00000000000..3da6b6643d0 Binary files /dev/null and b/packages/dnb-eufemia/src/components/info-card/__tests__/__image_snapshots__/infocard-renders-the-centered-component.snap.png differ diff --git a/packages/dnb-eufemia/src/components/info-card/__tests__/__image_snapshots__/infocard-renders-with-custom-icon.snap.png b/packages/dnb-eufemia/src/components/info-card/__tests__/__image_snapshots__/infocard-renders-with-custom-icon.snap.png new file mode 100644 index 00000000000..3ae4adc5952 Binary files /dev/null and b/packages/dnb-eufemia/src/components/info-card/__tests__/__image_snapshots__/infocard-renders-with-custom-icon.snap.png differ diff --git a/packages/dnb-eufemia/src/components/info-card/__tests__/__image_snapshots__/infocard-renders-with-custom-image-centered.snap.png b/packages/dnb-eufemia/src/components/info-card/__tests__/__image_snapshots__/infocard-renders-with-custom-image-centered.snap.png new file mode 100644 index 00000000000..1e75419d1c7 Binary files /dev/null and b/packages/dnb-eufemia/src/components/info-card/__tests__/__image_snapshots__/infocard-renders-with-custom-image-centered.snap.png differ diff --git a/packages/dnb-eufemia/src/components/info-card/__tests__/__image_snapshots__/infocard-renders-with-custom-image.snap.png b/packages/dnb-eufemia/src/components/info-card/__tests__/__image_snapshots__/infocard-renders-with-custom-image.snap.png new file mode 100644 index 00000000000..b850385c245 Binary files /dev/null and b/packages/dnb-eufemia/src/components/info-card/__tests__/__image_snapshots__/infocard-renders-with-custom-image.snap.png differ diff --git a/packages/dnb-eufemia/src/components/info-card/__tests__/__snapshots__/info-card-screenshot-test-js-info-card-screenshot-renders-correct-component-with-accept-button-1-9f300.snap.png b/packages/dnb-eufemia/src/components/info-card/__tests__/__snapshots__/info-card-screenshot-test-js-info-card-screenshot-renders-correct-component-with-accept-button-1-9f300.snap.png deleted file mode 100644 index 1a97628e497..00000000000 Binary files a/packages/dnb-eufemia/src/components/info-card/__tests__/__snapshots__/info-card-screenshot-test-js-info-card-screenshot-renders-correct-component-with-accept-button-1-9f300.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/info-card/__tests__/__snapshots__/info-card-screenshot-test-js-info-card-screenshot-renders-correct-component-with-close-button-1-23fbd.snap.png b/packages/dnb-eufemia/src/components/info-card/__tests__/__snapshots__/info-card-screenshot-test-js-info-card-screenshot-renders-correct-component-with-close-button-1-23fbd.snap.png deleted file mode 100644 index 89efe434542..00000000000 Binary files a/packages/dnb-eufemia/src/components/info-card/__tests__/__snapshots__/info-card-screenshot-test-js-info-card-screenshot-renders-correct-component-with-close-button-1-23fbd.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/info-card/__tests__/__snapshots__/info-card-screenshot-test-js-info-card-screenshot-renders-correct-component-with-title-and-buttons-1-8a82a.snap.png b/packages/dnb-eufemia/src/components/info-card/__tests__/__snapshots__/info-card-screenshot-test-js-info-card-screenshot-renders-correct-component-with-title-and-buttons-1-8a82a.snap.png deleted file mode 100644 index 15113c75360..00000000000 Binary files a/packages/dnb-eufemia/src/components/info-card/__tests__/__snapshots__/info-card-screenshot-test-js-info-card-screenshot-renders-correct-component-with-title-and-buttons-1-8a82a.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/info-card/__tests__/__snapshots__/info-card-screenshot-test-js-info-card-screenshot-renders-correct-default-component-1-7706e.snap.png b/packages/dnb-eufemia/src/components/info-card/__tests__/__snapshots__/info-card-screenshot-test-js-info-card-screenshot-renders-correct-default-component-1-7706e.snap.png deleted file mode 100644 index 77865de56e3..00000000000 Binary files a/packages/dnb-eufemia/src/components/info-card/__tests__/__snapshots__/info-card-screenshot-test-js-info-card-screenshot-renders-correct-default-component-1-7706e.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/info-card/__tests__/__snapshots__/info-card-screenshot-test-js-info-card-screenshot-renders-the-centered-card-component-1-b0d3c.snap.png b/packages/dnb-eufemia/src/components/info-card/__tests__/__snapshots__/info-card-screenshot-test-js-info-card-screenshot-renders-the-centered-card-component-1-b0d3c.snap.png deleted file mode 100644 index 572e240811d..00000000000 Binary files a/packages/dnb-eufemia/src/components/info-card/__tests__/__snapshots__/info-card-screenshot-test-js-info-card-screenshot-renders-the-centered-card-component-1-b0d3c.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/info-card/__tests__/__snapshots__/info-card-screenshot-test-js-info-card-screenshot-renders-the-centered-component-1-3c565.snap.png b/packages/dnb-eufemia/src/components/info-card/__tests__/__snapshots__/info-card-screenshot-test-js-info-card-screenshot-renders-the-centered-component-1-3c565.snap.png deleted file mode 100644 index 3b15ffe3889..00000000000 Binary files a/packages/dnb-eufemia/src/components/info-card/__tests__/__snapshots__/info-card-screenshot-test-js-info-card-screenshot-renders-the-centered-component-1-3c565.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/info-card/__tests__/__snapshots__/info-card-screenshot-test-js-info-card-screenshot-renders-with-custom-icon-1-54299.snap.png b/packages/dnb-eufemia/src/components/info-card/__tests__/__snapshots__/info-card-screenshot-test-js-info-card-screenshot-renders-with-custom-icon-1-54299.snap.png deleted file mode 100644 index 1f56ff5a26b..00000000000 Binary files a/packages/dnb-eufemia/src/components/info-card/__tests__/__snapshots__/info-card-screenshot-test-js-info-card-screenshot-renders-with-custom-icon-1-54299.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/info-card/__tests__/__snapshots__/info-card-screenshot-test-js-info-card-screenshot-renders-with-custom-image-1-d28e4.snap.png b/packages/dnb-eufemia/src/components/info-card/__tests__/__snapshots__/info-card-screenshot-test-js-info-card-screenshot-renders-with-custom-image-1-d28e4.snap.png deleted file mode 100644 index 14f26a932b1..00000000000 Binary files a/packages/dnb-eufemia/src/components/info-card/__tests__/__snapshots__/info-card-screenshot-test-js-info-card-screenshot-renders-with-custom-image-1-d28e4.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/info-card/__tests__/__snapshots__/info-card-screenshot-test-js-info-card-screenshot-renders-with-custom-image-centered-1-68b20.snap.png b/packages/dnb-eufemia/src/components/info-card/__tests__/__snapshots__/info-card-screenshot-test-js-info-card-screenshot-renders-with-custom-image-centered-1-68b20.snap.png deleted file mode 100644 index 7d9c608f359..00000000000 Binary files a/packages/dnb-eufemia/src/components/info-card/__tests__/__snapshots__/info-card-screenshot-test-js-info-card-screenshot-renders-with-custom-image-centered-1-68b20.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/input-masked/__tests__/InputMasked.screenshot.test.js b/packages/dnb-eufemia/src/components/input-masked/__tests__/InputMasked.screenshot.test.js deleted file mode 100644 index 45fab7fe6f9..00000000000 --- a/packages/dnb-eufemia/src/components/input-masked/__tests__/InputMasked.screenshot.test.js +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -describe('InputMasked screenshot', () => { - setupPageScreenshot({ url: '/uilib/components/input-masked/demos' }) - const style = { - width: '200px', // make sure our input gets an explicit width, because of mac/linux rendering differences - } - - it('have to match masked input', async () => { - const screenshot = await testPageScreenshot({ - style, - selector: - '[data-visual-test="input-masked-phone"] .dnb-input__shell', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match currency_mask', async () => { - const screenshot = await testPageScreenshot({ - // style, - selector: '[data-visual-test="input-masked-currency_mask"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match number_mask', async () => { - const screenshot = await testPageScreenshot({ - // style, - selector: '[data-visual-test="input-masked-number_mask"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match locale number', async () => { - const screenshot = await testPageScreenshot({ - // style, - selector: '[data-visual-test="input-masked-number"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match locale currency', async () => { - const screenshot = await testPageScreenshot({ - // style, - selector: '[data-visual-test="input-masked-currency"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/components/input-masked/__tests__/InputMasked.screenshot.test.ts b/packages/dnb-eufemia/src/components/input-masked/__tests__/InputMasked.screenshot.test.ts new file mode 100644 index 00000000000..f75118780f0 --- /dev/null +++ b/packages/dnb-eufemia/src/components/input-masked/__tests__/InputMasked.screenshot.test.ts @@ -0,0 +1,57 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../../core/jest/jestSetupScreenshots' + +describe('InputMasked', () => { + setupPageScreenshot({ url: '/uilib/components/input-masked/demos' }) + const style = { + width: '200px', // make sure our input gets an explicit width, because of mac/linux rendering differences + } + + it('have to match masked input', async () => { + const screenshot = await makeScreenshot({ + style, + selector: + '[data-visual-test="input-masked-phone"] .dnb-input__shell', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match currency_mask', async () => { + const screenshot = await makeScreenshot({ + // style, + selector: '[data-visual-test="input-masked-currency_mask"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match number_mask', async () => { + const screenshot = await makeScreenshot({ + // style, + selector: '[data-visual-test="input-masked-number_mask"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match locale number', async () => { + const screenshot = await makeScreenshot({ + // style, + selector: '[data-visual-test="input-masked-number"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match locale currency', async () => { + const screenshot = await makeScreenshot({ + // style, + selector: '[data-visual-test="input-masked-currency"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/components/input-masked/__tests__/__image_snapshots__/inputmasked-have-to-match-currency-mask.snap.png b/packages/dnb-eufemia/src/components/input-masked/__tests__/__image_snapshots__/inputmasked-have-to-match-currency-mask.snap.png new file mode 100644 index 00000000000..09e6b3c8275 Binary files /dev/null and b/packages/dnb-eufemia/src/components/input-masked/__tests__/__image_snapshots__/inputmasked-have-to-match-currency-mask.snap.png differ diff --git a/packages/dnb-eufemia/src/components/input-masked/__tests__/__image_snapshots__/inputmasked-have-to-match-locale-currency.snap.png b/packages/dnb-eufemia/src/components/input-masked/__tests__/__image_snapshots__/inputmasked-have-to-match-locale-currency.snap.png new file mode 100644 index 00000000000..810880afa02 Binary files /dev/null and b/packages/dnb-eufemia/src/components/input-masked/__tests__/__image_snapshots__/inputmasked-have-to-match-locale-currency.snap.png differ diff --git a/packages/dnb-eufemia/src/components/input-masked/__tests__/__image_snapshots__/inputmasked-have-to-match-locale-number.snap.png b/packages/dnb-eufemia/src/components/input-masked/__tests__/__image_snapshots__/inputmasked-have-to-match-locale-number.snap.png new file mode 100644 index 00000000000..895092a6217 Binary files /dev/null and b/packages/dnb-eufemia/src/components/input-masked/__tests__/__image_snapshots__/inputmasked-have-to-match-locale-number.snap.png differ diff --git a/packages/dnb-eufemia/src/components/input-masked/__tests__/__image_snapshots__/inputmasked-have-to-match-masked-input.snap.png b/packages/dnb-eufemia/src/components/input-masked/__tests__/__image_snapshots__/inputmasked-have-to-match-masked-input.snap.png new file mode 100644 index 00000000000..c6187974a25 Binary files /dev/null and b/packages/dnb-eufemia/src/components/input-masked/__tests__/__image_snapshots__/inputmasked-have-to-match-masked-input.snap.png differ diff --git a/packages/dnb-eufemia/src/components/input-masked/__tests__/__image_snapshots__/inputmasked-have-to-match-number-mask.snap.png b/packages/dnb-eufemia/src/components/input-masked/__tests__/__image_snapshots__/inputmasked-have-to-match-number-mask.snap.png new file mode 100644 index 00000000000..1f3740cb5f7 Binary files /dev/null and b/packages/dnb-eufemia/src/components/input-masked/__tests__/__image_snapshots__/inputmasked-have-to-match-number-mask.snap.png differ diff --git a/packages/dnb-eufemia/src/components/input-masked/__tests__/__snapshots__/input-masked-screenshot-test-js-input-masked-screenshot-have-to-match-currency-mask-1-91820.snap.png b/packages/dnb-eufemia/src/components/input-masked/__tests__/__snapshots__/input-masked-screenshot-test-js-input-masked-screenshot-have-to-match-currency-mask-1-91820.snap.png deleted file mode 100644 index f501193cecf..00000000000 Binary files a/packages/dnb-eufemia/src/components/input-masked/__tests__/__snapshots__/input-masked-screenshot-test-js-input-masked-screenshot-have-to-match-currency-mask-1-91820.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/input-masked/__tests__/__snapshots__/input-masked-screenshot-test-js-input-masked-screenshot-have-to-match-locale-currency-1-42e29.snap.png b/packages/dnb-eufemia/src/components/input-masked/__tests__/__snapshots__/input-masked-screenshot-test-js-input-masked-screenshot-have-to-match-locale-currency-1-42e29.snap.png deleted file mode 100644 index 7412034a8fb..00000000000 Binary files a/packages/dnb-eufemia/src/components/input-masked/__tests__/__snapshots__/input-masked-screenshot-test-js-input-masked-screenshot-have-to-match-locale-currency-1-42e29.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/input-masked/__tests__/__snapshots__/input-masked-screenshot-test-js-input-masked-screenshot-have-to-match-locale-number-1-97236.snap.png b/packages/dnb-eufemia/src/components/input-masked/__tests__/__snapshots__/input-masked-screenshot-test-js-input-masked-screenshot-have-to-match-locale-number-1-97236.snap.png deleted file mode 100644 index 67a41c5cc0c..00000000000 Binary files a/packages/dnb-eufemia/src/components/input-masked/__tests__/__snapshots__/input-masked-screenshot-test-js-input-masked-screenshot-have-to-match-locale-number-1-97236.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/input-masked/__tests__/__snapshots__/input-masked-screenshot-test-js-input-masked-screenshot-have-to-match-masked-input-1-54f41.snap.png b/packages/dnb-eufemia/src/components/input-masked/__tests__/__snapshots__/input-masked-screenshot-test-js-input-masked-screenshot-have-to-match-masked-input-1-54f41.snap.png deleted file mode 100644 index 814e181e6b8..00000000000 Binary files a/packages/dnb-eufemia/src/components/input-masked/__tests__/__snapshots__/input-masked-screenshot-test-js-input-masked-screenshot-have-to-match-masked-input-1-54f41.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/input-masked/__tests__/__snapshots__/input-masked-screenshot-test-js-input-masked-screenshot-have-to-match-number-mask-1-71b48.snap.png b/packages/dnb-eufemia/src/components/input-masked/__tests__/__snapshots__/input-masked-screenshot-test-js-input-masked-screenshot-have-to-match-number-mask-1-71b48.snap.png deleted file mode 100644 index 6fd7752ba1c..00000000000 Binary files a/packages/dnb-eufemia/src/components/input-masked/__tests__/__snapshots__/input-masked-screenshot-test-js-input-masked-screenshot-have-to-match-number-mask-1-71b48.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/input/__tests__/Input.screenshot.test.js b/packages/dnb-eufemia/src/components/input/__tests__/Input.screenshot.test.js deleted file mode 100644 index 27f779a0fb4..00000000000 --- a/packages/dnb-eufemia/src/components/input/__tests__/Input.screenshot.test.js +++ /dev/null @@ -1,118 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -describe('Input screenshot', () => { - const extend = (selector) => ({ - style: { - width: '200px', // make sure our input gets an explicit width, because of mac/linux rendering differences - }, - styleSelector: `[data-visual-test="${selector}"] .dnb-input__input`, - simulateSelector: `[data-visual-test="${selector}"] .dnb-input__input`, - }) - setupPageScreenshot({ url: '/uilib/components/input/demos' }) - - it('have to match input with placeholder', async () => { - const screenshot = await testPageScreenshot({ - ...extend('input-placeholder'), - selector: '[data-visual-test="input-placeholder"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match input with icon', async () => { - const screenshot = await testPageScreenshot({ - ...extend('input-icon'), - selector: '[data-visual-test="input-icon"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match disabled input', async () => { - const screenshot = await testPageScreenshot({ - ...extend('input-disabled'), - selector: '[data-visual-test="input-disabled"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match search type', async () => { - const screenshot = await testPageScreenshot({ - ...extend('input-search'), - selector: '[data-visual-test="input-search"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match search type with focus state', async () => { - const screenshot = await testPageScreenshot({ - ...extend('input-search'), - selector: '[data-visual-test="input-search"]', - simulate: 'focus', // should be tested first - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match stretched and medium size', async () => { - const screenshot = await testPageScreenshot({ - ...{ ...extend('input-medium'), style: { width: '300px' } }, - selector: '[data-visual-test="input-medium"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match stretched input with status', async () => { - const screenshot = await testPageScreenshot({ - ...{ ...extend('input-stretch'), style: { width: '300px' } }, - selector: '[data-visual-test="input-stretch"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match error state', async () => { - const screenshot = await testPageScreenshot({ - ...extend('input-error'), - selector: '[data-visual-test="input-error"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match input with clear button', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="input-clear"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match input with clear button in hover state', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="input-clear"]', - simulateSelector: - '[data-visual-test="input-clear"] .dnb-input:nth-of-type(3) .dnb-input__clear-button', - simulate: 'hover', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match password input', async () => { - const screenshot = await testPageScreenshot({ - ...extend('input-password'), - selector: '[data-visual-test="input-password"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match text align with icon', async () => { - const screenshot = await testPageScreenshot({ - ...extend('input-align'), - selector: '[data-visual-test="input-align"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/components/input/__tests__/Input.screenshot.test.ts b/packages/dnb-eufemia/src/components/input/__tests__/Input.screenshot.test.ts new file mode 100644 index 00000000000..768d31141e9 --- /dev/null +++ b/packages/dnb-eufemia/src/components/input/__tests__/Input.screenshot.test.ts @@ -0,0 +1,118 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../../core/jest/jestSetupScreenshots' + +describe('Input', () => { + const extend = (selector) => ({ + style: { + width: '200px', // make sure our input gets an explicit width, because of mac/linux rendering differences + }, + styleSelector: `[data-visual-test="${selector}"] .dnb-input__input`, + simulateSelector: `[data-visual-test="${selector}"] .dnb-input__input`, + }) + setupPageScreenshot({ url: '/uilib/components/input/demos' }) + + it('have to match input with placeholder', async () => { + const screenshot = await makeScreenshot({ + ...extend('input-placeholder'), + selector: '[data-visual-test="input-placeholder"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match input with icon', async () => { + const screenshot = await makeScreenshot({ + ...extend('input-icon'), + selector: '[data-visual-test="input-icon"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match disabled input', async () => { + const screenshot = await makeScreenshot({ + ...extend('input-disabled'), + selector: '[data-visual-test="input-disabled"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match search type', async () => { + const screenshot = await makeScreenshot({ + ...extend('input-search'), + selector: '[data-visual-test="input-search"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match search type with focus state', async () => { + const screenshot = await makeScreenshot({ + ...extend('input-search'), + selector: '[data-visual-test="input-search"]', + simulate: 'focus', // should be tested first + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match stretched and medium size', async () => { + const screenshot = await makeScreenshot({ + ...{ ...extend('input-medium'), style: { width: '300px' } }, + selector: '[data-visual-test="input-medium"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match stretched input with status', async () => { + const screenshot = await makeScreenshot({ + ...{ ...extend('input-stretch'), style: { width: '300px' } }, + selector: '[data-visual-test="input-stretch"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match error state', async () => { + const screenshot = await makeScreenshot({ + ...extend('input-error'), + selector: '[data-visual-test="input-error"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match input with clear button', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="input-clear"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match input with clear button in hover state', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="input-clear"]', + simulateSelector: + '[data-visual-test="input-clear"] .dnb-input:nth-of-type(3) .dnb-input__clear-button', + simulate: 'hover', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match password input', async () => { + const screenshot = await makeScreenshot({ + ...extend('input-password'), + selector: '[data-visual-test="input-password"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match text align with icon', async () => { + const screenshot = await makeScreenshot({ + ...extend('input-align'), + selector: '[data-visual-test="input-align"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/components/input/__tests__/__image_snapshots__/input-have-to-match-disabled-input.snap.png b/packages/dnb-eufemia/src/components/input/__tests__/__image_snapshots__/input-have-to-match-disabled-input.snap.png new file mode 100644 index 00000000000..b5d5729a484 Binary files /dev/null and b/packages/dnb-eufemia/src/components/input/__tests__/__image_snapshots__/input-have-to-match-disabled-input.snap.png differ diff --git a/packages/dnb-eufemia/src/components/input/__tests__/__image_snapshots__/input-have-to-match-error-state.snap.png b/packages/dnb-eufemia/src/components/input/__tests__/__image_snapshots__/input-have-to-match-error-state.snap.png new file mode 100644 index 00000000000..3262f275e94 Binary files /dev/null and b/packages/dnb-eufemia/src/components/input/__tests__/__image_snapshots__/input-have-to-match-error-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/input/__tests__/__image_snapshots__/input-have-to-match-input-with-clear-button-in-hover-state.snap.png b/packages/dnb-eufemia/src/components/input/__tests__/__image_snapshots__/input-have-to-match-input-with-clear-button-in-hover-state.snap.png new file mode 100644 index 00000000000..de3b396182c Binary files /dev/null and b/packages/dnb-eufemia/src/components/input/__tests__/__image_snapshots__/input-have-to-match-input-with-clear-button-in-hover-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/input/__tests__/__image_snapshots__/input-have-to-match-input-with-clear-button.snap.png b/packages/dnb-eufemia/src/components/input/__tests__/__image_snapshots__/input-have-to-match-input-with-clear-button.snap.png new file mode 100644 index 00000000000..149ff2db63b Binary files /dev/null and b/packages/dnb-eufemia/src/components/input/__tests__/__image_snapshots__/input-have-to-match-input-with-clear-button.snap.png differ diff --git a/packages/dnb-eufemia/src/components/input/__tests__/__image_snapshots__/input-have-to-match-input-with-icon.snap.png b/packages/dnb-eufemia/src/components/input/__tests__/__image_snapshots__/input-have-to-match-input-with-icon.snap.png new file mode 100644 index 00000000000..65665742f9c Binary files /dev/null and b/packages/dnb-eufemia/src/components/input/__tests__/__image_snapshots__/input-have-to-match-input-with-icon.snap.png differ diff --git a/packages/dnb-eufemia/src/components/input/__tests__/__image_snapshots__/input-have-to-match-input-with-placeholder.snap.png b/packages/dnb-eufemia/src/components/input/__tests__/__image_snapshots__/input-have-to-match-input-with-placeholder.snap.png new file mode 100644 index 00000000000..463551bbbe5 Binary files /dev/null and b/packages/dnb-eufemia/src/components/input/__tests__/__image_snapshots__/input-have-to-match-input-with-placeholder.snap.png differ diff --git a/packages/dnb-eufemia/src/components/input/__tests__/__image_snapshots__/input-have-to-match-password-input.snap.png b/packages/dnb-eufemia/src/components/input/__tests__/__image_snapshots__/input-have-to-match-password-input.snap.png new file mode 100644 index 00000000000..077b9ca5f10 Binary files /dev/null and b/packages/dnb-eufemia/src/components/input/__tests__/__image_snapshots__/input-have-to-match-password-input.snap.png differ diff --git a/packages/dnb-eufemia/src/components/input/__tests__/__image_snapshots__/input-have-to-match-search-type-with-focus-state.snap.png b/packages/dnb-eufemia/src/components/input/__tests__/__image_snapshots__/input-have-to-match-search-type-with-focus-state.snap.png new file mode 100644 index 00000000000..4c58e28200d Binary files /dev/null and b/packages/dnb-eufemia/src/components/input/__tests__/__image_snapshots__/input-have-to-match-search-type-with-focus-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/input/__tests__/__image_snapshots__/input-have-to-match-search-type.snap.png b/packages/dnb-eufemia/src/components/input/__tests__/__image_snapshots__/input-have-to-match-search-type.snap.png new file mode 100644 index 00000000000..25889b5e572 Binary files /dev/null and b/packages/dnb-eufemia/src/components/input/__tests__/__image_snapshots__/input-have-to-match-search-type.snap.png differ diff --git a/packages/dnb-eufemia/src/components/input/__tests__/__image_snapshots__/input-have-to-match-stretched-and-medium-size.snap.png b/packages/dnb-eufemia/src/components/input/__tests__/__image_snapshots__/input-have-to-match-stretched-and-medium-size.snap.png new file mode 100644 index 00000000000..0b0eb48aae3 Binary files /dev/null and b/packages/dnb-eufemia/src/components/input/__tests__/__image_snapshots__/input-have-to-match-stretched-and-medium-size.snap.png differ diff --git a/packages/dnb-eufemia/src/components/input/__tests__/__image_snapshots__/input-have-to-match-stretched-input-with-status.snap.png b/packages/dnb-eufemia/src/components/input/__tests__/__image_snapshots__/input-have-to-match-stretched-input-with-status.snap.png new file mode 100644 index 00000000000..0bf8548733d Binary files /dev/null and b/packages/dnb-eufemia/src/components/input/__tests__/__image_snapshots__/input-have-to-match-stretched-input-with-status.snap.png differ diff --git a/packages/dnb-eufemia/src/components/input/__tests__/__image_snapshots__/input-have-to-match-text-align-with-icon.snap.png b/packages/dnb-eufemia/src/components/input/__tests__/__image_snapshots__/input-have-to-match-text-align-with-icon.snap.png new file mode 100644 index 00000000000..c7184657607 Binary files /dev/null and b/packages/dnb-eufemia/src/components/input/__tests__/__image_snapshots__/input-have-to-match-text-align-with-icon.snap.png differ diff --git a/packages/dnb-eufemia/src/components/input/__tests__/__snapshots__/input-screenshot-test-js-input-screenshot-have-to-match-disabled-input-1-09630.snap.png b/packages/dnb-eufemia/src/components/input/__tests__/__snapshots__/input-screenshot-test-js-input-screenshot-have-to-match-disabled-input-1-09630.snap.png deleted file mode 100644 index 6a7be082101..00000000000 Binary files a/packages/dnb-eufemia/src/components/input/__tests__/__snapshots__/input-screenshot-test-js-input-screenshot-have-to-match-disabled-input-1-09630.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/input/__tests__/__snapshots__/input-screenshot-test-js-input-screenshot-have-to-match-error-state-1-4767c.snap.png b/packages/dnb-eufemia/src/components/input/__tests__/__snapshots__/input-screenshot-test-js-input-screenshot-have-to-match-error-state-1-4767c.snap.png deleted file mode 100644 index 18c11b745ae..00000000000 Binary files a/packages/dnb-eufemia/src/components/input/__tests__/__snapshots__/input-screenshot-test-js-input-screenshot-have-to-match-error-state-1-4767c.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/input/__tests__/__snapshots__/input-screenshot-test-js-input-screenshot-have-to-match-input-with-clear-button-1-4a819.snap.png b/packages/dnb-eufemia/src/components/input/__tests__/__snapshots__/input-screenshot-test-js-input-screenshot-have-to-match-input-with-clear-button-1-4a819.snap.png deleted file mode 100644 index 921e0501797..00000000000 Binary files a/packages/dnb-eufemia/src/components/input/__tests__/__snapshots__/input-screenshot-test-js-input-screenshot-have-to-match-input-with-clear-button-1-4a819.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/input/__tests__/__snapshots__/input-screenshot-test-js-input-screenshot-have-to-match-input-with-clear-button-in-hover-state-1-de197.snap.png b/packages/dnb-eufemia/src/components/input/__tests__/__snapshots__/input-screenshot-test-js-input-screenshot-have-to-match-input-with-clear-button-in-hover-state-1-de197.snap.png deleted file mode 100644 index 0b7877672f0..00000000000 Binary files a/packages/dnb-eufemia/src/components/input/__tests__/__snapshots__/input-screenshot-test-js-input-screenshot-have-to-match-input-with-clear-button-in-hover-state-1-de197.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/input/__tests__/__snapshots__/input-screenshot-test-js-input-screenshot-have-to-match-input-with-icon-1-0eb1a.snap.png b/packages/dnb-eufemia/src/components/input/__tests__/__snapshots__/input-screenshot-test-js-input-screenshot-have-to-match-input-with-icon-1-0eb1a.snap.png deleted file mode 100644 index c1df4a35c31..00000000000 Binary files a/packages/dnb-eufemia/src/components/input/__tests__/__snapshots__/input-screenshot-test-js-input-screenshot-have-to-match-input-with-icon-1-0eb1a.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/input/__tests__/__snapshots__/input-screenshot-test-js-input-screenshot-have-to-match-input-with-placeholder-1-2368e.snap.png b/packages/dnb-eufemia/src/components/input/__tests__/__snapshots__/input-screenshot-test-js-input-screenshot-have-to-match-input-with-placeholder-1-2368e.snap.png deleted file mode 100644 index c4a2eb57515..00000000000 Binary files a/packages/dnb-eufemia/src/components/input/__tests__/__snapshots__/input-screenshot-test-js-input-screenshot-have-to-match-input-with-placeholder-1-2368e.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/input/__tests__/__snapshots__/input-screenshot-test-js-input-screenshot-have-to-match-password-input-1-2dc9c.snap.png b/packages/dnb-eufemia/src/components/input/__tests__/__snapshots__/input-screenshot-test-js-input-screenshot-have-to-match-password-input-1-2dc9c.snap.png deleted file mode 100644 index 76127b6757f..00000000000 Binary files a/packages/dnb-eufemia/src/components/input/__tests__/__snapshots__/input-screenshot-test-js-input-screenshot-have-to-match-password-input-1-2dc9c.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/input/__tests__/__snapshots__/input-screenshot-test-js-input-screenshot-have-to-match-search-type-1-d16f9.snap.png b/packages/dnb-eufemia/src/components/input/__tests__/__snapshots__/input-screenshot-test-js-input-screenshot-have-to-match-search-type-1-d16f9.snap.png deleted file mode 100644 index 3e65564e9f8..00000000000 Binary files a/packages/dnb-eufemia/src/components/input/__tests__/__snapshots__/input-screenshot-test-js-input-screenshot-have-to-match-search-type-1-d16f9.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/input/__tests__/__snapshots__/input-screenshot-test-js-input-screenshot-have-to-match-search-type-with-focus-state-1-08a2d.snap.png b/packages/dnb-eufemia/src/components/input/__tests__/__snapshots__/input-screenshot-test-js-input-screenshot-have-to-match-search-type-with-focus-state-1-08a2d.snap.png deleted file mode 100644 index 878bb0de019..00000000000 Binary files a/packages/dnb-eufemia/src/components/input/__tests__/__snapshots__/input-screenshot-test-js-input-screenshot-have-to-match-search-type-with-focus-state-1-08a2d.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/input/__tests__/__snapshots__/input-screenshot-test-js-input-screenshot-have-to-match-stretched-and-medium-size-1-8ad65.snap.png b/packages/dnb-eufemia/src/components/input/__tests__/__snapshots__/input-screenshot-test-js-input-screenshot-have-to-match-stretched-and-medium-size-1-8ad65.snap.png deleted file mode 100644 index 075da5e58fc..00000000000 Binary files a/packages/dnb-eufemia/src/components/input/__tests__/__snapshots__/input-screenshot-test-js-input-screenshot-have-to-match-stretched-and-medium-size-1-8ad65.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/input/__tests__/__snapshots__/input-screenshot-test-js-input-screenshot-have-to-match-stretched-input-with-status-1-2a92c.snap.png b/packages/dnb-eufemia/src/components/input/__tests__/__snapshots__/input-screenshot-test-js-input-screenshot-have-to-match-stretched-input-with-status-1-2a92c.snap.png deleted file mode 100644 index c3491c13ccd..00000000000 Binary files a/packages/dnb-eufemia/src/components/input/__tests__/__snapshots__/input-screenshot-test-js-input-screenshot-have-to-match-stretched-input-with-status-1-2a92c.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/input/__tests__/__snapshots__/input-screenshot-test-js-input-screenshot-have-to-match-text-align-with-icon-1-94167.snap.png b/packages/dnb-eufemia/src/components/input/__tests__/__snapshots__/input-screenshot-test-js-input-screenshot-have-to-match-text-align-with-icon-1-94167.snap.png deleted file mode 100644 index 8ceb9e292d7..00000000000 Binary files a/packages/dnb-eufemia/src/components/input/__tests__/__snapshots__/input-screenshot-test-js-input-screenshot-have-to-match-text-align-with-icon-1-94167.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/logo/__tests__/Logo.screenshot.test.js b/packages/dnb-eufemia/src/components/logo/__tests__/Logo.screenshot.test.js deleted file mode 100644 index c3b598b8d12..00000000000 --- a/packages/dnb-eufemia/src/components/logo/__tests__/Logo.screenshot.test.js +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -describe('Logo screenshot', () => { - setupPageScreenshot({ url: '/uilib/components/logo/demos' }) - - it('have to match the default "Logo"', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="logo-default"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the auto sized "Logo"', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="logo-auto-size"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the inherited sized "Logo"', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="logo-inherit-size"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the inherited color', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="logo-inherit-color"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/components/logo/__tests__/Logo.screenshot.test.ts b/packages/dnb-eufemia/src/components/logo/__tests__/Logo.screenshot.test.ts new file mode 100644 index 00000000000..9bc42ccff0e --- /dev/null +++ b/packages/dnb-eufemia/src/components/logo/__tests__/Logo.screenshot.test.ts @@ -0,0 +1,52 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import path from 'path' +import { + loadImage, + makeScreenshot, + setupPageScreenshot, +} from '../../../core/jest/jestSetupScreenshots' + +describe('Logo', () => { + setupPageScreenshot({ url: '/uilib/components/logo/demos' }) + + it('have to match the default "Logo"', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="logo-default"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the auto sized "Logo"', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="logo-auto-size"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the inherited sized "Logo"', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="logo-inherit-size"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the inherited color', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="logo-inherit-color"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + describe('png image', () => { + it('have to match image snapshot', async () => { + const image = await loadImage( + path.resolve(__dirname, '../../../../assets/images/dnb-logo.png') + ) + expect(image).toMatchImageSnapshot() + }) + }) +}) diff --git a/packages/dnb-eufemia/src/components/logo/__tests__/__image_snapshots__/logo-have-to-match-the-auto-sized-logo.snap.png b/packages/dnb-eufemia/src/components/logo/__tests__/__image_snapshots__/logo-have-to-match-the-auto-sized-logo.snap.png new file mode 100644 index 00000000000..95d3846f4d2 Binary files /dev/null and b/packages/dnb-eufemia/src/components/logo/__tests__/__image_snapshots__/logo-have-to-match-the-auto-sized-logo.snap.png differ diff --git a/packages/dnb-eufemia/src/components/logo/__tests__/__image_snapshots__/logo-have-to-match-the-default-logo.snap.png b/packages/dnb-eufemia/src/components/logo/__tests__/__image_snapshots__/logo-have-to-match-the-default-logo.snap.png new file mode 100644 index 00000000000..95d3846f4d2 Binary files /dev/null and b/packages/dnb-eufemia/src/components/logo/__tests__/__image_snapshots__/logo-have-to-match-the-default-logo.snap.png differ diff --git a/packages/dnb-eufemia/src/components/logo/__tests__/__image_snapshots__/logo-have-to-match-the-inherited-color.snap.png b/packages/dnb-eufemia/src/components/logo/__tests__/__image_snapshots__/logo-have-to-match-the-inherited-color.snap.png new file mode 100644 index 00000000000..626122fa2fe Binary files /dev/null and b/packages/dnb-eufemia/src/components/logo/__tests__/__image_snapshots__/logo-have-to-match-the-inherited-color.snap.png differ diff --git a/packages/dnb-eufemia/src/components/logo/__tests__/__image_snapshots__/logo-have-to-match-the-inherited-sized-logo.snap.png b/packages/dnb-eufemia/src/components/logo/__tests__/__image_snapshots__/logo-have-to-match-the-inherited-sized-logo.snap.png new file mode 100644 index 00000000000..95d3846f4d2 Binary files /dev/null and b/packages/dnb-eufemia/src/components/logo/__tests__/__image_snapshots__/logo-have-to-match-the-inherited-sized-logo.snap.png differ diff --git a/packages/dnb-eufemia/assets/images/__tests__/__snapshots__/logo-screenshot-test-js-logo-image-have-to-match-image-snapshot-1-49ee6.snap.png b/packages/dnb-eufemia/src/components/logo/__tests__/__image_snapshots__/logo-png-image-have-to-match-image-snapshot.snap.png similarity index 100% rename from packages/dnb-eufemia/assets/images/__tests__/__snapshots__/logo-screenshot-test-js-logo-image-have-to-match-image-snapshot-1-49ee6.snap.png rename to packages/dnb-eufemia/src/components/logo/__tests__/__image_snapshots__/logo-png-image-have-to-match-image-snapshot.snap.png diff --git a/packages/dnb-eufemia/src/components/logo/__tests__/__snapshots__/logo-screenshot-test-js-logo-screenshot-have-to-match-the-auto-sized-logo-1-ab047.snap.png b/packages/dnb-eufemia/src/components/logo/__tests__/__snapshots__/logo-screenshot-test-js-logo-screenshot-have-to-match-the-auto-sized-logo-1-ab047.snap.png deleted file mode 100644 index 5d1fec941c4..00000000000 Binary files a/packages/dnb-eufemia/src/components/logo/__tests__/__snapshots__/logo-screenshot-test-js-logo-screenshot-have-to-match-the-auto-sized-logo-1-ab047.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/logo/__tests__/__snapshots__/logo-screenshot-test-js-logo-screenshot-have-to-match-the-default-logo-1-57086.snap.png b/packages/dnb-eufemia/src/components/logo/__tests__/__snapshots__/logo-screenshot-test-js-logo-screenshot-have-to-match-the-default-logo-1-57086.snap.png deleted file mode 100644 index 06bfbf40c5b..00000000000 Binary files a/packages/dnb-eufemia/src/components/logo/__tests__/__snapshots__/logo-screenshot-test-js-logo-screenshot-have-to-match-the-default-logo-1-57086.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/logo/__tests__/__snapshots__/logo-screenshot-test-js-logo-screenshot-have-to-match-the-inherited-color-1-0acbf.snap.png b/packages/dnb-eufemia/src/components/logo/__tests__/__snapshots__/logo-screenshot-test-js-logo-screenshot-have-to-match-the-inherited-color-1-0acbf.snap.png deleted file mode 100644 index 797f8b06ae0..00000000000 Binary files a/packages/dnb-eufemia/src/components/logo/__tests__/__snapshots__/logo-screenshot-test-js-logo-screenshot-have-to-match-the-inherited-color-1-0acbf.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/logo/__tests__/__snapshots__/logo-screenshot-test-js-logo-screenshot-have-to-match-the-inherited-sized-logo-1-82156.snap.png b/packages/dnb-eufemia/src/components/logo/__tests__/__snapshots__/logo-screenshot-test-js-logo-screenshot-have-to-match-the-inherited-sized-logo-1-82156.snap.png deleted file mode 100644 index 5d1fec941c4..00000000000 Binary files a/packages/dnb-eufemia/src/components/logo/__tests__/__snapshots__/logo-screenshot-test-js-logo-screenshot-have-to-match-the-inherited-sized-logo-1-82156.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/modal/__tests__/Modal.screenshot.test.js b/packages/dnb-eufemia/src/components/modal/__tests__/Modal.screenshot.test.js deleted file mode 100644 index 2ffc57cf639..00000000000 --- a/packages/dnb-eufemia/src/components/modal/__tests__/Modal.screenshot.test.js +++ /dev/null @@ -1,87 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -const pageViewport = { - width: 700, - height: 600, -} - -describe('Modal screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/modal/visual-tests/hidden-tests', - }) - - it('have to match the default modal trigger button', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="modal-trigger-default"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the suffix help button usage', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="modal-help-button"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the default modal window with title', async () => { - const screenshot = await testPageScreenshot({ - selector: 'div#dnb-modal-root', // only to make sure we have a valid selector - simulate: 'click', - simulateSelector: - '[data-visual-test="modal-trigger-default"] button:first-of-type', - screenshotSelector: '.dnb-dialog', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Modal screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/modal/visual-tests/hidden-tests', - pageViewport, - }) - - it('have to match the default modal window', async () => { - const screenshot = await testPageScreenshot({ - selector: 'div#dnb-modal-root', // only to make sure we have a valid selector - simulate: 'click', - simulateSelector: - '[data-visual-test="modal-trigger-default"] button:first-of-type', - screenshotSelector: '.dnb-modal__content', - rootClassName: 'hide-page-content', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Additional Modal screenshot', () => { - const pageViewport = { - width: 400, - height: 400, - } - setupPageScreenshot({ - url: '/uilib/components/modal/visual-tests/hidden-tests', - pageViewport, - }) - - it('have to match a fullscreen modal', async () => { - const screenshot = await testPageScreenshot({ - selector: 'div#dnb-modal-root', // only to make sure we have a valid selector - simulate: 'click', - simulateSelector: - '[data-visual-test="modal-fullscreen"] button:first-of-type', - screenshotSelector: '.dnb-modal__content', - rootClassName: 'hide-page-content', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/components/modal/__tests__/Modal.screenshot.test.ts b/packages/dnb-eufemia/src/components/modal/__tests__/Modal.screenshot.test.ts new file mode 100644 index 00000000000..51769d7d24c --- /dev/null +++ b/packages/dnb-eufemia/src/components/modal/__tests__/Modal.screenshot.test.ts @@ -0,0 +1,72 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { makeScreenshot } from '../../../core/jest/jestSetupScreenshots' + +describe('Modal', () => { + const url = '/uilib/components/modal/visual-tests/hidden-tests' + + it('have to match the default modal trigger button', async () => { + const screenshot = await makeScreenshot({ + url, + selector: '[data-visual-test="modal-trigger-default"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the suffix help button usage', async () => { + const screenshot = await makeScreenshot({ + url, + selector: '[data-visual-test="modal-help-button"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the default modal window with title', async () => { + const screenshot = await makeScreenshot({ + url, + selector: 'div#dnb-modal-root', // only to make sure we have a valid selector + simulate: 'click', + simulateSelector: + '[data-visual-test="modal-trigger-default"] button:first-of-type', + screenshotSelector: '.dnb-dialog', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the default modal window', async () => { + const screenshot = await makeScreenshot({ + url: '/uilib/components/modal/visual-tests/hidden-tests', + pageViewport: { + width: 700, + height: 600, + }, + selector: 'div#dnb-modal-root', // only to make sure we have a valid selector + simulate: 'click', + simulateSelector: + '[data-visual-test="modal-trigger-default"] button:first-of-type', + screenshotSelector: '.dnb-modal__content', + rootClassName: 'hide-page-content', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match a fullscreen modal', async () => { + const screenshot = await makeScreenshot({ + url: '/uilib/components/modal/visual-tests/hidden-tests', + pageViewport: { + width: 400, + height: 400, + }, + selector: 'div#dnb-modal-root', // only to make sure we have a valid selector + simulate: 'click', + simulateSelector: + '[data-visual-test="modal-fullscreen"] button:first-of-type', + screenshotSelector: '.dnb-modal__content', + rootClassName: 'hide-page-content', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/components/modal/__tests__/__image_snapshots__/modal-have-to-match-a-fullscreen-modal.snap.png b/packages/dnb-eufemia/src/components/modal/__tests__/__image_snapshots__/modal-have-to-match-a-fullscreen-modal.snap.png new file mode 100644 index 00000000000..a3a5607855f Binary files /dev/null and b/packages/dnb-eufemia/src/components/modal/__tests__/__image_snapshots__/modal-have-to-match-a-fullscreen-modal.snap.png differ diff --git a/packages/dnb-eufemia/src/components/modal/__tests__/__image_snapshots__/modal-have-to-match-the-default-modal-trigger-button.snap.png b/packages/dnb-eufemia/src/components/modal/__tests__/__image_snapshots__/modal-have-to-match-the-default-modal-trigger-button.snap.png new file mode 100644 index 00000000000..faeec401821 Binary files /dev/null and b/packages/dnb-eufemia/src/components/modal/__tests__/__image_snapshots__/modal-have-to-match-the-default-modal-trigger-button.snap.png differ diff --git a/packages/dnb-eufemia/src/components/modal/__tests__/__image_snapshots__/modal-have-to-match-the-default-modal-window-with-title.snap.png b/packages/dnb-eufemia/src/components/modal/__tests__/__image_snapshots__/modal-have-to-match-the-default-modal-window-with-title.snap.png new file mode 100644 index 00000000000..424b47df28d Binary files /dev/null and b/packages/dnb-eufemia/src/components/modal/__tests__/__image_snapshots__/modal-have-to-match-the-default-modal-window-with-title.snap.png differ diff --git a/packages/dnb-eufemia/src/components/modal/__tests__/__image_snapshots__/modal-have-to-match-the-default-modal-window.snap.png b/packages/dnb-eufemia/src/components/modal/__tests__/__image_snapshots__/modal-have-to-match-the-default-modal-window.snap.png new file mode 100644 index 00000000000..a6a3fb5d1b3 Binary files /dev/null and b/packages/dnb-eufemia/src/components/modal/__tests__/__image_snapshots__/modal-have-to-match-the-default-modal-window.snap.png differ diff --git a/packages/dnb-eufemia/src/components/modal/__tests__/__image_snapshots__/modal-have-to-match-the-suffix-help-button-usage.snap.png b/packages/dnb-eufemia/src/components/modal/__tests__/__image_snapshots__/modal-have-to-match-the-suffix-help-button-usage.snap.png new file mode 100644 index 00000000000..73f605f5e3f Binary files /dev/null and b/packages/dnb-eufemia/src/components/modal/__tests__/__image_snapshots__/modal-have-to-match-the-suffix-help-button-usage.snap.png differ diff --git a/packages/dnb-eufemia/src/components/modal/__tests__/__snapshots__/modal-screenshot-test-js-additional-modal-screenshot-have-to-match-a-fullscreen-modal-1-eb31e.snap.png b/packages/dnb-eufemia/src/components/modal/__tests__/__snapshots__/modal-screenshot-test-js-additional-modal-screenshot-have-to-match-a-fullscreen-modal-1-eb31e.snap.png deleted file mode 100644 index 100f787666d..00000000000 Binary files a/packages/dnb-eufemia/src/components/modal/__tests__/__snapshots__/modal-screenshot-test-js-additional-modal-screenshot-have-to-match-a-fullscreen-modal-1-eb31e.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/modal/__tests__/__snapshots__/modal-screenshot-test-js-modal-screenshot-have-to-match-the-default-modal-trigger-button-1-0ba52.snap.png b/packages/dnb-eufemia/src/components/modal/__tests__/__snapshots__/modal-screenshot-test-js-modal-screenshot-have-to-match-the-default-modal-trigger-button-1-0ba52.snap.png deleted file mode 100644 index c90ec240423..00000000000 Binary files a/packages/dnb-eufemia/src/components/modal/__tests__/__snapshots__/modal-screenshot-test-js-modal-screenshot-have-to-match-the-default-modal-trigger-button-1-0ba52.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/modal/__tests__/__snapshots__/modal-screenshot-test-js-modal-screenshot-have-to-match-the-default-modal-window-1-b836a.snap.png b/packages/dnb-eufemia/src/components/modal/__tests__/__snapshots__/modal-screenshot-test-js-modal-screenshot-have-to-match-the-default-modal-window-1-b836a.snap.png deleted file mode 100644 index b2931772d47..00000000000 Binary files a/packages/dnb-eufemia/src/components/modal/__tests__/__snapshots__/modal-screenshot-test-js-modal-screenshot-have-to-match-the-default-modal-window-1-b836a.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/modal/__tests__/__snapshots__/modal-screenshot-test-js-modal-screenshot-have-to-match-the-default-modal-window-with-title-1-8e313.snap.png b/packages/dnb-eufemia/src/components/modal/__tests__/__snapshots__/modal-screenshot-test-js-modal-screenshot-have-to-match-the-default-modal-window-with-title-1-8e313.snap.png deleted file mode 100644 index ec4dc73a65c..00000000000 Binary files a/packages/dnb-eufemia/src/components/modal/__tests__/__snapshots__/modal-screenshot-test-js-modal-screenshot-have-to-match-the-default-modal-window-with-title-1-8e313.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/modal/__tests__/__snapshots__/modal-screenshot-test-js-modal-screenshot-have-to-match-the-suffix-help-button-usage-1-64d4d.snap.png b/packages/dnb-eufemia/src/components/modal/__tests__/__snapshots__/modal-screenshot-test-js-modal-screenshot-have-to-match-the-suffix-help-button-usage-1-64d4d.snap.png deleted file mode 100644 index 2ee2294afaa..00000000000 Binary files a/packages/dnb-eufemia/src/components/modal/__tests__/__snapshots__/modal-screenshot-test-js-modal-screenshot-have-to-match-the-suffix-help-button-usage-1-64d4d.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/number-format/__tests__/NumberFormat.screenshot.test.js b/packages/dnb-eufemia/src/components/number-format/__tests__/NumberFormat.screenshot.test.js deleted file mode 100644 index 6ab523fbf3d..00000000000 --- a/packages/dnb-eufemia/src/components/number-format/__tests__/NumberFormat.screenshot.test.js +++ /dev/null @@ -1,113 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -describe('NumberFormat screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/number-format/demos', - }) - - it('have to match default numbers', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="number-format-default"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match percent numbers', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="number-format-percent"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match compact numbers', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="number-format-compact"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match numbers in different locales', async () => { - const screenshot = await testPageScreenshot({ - style: { height: '30rem' }, - selector: '[data-visual-test="number-format-locales"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match currency', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="number-format-currency"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match phone', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="number-format-phone"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match ban', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="number-format-ban"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match nin', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="number-format-nin"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match org', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="number-format-org"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match spacing system usage', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="number-format-spacing"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('NumberFormat with skeleton screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/number-format/demos?skeleton', - }) - - it('have to match default numbers', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="number-format-default"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match currency', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="number-format-currency"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match phone', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="number-format-phone"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/components/number-format/__tests__/NumberFormat.screenshot.test.ts b/packages/dnb-eufemia/src/components/number-format/__tests__/NumberFormat.screenshot.test.ts new file mode 100644 index 00000000000..2db69119659 --- /dev/null +++ b/packages/dnb-eufemia/src/components/number-format/__tests__/NumberFormat.screenshot.test.ts @@ -0,0 +1,113 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../../core/jest/jestSetupScreenshots' + +describe('NumberFormat', () => { + setupPageScreenshot({ + url: '/uilib/components/number-format/demos', + }) + + it('have to match default numbers', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="number-format-default"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match percent numbers', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="number-format-percent"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match compact numbers', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="number-format-compact"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match numbers in different locales', async () => { + const screenshot = await makeScreenshot({ + style: { height: '30rem' }, + selector: '[data-visual-test="number-format-locales"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match currency', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="number-format-currency"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match phone', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="number-format-phone"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match ban', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="number-format-ban"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match nin', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="number-format-nin"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match org', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="number-format-org"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match spacing system usage', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="number-format-spacing"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) + +describe('NumberFormat with skeleton', () => { + setupPageScreenshot({ + url: '/uilib/components/number-format/demos?skeleton', + }) + + it('have to match default numbers', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="number-format-default"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match currency', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="number-format-currency"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match phone', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="number-format-phone"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/components/number-format/__tests__/__image_snapshots__/numberformat-have-to-match-ban.snap.png b/packages/dnb-eufemia/src/components/number-format/__tests__/__image_snapshots__/numberformat-have-to-match-ban.snap.png new file mode 100644 index 00000000000..bd950647978 Binary files /dev/null and b/packages/dnb-eufemia/src/components/number-format/__tests__/__image_snapshots__/numberformat-have-to-match-ban.snap.png differ diff --git a/packages/dnb-eufemia/src/components/number-format/__tests__/__image_snapshots__/numberformat-have-to-match-compact-numbers.snap.png b/packages/dnb-eufemia/src/components/number-format/__tests__/__image_snapshots__/numberformat-have-to-match-compact-numbers.snap.png new file mode 100644 index 00000000000..ea292a12e98 Binary files /dev/null and b/packages/dnb-eufemia/src/components/number-format/__tests__/__image_snapshots__/numberformat-have-to-match-compact-numbers.snap.png differ diff --git a/packages/dnb-eufemia/src/components/number-format/__tests__/__image_snapshots__/numberformat-have-to-match-currency.snap.png b/packages/dnb-eufemia/src/components/number-format/__tests__/__image_snapshots__/numberformat-have-to-match-currency.snap.png new file mode 100644 index 00000000000..9c51387201e Binary files /dev/null and b/packages/dnb-eufemia/src/components/number-format/__tests__/__image_snapshots__/numberformat-have-to-match-currency.snap.png differ diff --git a/packages/dnb-eufemia/src/components/number-format/__tests__/__image_snapshots__/numberformat-have-to-match-default-numbers.snap.png b/packages/dnb-eufemia/src/components/number-format/__tests__/__image_snapshots__/numberformat-have-to-match-default-numbers.snap.png new file mode 100644 index 00000000000..3092963d7c4 Binary files /dev/null and b/packages/dnb-eufemia/src/components/number-format/__tests__/__image_snapshots__/numberformat-have-to-match-default-numbers.snap.png differ diff --git a/packages/dnb-eufemia/src/components/number-format/__tests__/__image_snapshots__/numberformat-have-to-match-nin.snap.png b/packages/dnb-eufemia/src/components/number-format/__tests__/__image_snapshots__/numberformat-have-to-match-nin.snap.png new file mode 100644 index 00000000000..84dcdbc1f3c Binary files /dev/null and b/packages/dnb-eufemia/src/components/number-format/__tests__/__image_snapshots__/numberformat-have-to-match-nin.snap.png differ diff --git a/packages/dnb-eufemia/src/components/number-format/__tests__/__image_snapshots__/numberformat-have-to-match-numbers-in-different-locales.snap.png b/packages/dnb-eufemia/src/components/number-format/__tests__/__image_snapshots__/numberformat-have-to-match-numbers-in-different-locales.snap.png new file mode 100644 index 00000000000..0cc833811c9 Binary files /dev/null and b/packages/dnb-eufemia/src/components/number-format/__tests__/__image_snapshots__/numberformat-have-to-match-numbers-in-different-locales.snap.png differ diff --git a/packages/dnb-eufemia/src/components/number-format/__tests__/__image_snapshots__/numberformat-have-to-match-org.snap.png b/packages/dnb-eufemia/src/components/number-format/__tests__/__image_snapshots__/numberformat-have-to-match-org.snap.png new file mode 100644 index 00000000000..3244759aa0f Binary files /dev/null and b/packages/dnb-eufemia/src/components/number-format/__tests__/__image_snapshots__/numberformat-have-to-match-org.snap.png differ diff --git a/packages/dnb-eufemia/src/components/number-format/__tests__/__image_snapshots__/numberformat-have-to-match-percent-numbers.snap.png b/packages/dnb-eufemia/src/components/number-format/__tests__/__image_snapshots__/numberformat-have-to-match-percent-numbers.snap.png new file mode 100644 index 00000000000..052719834a5 Binary files /dev/null and b/packages/dnb-eufemia/src/components/number-format/__tests__/__image_snapshots__/numberformat-have-to-match-percent-numbers.snap.png differ diff --git a/packages/dnb-eufemia/src/components/number-format/__tests__/__image_snapshots__/numberformat-have-to-match-phone.snap.png b/packages/dnb-eufemia/src/components/number-format/__tests__/__image_snapshots__/numberformat-have-to-match-phone.snap.png new file mode 100644 index 00000000000..20d9c64a3ee Binary files /dev/null and b/packages/dnb-eufemia/src/components/number-format/__tests__/__image_snapshots__/numberformat-have-to-match-phone.snap.png differ diff --git a/packages/dnb-eufemia/src/components/number-format/__tests__/__image_snapshots__/numberformat-have-to-match-spacing-system-usage.snap.png b/packages/dnb-eufemia/src/components/number-format/__tests__/__image_snapshots__/numberformat-have-to-match-spacing-system-usage.snap.png new file mode 100644 index 00000000000..b507e5c44e1 Binary files /dev/null and b/packages/dnb-eufemia/src/components/number-format/__tests__/__image_snapshots__/numberformat-have-to-match-spacing-system-usage.snap.png differ diff --git a/packages/dnb-eufemia/src/components/number-format/__tests__/__image_snapshots__/numberformat-with-skeleton-have-to-match-currency.snap.png b/packages/dnb-eufemia/src/components/number-format/__tests__/__image_snapshots__/numberformat-with-skeleton-have-to-match-currency.snap.png new file mode 100644 index 00000000000..3581773f6e2 Binary files /dev/null and b/packages/dnb-eufemia/src/components/number-format/__tests__/__image_snapshots__/numberformat-with-skeleton-have-to-match-currency.snap.png differ diff --git a/packages/dnb-eufemia/src/components/number-format/__tests__/__image_snapshots__/numberformat-with-skeleton-have-to-match-default-numbers.snap.png b/packages/dnb-eufemia/src/components/number-format/__tests__/__image_snapshots__/numberformat-with-skeleton-have-to-match-default-numbers.snap.png new file mode 100644 index 00000000000..1d310167e8b Binary files /dev/null and b/packages/dnb-eufemia/src/components/number-format/__tests__/__image_snapshots__/numberformat-with-skeleton-have-to-match-default-numbers.snap.png differ diff --git a/packages/dnb-eufemia/src/components/number-format/__tests__/__image_snapshots__/numberformat-with-skeleton-have-to-match-phone.snap.png b/packages/dnb-eufemia/src/components/number-format/__tests__/__image_snapshots__/numberformat-with-skeleton-have-to-match-phone.snap.png new file mode 100644 index 00000000000..7cf7e699b33 Binary files /dev/null and b/packages/dnb-eufemia/src/components/number-format/__tests__/__image_snapshots__/numberformat-with-skeleton-have-to-match-phone.snap.png differ diff --git a/packages/dnb-eufemia/src/components/number-format/__tests__/__snapshots__/number-format-screenshot-test-js-number-format-screenshot-have-to-match-ban-1-7a498.snap.png b/packages/dnb-eufemia/src/components/number-format/__tests__/__snapshots__/number-format-screenshot-test-js-number-format-screenshot-have-to-match-ban-1-7a498.snap.png deleted file mode 100644 index d8e1006be1f..00000000000 Binary files a/packages/dnb-eufemia/src/components/number-format/__tests__/__snapshots__/number-format-screenshot-test-js-number-format-screenshot-have-to-match-ban-1-7a498.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/number-format/__tests__/__snapshots__/number-format-screenshot-test-js-number-format-screenshot-have-to-match-compact-numbers-1-3d1d9.snap.png b/packages/dnb-eufemia/src/components/number-format/__tests__/__snapshots__/number-format-screenshot-test-js-number-format-screenshot-have-to-match-compact-numbers-1-3d1d9.snap.png deleted file mode 100644 index 6f8616076dd..00000000000 Binary files a/packages/dnb-eufemia/src/components/number-format/__tests__/__snapshots__/number-format-screenshot-test-js-number-format-screenshot-have-to-match-compact-numbers-1-3d1d9.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/number-format/__tests__/__snapshots__/number-format-screenshot-test-js-number-format-screenshot-have-to-match-currency-1-e3541.snap.png b/packages/dnb-eufemia/src/components/number-format/__tests__/__snapshots__/number-format-screenshot-test-js-number-format-screenshot-have-to-match-currency-1-e3541.snap.png deleted file mode 100644 index f0af718f5c3..00000000000 Binary files a/packages/dnb-eufemia/src/components/number-format/__tests__/__snapshots__/number-format-screenshot-test-js-number-format-screenshot-have-to-match-currency-1-e3541.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/number-format/__tests__/__snapshots__/number-format-screenshot-test-js-number-format-screenshot-have-to-match-default-numbers-1-e5e69.snap.png b/packages/dnb-eufemia/src/components/number-format/__tests__/__snapshots__/number-format-screenshot-test-js-number-format-screenshot-have-to-match-default-numbers-1-e5e69.snap.png deleted file mode 100644 index d715ab7d0ca..00000000000 Binary files a/packages/dnb-eufemia/src/components/number-format/__tests__/__snapshots__/number-format-screenshot-test-js-number-format-screenshot-have-to-match-default-numbers-1-e5e69.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/number-format/__tests__/__snapshots__/number-format-screenshot-test-js-number-format-screenshot-have-to-match-nin-1-8d86b.snap.png b/packages/dnb-eufemia/src/components/number-format/__tests__/__snapshots__/number-format-screenshot-test-js-number-format-screenshot-have-to-match-nin-1-8d86b.snap.png deleted file mode 100644 index a774455ec69..00000000000 Binary files a/packages/dnb-eufemia/src/components/number-format/__tests__/__snapshots__/number-format-screenshot-test-js-number-format-screenshot-have-to-match-nin-1-8d86b.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/number-format/__tests__/__snapshots__/number-format-screenshot-test-js-number-format-screenshot-have-to-match-numbers-in-different-locales-1-4cc52.snap.png b/packages/dnb-eufemia/src/components/number-format/__tests__/__snapshots__/number-format-screenshot-test-js-number-format-screenshot-have-to-match-numbers-in-different-locales-1-4cc52.snap.png deleted file mode 100644 index cea0776cd0b..00000000000 Binary files a/packages/dnb-eufemia/src/components/number-format/__tests__/__snapshots__/number-format-screenshot-test-js-number-format-screenshot-have-to-match-numbers-in-different-locales-1-4cc52.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/number-format/__tests__/__snapshots__/number-format-screenshot-test-js-number-format-screenshot-have-to-match-org-1-27f9d.snap.png b/packages/dnb-eufemia/src/components/number-format/__tests__/__snapshots__/number-format-screenshot-test-js-number-format-screenshot-have-to-match-org-1-27f9d.snap.png deleted file mode 100644 index b3012fa28fd..00000000000 Binary files a/packages/dnb-eufemia/src/components/number-format/__tests__/__snapshots__/number-format-screenshot-test-js-number-format-screenshot-have-to-match-org-1-27f9d.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/number-format/__tests__/__snapshots__/number-format-screenshot-test-js-number-format-screenshot-have-to-match-percent-numbers-1-6db61.snap.png b/packages/dnb-eufemia/src/components/number-format/__tests__/__snapshots__/number-format-screenshot-test-js-number-format-screenshot-have-to-match-percent-numbers-1-6db61.snap.png deleted file mode 100644 index 6497f42d8d1..00000000000 Binary files a/packages/dnb-eufemia/src/components/number-format/__tests__/__snapshots__/number-format-screenshot-test-js-number-format-screenshot-have-to-match-percent-numbers-1-6db61.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/number-format/__tests__/__snapshots__/number-format-screenshot-test-js-number-format-screenshot-have-to-match-phone-1-62a74.snap.png b/packages/dnb-eufemia/src/components/number-format/__tests__/__snapshots__/number-format-screenshot-test-js-number-format-screenshot-have-to-match-phone-1-62a74.snap.png deleted file mode 100644 index 03204dd66c2..00000000000 Binary files a/packages/dnb-eufemia/src/components/number-format/__tests__/__snapshots__/number-format-screenshot-test-js-number-format-screenshot-have-to-match-phone-1-62a74.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/number-format/__tests__/__snapshots__/number-format-screenshot-test-js-number-format-screenshot-have-to-match-spacing-system-usage-1-cc4c0.snap.png b/packages/dnb-eufemia/src/components/number-format/__tests__/__snapshots__/number-format-screenshot-test-js-number-format-screenshot-have-to-match-spacing-system-usage-1-cc4c0.snap.png deleted file mode 100644 index ab9ff30ebec..00000000000 Binary files a/packages/dnb-eufemia/src/components/number-format/__tests__/__snapshots__/number-format-screenshot-test-js-number-format-screenshot-have-to-match-spacing-system-usage-1-cc4c0.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/number-format/__tests__/__snapshots__/number-format-screenshot-test-js-number-format-with-skeleton-screenshot-have-to-match-currency-1-bd2ef.snap.png b/packages/dnb-eufemia/src/components/number-format/__tests__/__snapshots__/number-format-screenshot-test-js-number-format-with-skeleton-screenshot-have-to-match-currency-1-bd2ef.snap.png deleted file mode 100644 index 8462bef43df..00000000000 Binary files a/packages/dnb-eufemia/src/components/number-format/__tests__/__snapshots__/number-format-screenshot-test-js-number-format-with-skeleton-screenshot-have-to-match-currency-1-bd2ef.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/number-format/__tests__/__snapshots__/number-format-screenshot-test-js-number-format-with-skeleton-screenshot-have-to-match-default-numbers-1-e7795.snap.png b/packages/dnb-eufemia/src/components/number-format/__tests__/__snapshots__/number-format-screenshot-test-js-number-format-with-skeleton-screenshot-have-to-match-default-numbers-1-e7795.snap.png deleted file mode 100644 index a33b2217209..00000000000 Binary files a/packages/dnb-eufemia/src/components/number-format/__tests__/__snapshots__/number-format-screenshot-test-js-number-format-with-skeleton-screenshot-have-to-match-default-numbers-1-e7795.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/number-format/__tests__/__snapshots__/number-format-screenshot-test-js-number-format-with-skeleton-screenshot-have-to-match-phone-1-cb84c.snap.png b/packages/dnb-eufemia/src/components/number-format/__tests__/__snapshots__/number-format-screenshot-test-js-number-format-with-skeleton-screenshot-have-to-match-phone-1-cb84c.snap.png deleted file mode 100644 index 365b01a6b65..00000000000 Binary files a/packages/dnb-eufemia/src/components/number-format/__tests__/__snapshots__/number-format-screenshot-test-js-number-format-with-skeleton-screenshot-have-to-match-phone-1-cb84c.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/pagination/__tests__/Pagination.screenshot.test.js b/packages/dnb-eufemia/src/components/pagination/__tests__/Pagination.screenshot.test.js deleted file mode 100644 index c109c12d2eb..00000000000 --- a/packages/dnb-eufemia/src/components/pagination/__tests__/Pagination.screenshot.test.js +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Screenshot Test - * - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -describe('Pagination screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/pagination/demos', - }) - - it('have to match the default pagination bar', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="pagination-default"]', - style: { - width: '50rem', - }, - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match pagination bar at page one', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="pagination-default"]', - style: { - width: '50rem', - }, - simulateSelector: - '[data-visual-test="pagination-default"] div.dnb-pagination__bar__inner button.dnb-pagination__button:first-of-type', - simulate: 'click', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match pagination bar at last page', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="pagination-default"]', - style: { - width: '50rem', - }, - simulateSelector: - '[data-visual-test="pagination-default"] div.dnb-pagination__bar__inner button.dnb-pagination__button:last-of-type', - simulate: 'click', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Pagination screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/pagination/demos', - pageViewport: { - width: 500, - height: 600, - }, - }) - - it('have to match the default pagination bar in small viewport', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="pagination-default"]', - style: { - width: '30rem', - }, - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/components/pagination/__tests__/Pagination.screenshot.test.ts b/packages/dnb-eufemia/src/components/pagination/__tests__/Pagination.screenshot.test.ts new file mode 100644 index 00000000000..341acaa72a0 --- /dev/null +++ b/packages/dnb-eufemia/src/components/pagination/__tests__/Pagination.screenshot.test.ts @@ -0,0 +1,66 @@ +/** + * Screenshot Test + * + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../../core/jest/jestSetupScreenshots' + +describe('Pagination', () => { + setupPageScreenshot({ + url: '/uilib/components/pagination/demos', + }) + + it('have to match the default pagination bar', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="pagination-default"]', + style: { + width: '50rem', + }, + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match pagination bar at page one', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="pagination-default"]', + style: { + width: '50rem', + }, + simulateSelector: + '[data-visual-test="pagination-default"] div.dnb-pagination__bar__inner button.dnb-pagination__button:first-of-type', + simulate: 'click', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match pagination bar at last page', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="pagination-default"]', + style: { + width: '50rem', + }, + simulateSelector: + '[data-visual-test="pagination-default"] div.dnb-pagination__bar__inner button.dnb-pagination__button:last-of-type', + simulate: 'click', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the default pagination bar in small viewport', async () => { + const screenshot = await makeScreenshot({ + url: '/uilib/components/pagination/demos', + pageViewport: { + width: 500, + height: 600, + }, + selector: '[data-visual-test="pagination-default"]', + style: { + width: '30rem', + }, + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/components/pagination/__tests__/__image_snapshots__/pagination-have-to-match-pagination-bar-at-last-page.snap.png b/packages/dnb-eufemia/src/components/pagination/__tests__/__image_snapshots__/pagination-have-to-match-pagination-bar-at-last-page.snap.png new file mode 100644 index 00000000000..520b0490b7d Binary files /dev/null and b/packages/dnb-eufemia/src/components/pagination/__tests__/__image_snapshots__/pagination-have-to-match-pagination-bar-at-last-page.snap.png differ diff --git a/packages/dnb-eufemia/src/components/pagination/__tests__/__image_snapshots__/pagination-have-to-match-pagination-bar-at-page-one.snap.png b/packages/dnb-eufemia/src/components/pagination/__tests__/__image_snapshots__/pagination-have-to-match-pagination-bar-at-page-one.snap.png new file mode 100644 index 00000000000..5566fa0450a Binary files /dev/null and b/packages/dnb-eufemia/src/components/pagination/__tests__/__image_snapshots__/pagination-have-to-match-pagination-bar-at-page-one.snap.png differ diff --git a/packages/dnb-eufemia/src/components/pagination/__tests__/__image_snapshots__/pagination-have-to-match-the-default-pagination-bar-in-small-viewport.snap.png b/packages/dnb-eufemia/src/components/pagination/__tests__/__image_snapshots__/pagination-have-to-match-the-default-pagination-bar-in-small-viewport.snap.png new file mode 100644 index 00000000000..835482035e6 Binary files /dev/null and b/packages/dnb-eufemia/src/components/pagination/__tests__/__image_snapshots__/pagination-have-to-match-the-default-pagination-bar-in-small-viewport.snap.png differ diff --git a/packages/dnb-eufemia/src/components/pagination/__tests__/__image_snapshots__/pagination-have-to-match-the-default-pagination-bar.snap.png b/packages/dnb-eufemia/src/components/pagination/__tests__/__image_snapshots__/pagination-have-to-match-the-default-pagination-bar.snap.png new file mode 100644 index 00000000000..ea882e6ef57 Binary files /dev/null and b/packages/dnb-eufemia/src/components/pagination/__tests__/__image_snapshots__/pagination-have-to-match-the-default-pagination-bar.snap.png differ diff --git a/packages/dnb-eufemia/src/components/pagination/__tests__/__snapshots__/Pagination.test.js.snap b/packages/dnb-eufemia/src/components/pagination/__tests__/__snapshots__/Pagination.test.js.snap index 5157cb4d16f..5ce2f0016c1 100644 --- a/packages/dnb-eufemia/src/components/pagination/__tests__/__snapshots__/Pagination.test.js.snap +++ b/packages/dnb-eufemia/src/components/pagination/__tests__/__snapshots__/Pagination.test.js.snap @@ -2291,6 +2291,18 @@ button.dnb-button::-moz-focus-inner { width: auto; animation: progress-indicator-linear-bar-2 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite; } +html[data-visual-test] .dnb-progress-indicator__linear__bar1-animation { + left: -35%; + right: 100%; + animation-duration: 0ms; + animation-iteration-count: 0; +} +html[data-visual-test] .dnb-progress-indicator__linear__bar2-animation { + left: -200%; + right: 100%; + animation-duration: 0ms; + animation-iteration-count: 0; +} .dnb-progress-indicator, .dnb-progress-indicator--visible { opacity: 0; animation: progress-indicator-fade-in 200ms ease-out 1 forwards; @@ -2298,12 +2310,12 @@ button.dnb-button::-moz-focus-inner { .dnb-progress-indicator--complete:not(.dnb-progress-indicator--visible) { animation: progress-indicator-fade-out 600ms ease-out 1 forwards; } -.dnb-progress-indicator--no-animation { +html[data-visual-test] .dnb-progress-indicator { + opacity: 1; animation-duration: 0ms; } -html[data-visual-test] .dnb-progress-indicator__circular__line { +.dnb-progress-indicator--no-animation { animation-duration: 0ms; - animation-iteration-count: 0; } html[data-visual-test] .dnb-progress-indicator__bar-transition { transition: none; diff --git a/packages/dnb-eufemia/src/components/pagination/__tests__/__snapshots__/pagination-screenshot-test-js-pagination-screenshot-have-to-match-pagination-bar-at-last-page-1-49835.snap.png b/packages/dnb-eufemia/src/components/pagination/__tests__/__snapshots__/pagination-screenshot-test-js-pagination-screenshot-have-to-match-pagination-bar-at-last-page-1-49835.snap.png deleted file mode 100644 index 031f016aaa4..00000000000 Binary files a/packages/dnb-eufemia/src/components/pagination/__tests__/__snapshots__/pagination-screenshot-test-js-pagination-screenshot-have-to-match-pagination-bar-at-last-page-1-49835.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/pagination/__tests__/__snapshots__/pagination-screenshot-test-js-pagination-screenshot-have-to-match-pagination-bar-at-page-one-1-c828a.snap.png b/packages/dnb-eufemia/src/components/pagination/__tests__/__snapshots__/pagination-screenshot-test-js-pagination-screenshot-have-to-match-pagination-bar-at-page-one-1-c828a.snap.png deleted file mode 100644 index 05740cd1d50..00000000000 Binary files a/packages/dnb-eufemia/src/components/pagination/__tests__/__snapshots__/pagination-screenshot-test-js-pagination-screenshot-have-to-match-pagination-bar-at-page-one-1-c828a.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/pagination/__tests__/__snapshots__/pagination-screenshot-test-js-pagination-screenshot-have-to-match-the-default-pagination-bar-1-3f83a.snap.png b/packages/dnb-eufemia/src/components/pagination/__tests__/__snapshots__/pagination-screenshot-test-js-pagination-screenshot-have-to-match-the-default-pagination-bar-1-3f83a.snap.png deleted file mode 100644 index 81215209af1..00000000000 Binary files a/packages/dnb-eufemia/src/components/pagination/__tests__/__snapshots__/pagination-screenshot-test-js-pagination-screenshot-have-to-match-the-default-pagination-bar-1-3f83a.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/pagination/__tests__/__snapshots__/pagination-screenshot-test-js-pagination-screenshot-have-to-match-the-default-pagination-bar-in-small-viewport-1-18a95.snap.png b/packages/dnb-eufemia/src/components/pagination/__tests__/__snapshots__/pagination-screenshot-test-js-pagination-screenshot-have-to-match-the-default-pagination-bar-in-small-viewport-1-18a95.snap.png deleted file mode 100644 index 37845b3a3bc..00000000000 Binary files a/packages/dnb-eufemia/src/components/pagination/__tests__/__snapshots__/pagination-screenshot-test-js-pagination-screenshot-have-to-match-the-default-pagination-bar-in-small-viewport-1-18a95.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/progress-indicator/__tests__/ProgressIndicator.screenshot.test.js b/packages/dnb-eufemia/src/components/progress-indicator/__tests__/ProgressIndicator.screenshot.test.js deleted file mode 100644 index 9981d2a0d18..00000000000 --- a/packages/dnb-eufemia/src/components/progress-indicator/__tests__/ProgressIndicator.screenshot.test.js +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -describe('ProgressIndicator screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/progress-indicator/demos', - }) - - it('have to match the static primary circular with 50 percentage', async () => { - const screenshot = await testPageScreenshot({ - selector: - '[data-visual-test="progress-indicator-circular--primary"] .dnb-progress-indicator', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the static primary linear with 50 percentage', async () => { - const screenshot = await testPageScreenshot({ - style: { - width: '20rem', - }, - selector: - '[data-visual-test="progress-indicator-linear--primary"] .dnb-progress-indicator', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('ProgressIndicator circular screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/progress-indicator/visual-tests', - }) - - it('have to match static primary circular sizes', async () => { - const screenshot = await testPageScreenshot({ - style: { - height: '3.5rem', - width: '8rem', - }, - // addWrapper: false, - selector: '[data-visual-test="progress-indicator-sizes"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/components/progress-indicator/__tests__/ProgressIndicator.screenshot.test.ts b/packages/dnb-eufemia/src/components/progress-indicator/__tests__/ProgressIndicator.screenshot.test.ts new file mode 100644 index 00000000000..b48e233bb60 --- /dev/null +++ b/packages/dnb-eufemia/src/components/progress-indicator/__tests__/ProgressIndicator.screenshot.test.ts @@ -0,0 +1,51 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../../core/jest/jestSetupScreenshots' + +describe('ProgressIndicator', () => { + setupPageScreenshot({ + url: '/uilib/components/progress-indicator/demos', + }) + + it('have to match the static primary circular with 50 percentage', async () => { + const screenshot = await makeScreenshot({ + selector: + '[data-visual-test="progress-indicator-circular--primary"] .dnb-progress-indicator', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the static primary linear with 50 percentage', async () => { + const screenshot = await makeScreenshot({ + style: { + width: '20rem', + }, + selector: + '[data-visual-test="progress-indicator-linear--primary"] .dnb-progress-indicator', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) + +describe('ProgressIndicator circular', () => { + setupPageScreenshot({ + url: '/uilib/components/progress-indicator/visual-tests', + }) + + it('have to match static primary circular sizes', async () => { + const screenshot = await makeScreenshot({ + style: { + height: '3.5rem', + width: '8rem', + }, + selector: '[data-visual-test="progress-indicator-sizes"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/components/progress-indicator/__tests__/__image_snapshots__/progressindicator-circular-have-to-match-static-primary-circular-sizes.snap.png b/packages/dnb-eufemia/src/components/progress-indicator/__tests__/__image_snapshots__/progressindicator-circular-have-to-match-static-primary-circular-sizes.snap.png new file mode 100644 index 00000000000..85a0f9dce9d Binary files /dev/null and b/packages/dnb-eufemia/src/components/progress-indicator/__tests__/__image_snapshots__/progressindicator-circular-have-to-match-static-primary-circular-sizes.snap.png differ diff --git a/packages/dnb-eufemia/src/components/progress-indicator/__tests__/__image_snapshots__/progressindicator-have-to-match-the-static-primary-circular-with-50-percentage.snap.png b/packages/dnb-eufemia/src/components/progress-indicator/__tests__/__image_snapshots__/progressindicator-have-to-match-the-static-primary-circular-with-50-percentage.snap.png new file mode 100644 index 00000000000..ed89edd8faa Binary files /dev/null and b/packages/dnb-eufemia/src/components/progress-indicator/__tests__/__image_snapshots__/progressindicator-have-to-match-the-static-primary-circular-with-50-percentage.snap.png differ diff --git a/packages/dnb-eufemia/src/components/progress-indicator/__tests__/__image_snapshots__/progressindicator-have-to-match-the-static-primary-linear-with-50-percentage.snap.png b/packages/dnb-eufemia/src/components/progress-indicator/__tests__/__image_snapshots__/progressindicator-have-to-match-the-static-primary-linear-with-50-percentage.snap.png new file mode 100644 index 00000000000..93a038c784f Binary files /dev/null and b/packages/dnb-eufemia/src/components/progress-indicator/__tests__/__image_snapshots__/progressindicator-have-to-match-the-static-primary-linear-with-50-percentage.snap.png differ diff --git a/packages/dnb-eufemia/src/components/progress-indicator/__tests__/__snapshots__/ProgressIndicator.test.js.snap b/packages/dnb-eufemia/src/components/progress-indicator/__tests__/__snapshots__/ProgressIndicator.test.js.snap index 105cbb59609..942ac301db3 100644 --- a/packages/dnb-eufemia/src/components/progress-indicator/__tests__/__snapshots__/ProgressIndicator.test.js.snap +++ b/packages/dnb-eufemia/src/components/progress-indicator/__tests__/__snapshots__/ProgressIndicator.test.js.snap @@ -380,6 +380,18 @@ exports[`ProgressIndicator scss have to match snapshot 1`] = ` width: auto; animation: progress-indicator-linear-bar-2 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite; } +html[data-visual-test] .dnb-progress-indicator__linear__bar1-animation { + left: -35%; + right: 100%; + animation-duration: 0ms; + animation-iteration-count: 0; +} +html[data-visual-test] .dnb-progress-indicator__linear__bar2-animation { + left: -200%; + right: 100%; + animation-duration: 0ms; + animation-iteration-count: 0; +} .dnb-progress-indicator, .dnb-progress-indicator--visible { opacity: 0; animation: progress-indicator-fade-in 200ms ease-out 1 forwards; @@ -387,12 +399,12 @@ exports[`ProgressIndicator scss have to match snapshot 1`] = ` .dnb-progress-indicator--complete:not(.dnb-progress-indicator--visible) { animation: progress-indicator-fade-out 600ms ease-out 1 forwards; } -.dnb-progress-indicator--no-animation { +html[data-visual-test] .dnb-progress-indicator { + opacity: 1; animation-duration: 0ms; } -html[data-visual-test] .dnb-progress-indicator__circular__line { +.dnb-progress-indicator--no-animation { animation-duration: 0ms; - animation-iteration-count: 0; } html[data-visual-test] .dnb-progress-indicator__bar-transition { transition: none; diff --git a/packages/dnb-eufemia/src/components/progress-indicator/__tests__/__snapshots__/progress-indicator-screenshot-test-js-progress-indicator-circular-screenshot-have-to-match-static-primary-circular-sizes-1-3de5e.snap.png b/packages/dnb-eufemia/src/components/progress-indicator/__tests__/__snapshots__/progress-indicator-screenshot-test-js-progress-indicator-circular-screenshot-have-to-match-static-primary-circular-sizes-1-3de5e.snap.png deleted file mode 100644 index a76fd1ce3ce..00000000000 Binary files a/packages/dnb-eufemia/src/components/progress-indicator/__tests__/__snapshots__/progress-indicator-screenshot-test-js-progress-indicator-circular-screenshot-have-to-match-static-primary-circular-sizes-1-3de5e.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/progress-indicator/__tests__/__snapshots__/progress-indicator-screenshot-test-js-progress-indicator-screenshot-have-to-match-the-static-primary-circular-with-50-percentage-1-3b00e.snap.png b/packages/dnb-eufemia/src/components/progress-indicator/__tests__/__snapshots__/progress-indicator-screenshot-test-js-progress-indicator-screenshot-have-to-match-the-static-primary-circular-with-50-percentage-1-3b00e.snap.png deleted file mode 100644 index 058b4875ff2..00000000000 Binary files a/packages/dnb-eufemia/src/components/progress-indicator/__tests__/__snapshots__/progress-indicator-screenshot-test-js-progress-indicator-screenshot-have-to-match-the-static-primary-circular-with-50-percentage-1-3b00e.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/progress-indicator/__tests__/__snapshots__/progress-indicator-screenshot-test-js-progress-indicator-screenshot-have-to-match-the-static-primary-linear-with-50-percentage-1-e5b7d.snap.png b/packages/dnb-eufemia/src/components/progress-indicator/__tests__/__snapshots__/progress-indicator-screenshot-test-js-progress-indicator-screenshot-have-to-match-the-static-primary-linear-with-50-percentage-1-e5b7d.snap.png deleted file mode 100644 index dabfbcf0e8c..00000000000 Binary files a/packages/dnb-eufemia/src/components/progress-indicator/__tests__/__snapshots__/progress-indicator-screenshot-test-js-progress-indicator-screenshot-have-to-match-the-static-primary-linear-with-50-percentage-1-e5b7d.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/progress-indicator/style/dnb-progress-indicator.scss b/packages/dnb-eufemia/src/components/progress-indicator/style/dnb-progress-indicator.scss index a452cdcf8be..e18f671e2e2 100644 --- a/packages/dnb-eufemia/src/components/progress-indicator/style/dnb-progress-indicator.scss +++ b/packages/dnb-eufemia/src/components/progress-indicator/style/dnb-progress-indicator.scss @@ -142,6 +142,19 @@ animation: progress-indicator-linear-bar-2 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite; } + + html[data-visual-test] &__bar1-animation { + left: -35%; + right: 100%; + animation-duration: 0ms; + animation-iteration-count: 0; + } + html[data-visual-test] &__bar2-animation { + left: -200%; + right: 100%; + animation-duration: 0ms; + animation-iteration-count: 0; + } } &, @@ -152,14 +165,14 @@ &--complete:not(#{&}--visible) { animation: progress-indicator-fade-out 600ms ease-out 1 forwards; } - &--no-animation { + html[data-visual-test] & { + opacity: 1; animation-duration: 0ms; } - - html[data-visual-test] &__circular__line { + &--no-animation { animation-duration: 0ms; - animation-iteration-count: 0; } + html[data-visual-test] &__bar-transition { transition: none; } diff --git a/packages/dnb-eufemia/src/components/radio/__tests__/Radio.screenshot.test.js b/packages/dnb-eufemia/src/components/radio/__tests__/Radio.screenshot.test.js deleted file mode 100644 index 7fa03ff4fd6..00000000000 --- a/packages/dnb-eufemia/src/components/radio/__tests__/Radio.screenshot.test.js +++ /dev/null @@ -1,125 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -describe('Radio unchecked screenshot', () => { - setupPageScreenshot({ url: '/uilib/components/radio/demos' }) - - it('have to match radio in unchecked state', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="radio-default"] .dnb-radio', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match radio in unchecked state with focus', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="radio-default"] .dnb-radio', - simulateSelector: - '[data-visual-test="radio-default"] .dnb-radio__input', - simulate: 'focus', // should be tested first - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match radio in unchecked state with hover', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="radio-default"] .dnb-radio', - simulateSelector: - '[data-visual-test="radio-default"] .dnb-radio__input', - simulate: 'hover', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -// NB: Because of focus simulation and screenshotElement.press('Tab') -// we have to run the two focus simulations in a separate run each -describe('Radio checked screenshot', () => { - setupPageScreenshot({ url: '/uilib/components/radio/demos' }) - - it('have to match radio in checked state', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="radio-checked"] .dnb-radio', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match radio in checked state with focus', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="radio-checked"] .dnb-radio', - simulateSelector: - '[data-visual-test="radio-checked"] .dnb-radio__input', - simulate: 'focus', // should be tested first - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match radio in checked state with hover', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="radio-checked"] .dnb-radio', - simulateSelector: - '[data-visual-test="radio-checked"] .dnb-radio__input', - simulate: 'hover', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match disabled group', async () => { - const screenshot = await testPageScreenshot({ - selector: - '[data-visual-test="radio-group-disabled"] .dnb-radio-group', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match radio group', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="radio-group"] .dnb-radio-group', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match radio group in vertical layout', async () => { - const screenshot = await testPageScreenshot({ - selector: - '[data-visual-test="radio-group-vertical"] .dnb-radio-group', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match radio group with label above', async () => { - const screenshot = await testPageScreenshot({ - selector: - '[data-visual-test="radio-group-label-above"] .dnb-radio-group', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match radio group with form-status', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="radio-group-status"] .dnb-radio-group', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match radio group plain', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="radio-group-plain"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match radio button in different sizes', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="radio-sizes"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/components/radio/__tests__/Radio.screenshot.test.ts b/packages/dnb-eufemia/src/components/radio/__tests__/Radio.screenshot.test.ts new file mode 100644 index 00000000000..bbeb6117b9d --- /dev/null +++ b/packages/dnb-eufemia/src/components/radio/__tests__/Radio.screenshot.test.ts @@ -0,0 +1,128 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../../core/jest/jestSetupScreenshots' + +describe('Radio', () => { + describe('unchecked', () => { + setupPageScreenshot({ url: '/uilib/components/radio/demos' }) + + it('have to match radio in unchecked state', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="radio-default"] .dnb-radio', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match radio in unchecked state with focus', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="radio-default"] .dnb-radio', + simulateSelector: + '[data-visual-test="radio-default"] .dnb-radio__input', + simulate: 'focus', // should be tested first + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match radio in unchecked state with hover', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="radio-default"] .dnb-radio', + simulateSelector: + '[data-visual-test="radio-default"] .dnb-radio__input', + simulate: 'hover', + }) + expect(screenshot).toMatchImageSnapshot() + }) + }) + + // NB: Because of focus simulation and screenshotElement.press('Tab') + // we have to run the two focus simulations in a separate run each + describe('checked', () => { + setupPageScreenshot({ url: '/uilib/components/radio/demos' }) + + it('have to match radio in checked state', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="radio-checked"] .dnb-radio', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match radio in checked state with focus', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="radio-checked"] .dnb-radio', + simulateSelector: + '[data-visual-test="radio-checked"] .dnb-radio__input', + simulate: 'focus', // should be tested first + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match radio in checked state with hover', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="radio-checked"] .dnb-radio', + simulateSelector: + '[data-visual-test="radio-checked"] .dnb-radio__input', + simulate: 'hover', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match disabled group', async () => { + const screenshot = await makeScreenshot({ + selector: + '[data-visual-test="radio-group-disabled"] .dnb-radio-group', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match radio group', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="radio-group"] .dnb-radio-group', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match radio group in vertical layout', async () => { + const screenshot = await makeScreenshot({ + selector: + '[data-visual-test="radio-group-vertical"] .dnb-radio-group', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match radio group with label above', async () => { + const screenshot = await makeScreenshot({ + selector: + '[data-visual-test="radio-group-label-above"] .dnb-radio-group', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match radio group with form-status', async () => { + const screenshot = await makeScreenshot({ + selector: + '[data-visual-test="radio-group-status"] .dnb-radio-group', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match radio group plain', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="radio-group-plain"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match radio button in different sizes', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="radio-sizes"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + }) +}) diff --git a/packages/dnb-eufemia/src/components/radio/__tests__/__image_snapshots__/radio-checked-have-to-match-disabled-group.snap.png b/packages/dnb-eufemia/src/components/radio/__tests__/__image_snapshots__/radio-checked-have-to-match-disabled-group.snap.png new file mode 100644 index 00000000000..8438dceb692 Binary files /dev/null and b/packages/dnb-eufemia/src/components/radio/__tests__/__image_snapshots__/radio-checked-have-to-match-disabled-group.snap.png differ diff --git a/packages/dnb-eufemia/src/components/radio/__tests__/__image_snapshots__/radio-checked-have-to-match-radio-button-in-different-sizes.snap.png b/packages/dnb-eufemia/src/components/radio/__tests__/__image_snapshots__/radio-checked-have-to-match-radio-button-in-different-sizes.snap.png new file mode 100644 index 00000000000..d8069a439b2 Binary files /dev/null and b/packages/dnb-eufemia/src/components/radio/__tests__/__image_snapshots__/radio-checked-have-to-match-radio-button-in-different-sizes.snap.png differ diff --git a/packages/dnb-eufemia/src/components/radio/__tests__/__image_snapshots__/radio-checked-have-to-match-radio-group-in-vertical-layout.snap.png b/packages/dnb-eufemia/src/components/radio/__tests__/__image_snapshots__/radio-checked-have-to-match-radio-group-in-vertical-layout.snap.png new file mode 100644 index 00000000000..92d60c75d48 Binary files /dev/null and b/packages/dnb-eufemia/src/components/radio/__tests__/__image_snapshots__/radio-checked-have-to-match-radio-group-in-vertical-layout.snap.png differ diff --git a/packages/dnb-eufemia/src/components/radio/__tests__/__image_snapshots__/radio-checked-have-to-match-radio-group-plain.snap.png b/packages/dnb-eufemia/src/components/radio/__tests__/__image_snapshots__/radio-checked-have-to-match-radio-group-plain.snap.png new file mode 100644 index 00000000000..30c3066de13 Binary files /dev/null and b/packages/dnb-eufemia/src/components/radio/__tests__/__image_snapshots__/radio-checked-have-to-match-radio-group-plain.snap.png differ diff --git a/packages/dnb-eufemia/src/components/radio/__tests__/__image_snapshots__/radio-checked-have-to-match-radio-group-with-form-status.snap.png b/packages/dnb-eufemia/src/components/radio/__tests__/__image_snapshots__/radio-checked-have-to-match-radio-group-with-form-status.snap.png new file mode 100644 index 00000000000..acfea4a6c5f Binary files /dev/null and b/packages/dnb-eufemia/src/components/radio/__tests__/__image_snapshots__/radio-checked-have-to-match-radio-group-with-form-status.snap.png differ diff --git a/packages/dnb-eufemia/src/components/radio/__tests__/__image_snapshots__/radio-checked-have-to-match-radio-group-with-label-above.snap.png b/packages/dnb-eufemia/src/components/radio/__tests__/__image_snapshots__/radio-checked-have-to-match-radio-group-with-label-above.snap.png new file mode 100644 index 00000000000..c0a794161d0 Binary files /dev/null and b/packages/dnb-eufemia/src/components/radio/__tests__/__image_snapshots__/radio-checked-have-to-match-radio-group-with-label-above.snap.png differ diff --git a/packages/dnb-eufemia/src/components/radio/__tests__/__image_snapshots__/radio-checked-have-to-match-radio-group.snap.png b/packages/dnb-eufemia/src/components/radio/__tests__/__image_snapshots__/radio-checked-have-to-match-radio-group.snap.png new file mode 100644 index 00000000000..c71e2ce5f61 Binary files /dev/null and b/packages/dnb-eufemia/src/components/radio/__tests__/__image_snapshots__/radio-checked-have-to-match-radio-group.snap.png differ diff --git a/packages/dnb-eufemia/src/components/radio/__tests__/__image_snapshots__/radio-checked-have-to-match-radio-in-checked-state-with-focus.snap.png b/packages/dnb-eufemia/src/components/radio/__tests__/__image_snapshots__/radio-checked-have-to-match-radio-in-checked-state-with-focus.snap.png new file mode 100644 index 00000000000..ee61fa43958 Binary files /dev/null and b/packages/dnb-eufemia/src/components/radio/__tests__/__image_snapshots__/radio-checked-have-to-match-radio-in-checked-state-with-focus.snap.png differ diff --git a/packages/dnb-eufemia/src/components/radio/__tests__/__image_snapshots__/radio-checked-have-to-match-radio-in-checked-state-with-hover.snap.png b/packages/dnb-eufemia/src/components/radio/__tests__/__image_snapshots__/radio-checked-have-to-match-radio-in-checked-state-with-hover.snap.png new file mode 100644 index 00000000000..9ca2e406fb5 Binary files /dev/null and b/packages/dnb-eufemia/src/components/radio/__tests__/__image_snapshots__/radio-checked-have-to-match-radio-in-checked-state-with-hover.snap.png differ diff --git a/packages/dnb-eufemia/src/components/radio/__tests__/__image_snapshots__/radio-checked-have-to-match-radio-in-checked-state.snap.png b/packages/dnb-eufemia/src/components/radio/__tests__/__image_snapshots__/radio-checked-have-to-match-radio-in-checked-state.snap.png new file mode 100644 index 00000000000..7fb1977e283 Binary files /dev/null and b/packages/dnb-eufemia/src/components/radio/__tests__/__image_snapshots__/radio-checked-have-to-match-radio-in-checked-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/radio/__tests__/__image_snapshots__/radio-unchecked-have-to-match-radio-in-unchecked-state-with-focus.snap.png b/packages/dnb-eufemia/src/components/radio/__tests__/__image_snapshots__/radio-unchecked-have-to-match-radio-in-unchecked-state-with-focus.snap.png new file mode 100644 index 00000000000..13c74bfac50 Binary files /dev/null and b/packages/dnb-eufemia/src/components/radio/__tests__/__image_snapshots__/radio-unchecked-have-to-match-radio-in-unchecked-state-with-focus.snap.png differ diff --git a/packages/dnb-eufemia/src/components/radio/__tests__/__image_snapshots__/radio-unchecked-have-to-match-radio-in-unchecked-state-with-hover.snap.png b/packages/dnb-eufemia/src/components/radio/__tests__/__image_snapshots__/radio-unchecked-have-to-match-radio-in-unchecked-state-with-hover.snap.png new file mode 100644 index 00000000000..80303e86168 Binary files /dev/null and b/packages/dnb-eufemia/src/components/radio/__tests__/__image_snapshots__/radio-unchecked-have-to-match-radio-in-unchecked-state-with-hover.snap.png differ diff --git a/packages/dnb-eufemia/src/components/radio/__tests__/__image_snapshots__/radio-unchecked-have-to-match-radio-in-unchecked-state.snap.png b/packages/dnb-eufemia/src/components/radio/__tests__/__image_snapshots__/radio-unchecked-have-to-match-radio-in-unchecked-state.snap.png new file mode 100644 index 00000000000..753d6f454a4 Binary files /dev/null and b/packages/dnb-eufemia/src/components/radio/__tests__/__image_snapshots__/radio-unchecked-have-to-match-radio-in-unchecked-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/radio/__tests__/__snapshots__/radio-screenshot-test-js-radio-checked-screenshot-have-to-match-disabled-group-1-43ceb.snap.png b/packages/dnb-eufemia/src/components/radio/__tests__/__snapshots__/radio-screenshot-test-js-radio-checked-screenshot-have-to-match-disabled-group-1-43ceb.snap.png deleted file mode 100644 index 4c378956490..00000000000 Binary files a/packages/dnb-eufemia/src/components/radio/__tests__/__snapshots__/radio-screenshot-test-js-radio-checked-screenshot-have-to-match-disabled-group-1-43ceb.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/radio/__tests__/__snapshots__/radio-screenshot-test-js-radio-checked-screenshot-have-to-match-radio-button-in-different-sizes-1-18c9a.snap.png b/packages/dnb-eufemia/src/components/radio/__tests__/__snapshots__/radio-screenshot-test-js-radio-checked-screenshot-have-to-match-radio-button-in-different-sizes-1-18c9a.snap.png deleted file mode 100644 index f9db442882c..00000000000 Binary files a/packages/dnb-eufemia/src/components/radio/__tests__/__snapshots__/radio-screenshot-test-js-radio-checked-screenshot-have-to-match-radio-button-in-different-sizes-1-18c9a.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/radio/__tests__/__snapshots__/radio-screenshot-test-js-radio-checked-screenshot-have-to-match-radio-group-1-8c2f0.snap.png b/packages/dnb-eufemia/src/components/radio/__tests__/__snapshots__/radio-screenshot-test-js-radio-checked-screenshot-have-to-match-radio-group-1-8c2f0.snap.png deleted file mode 100644 index 03758751223..00000000000 Binary files a/packages/dnb-eufemia/src/components/radio/__tests__/__snapshots__/radio-screenshot-test-js-radio-checked-screenshot-have-to-match-radio-group-1-8c2f0.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/radio/__tests__/__snapshots__/radio-screenshot-test-js-radio-checked-screenshot-have-to-match-radio-group-in-vertical-layout-1-64b99.snap.png b/packages/dnb-eufemia/src/components/radio/__tests__/__snapshots__/radio-screenshot-test-js-radio-checked-screenshot-have-to-match-radio-group-in-vertical-layout-1-64b99.snap.png deleted file mode 100644 index bef56a2d793..00000000000 Binary files a/packages/dnb-eufemia/src/components/radio/__tests__/__snapshots__/radio-screenshot-test-js-radio-checked-screenshot-have-to-match-radio-group-in-vertical-layout-1-64b99.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/radio/__tests__/__snapshots__/radio-screenshot-test-js-radio-checked-screenshot-have-to-match-radio-group-plain-1-62269.snap.png b/packages/dnb-eufemia/src/components/radio/__tests__/__snapshots__/radio-screenshot-test-js-radio-checked-screenshot-have-to-match-radio-group-plain-1-62269.snap.png deleted file mode 100644 index 5259fe19ae6..00000000000 Binary files a/packages/dnb-eufemia/src/components/radio/__tests__/__snapshots__/radio-screenshot-test-js-radio-checked-screenshot-have-to-match-radio-group-plain-1-62269.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/radio/__tests__/__snapshots__/radio-screenshot-test-js-radio-checked-screenshot-have-to-match-radio-group-with-form-status-1-013b7.snap.png b/packages/dnb-eufemia/src/components/radio/__tests__/__snapshots__/radio-screenshot-test-js-radio-checked-screenshot-have-to-match-radio-group-with-form-status-1-013b7.snap.png deleted file mode 100644 index a0c3d6c77c4..00000000000 Binary files a/packages/dnb-eufemia/src/components/radio/__tests__/__snapshots__/radio-screenshot-test-js-radio-checked-screenshot-have-to-match-radio-group-with-form-status-1-013b7.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/radio/__tests__/__snapshots__/radio-screenshot-test-js-radio-checked-screenshot-have-to-match-radio-group-with-label-above-1-9e7a9.snap.png b/packages/dnb-eufemia/src/components/radio/__tests__/__snapshots__/radio-screenshot-test-js-radio-checked-screenshot-have-to-match-radio-group-with-label-above-1-9e7a9.snap.png deleted file mode 100644 index cf7d74aa071..00000000000 Binary files a/packages/dnb-eufemia/src/components/radio/__tests__/__snapshots__/radio-screenshot-test-js-radio-checked-screenshot-have-to-match-radio-group-with-label-above-1-9e7a9.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/radio/__tests__/__snapshots__/radio-screenshot-test-js-radio-checked-screenshot-have-to-match-radio-in-checked-state-1-bf0e9.snap.png b/packages/dnb-eufemia/src/components/radio/__tests__/__snapshots__/radio-screenshot-test-js-radio-checked-screenshot-have-to-match-radio-in-checked-state-1-bf0e9.snap.png deleted file mode 100644 index be9552e4520..00000000000 Binary files a/packages/dnb-eufemia/src/components/radio/__tests__/__snapshots__/radio-screenshot-test-js-radio-checked-screenshot-have-to-match-radio-in-checked-state-1-bf0e9.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/radio/__tests__/__snapshots__/radio-screenshot-test-js-radio-checked-screenshot-have-to-match-radio-in-checked-state-with-focus-1-af91c.snap.png b/packages/dnb-eufemia/src/components/radio/__tests__/__snapshots__/radio-screenshot-test-js-radio-checked-screenshot-have-to-match-radio-in-checked-state-with-focus-1-af91c.snap.png deleted file mode 100644 index 6141753b934..00000000000 Binary files a/packages/dnb-eufemia/src/components/radio/__tests__/__snapshots__/radio-screenshot-test-js-radio-checked-screenshot-have-to-match-radio-in-checked-state-with-focus-1-af91c.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/radio/__tests__/__snapshots__/radio-screenshot-test-js-radio-checked-screenshot-have-to-match-radio-in-checked-state-with-hover-1-2b0ea.snap.png b/packages/dnb-eufemia/src/components/radio/__tests__/__snapshots__/radio-screenshot-test-js-radio-checked-screenshot-have-to-match-radio-in-checked-state-with-hover-1-2b0ea.snap.png deleted file mode 100644 index f840b9dfab3..00000000000 Binary files a/packages/dnb-eufemia/src/components/radio/__tests__/__snapshots__/radio-screenshot-test-js-radio-checked-screenshot-have-to-match-radio-in-checked-state-with-hover-1-2b0ea.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/radio/__tests__/__snapshots__/radio-screenshot-test-js-radio-unchecked-screenshot-have-to-match-radio-in-unchecked-state-1-e96a7.snap.png b/packages/dnb-eufemia/src/components/radio/__tests__/__snapshots__/radio-screenshot-test-js-radio-unchecked-screenshot-have-to-match-radio-in-unchecked-state-1-e96a7.snap.png deleted file mode 100644 index 326e59a671b..00000000000 Binary files a/packages/dnb-eufemia/src/components/radio/__tests__/__snapshots__/radio-screenshot-test-js-radio-unchecked-screenshot-have-to-match-radio-in-unchecked-state-1-e96a7.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/radio/__tests__/__snapshots__/radio-screenshot-test-js-radio-unchecked-screenshot-have-to-match-radio-in-unchecked-state-with-focus-1-6c522.snap.png b/packages/dnb-eufemia/src/components/radio/__tests__/__snapshots__/radio-screenshot-test-js-radio-unchecked-screenshot-have-to-match-radio-in-unchecked-state-with-focus-1-6c522.snap.png deleted file mode 100644 index c9e32b6a4aa..00000000000 Binary files a/packages/dnb-eufemia/src/components/radio/__tests__/__snapshots__/radio-screenshot-test-js-radio-unchecked-screenshot-have-to-match-radio-in-unchecked-state-with-focus-1-6c522.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/radio/__tests__/__snapshots__/radio-screenshot-test-js-radio-unchecked-screenshot-have-to-match-radio-in-unchecked-state-with-hover-1-83c2a.snap.png b/packages/dnb-eufemia/src/components/radio/__tests__/__snapshots__/radio-screenshot-test-js-radio-unchecked-screenshot-have-to-match-radio-in-unchecked-state-with-hover-1-83c2a.snap.png deleted file mode 100644 index 5438d08adf0..00000000000 Binary files a/packages/dnb-eufemia/src/components/radio/__tests__/__snapshots__/radio-screenshot-test-js-radio-unchecked-screenshot-have-to-match-radio-in-unchecked-state-with-hover-1-83c2a.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/section/__tests__/Section.screenshot.test.js b/packages/dnb-eufemia/src/components/section/__tests__/Section.screenshot.test.js deleted file mode 100644 index 43a2dcbe7fe..00000000000 --- a/packages/dnb-eufemia/src/components/section/__tests__/Section.screenshot.test.js +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -describe('Section screenshot', () => { - setupPageScreenshot({ url: '/uilib/components/section/demos' }) - - it('have to match default section', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="section-default"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match white section', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="section-white"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match divider section', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="section-divider"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match mint-green section', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="section-mint-green"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match black-3 section', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="section-black-3"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match sea-green section', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="section-sea-green"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match emerald-green section', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="section-emerald-green"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match lavender section', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="section-lavender"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match sand-yellow section', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="section-sand-yellow"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match pistachio section', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="section-pistachio"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match fire-red section', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="section-fire-red"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match z-index test', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="section-z-index"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/components/section/__tests__/Section.screenshot.test.ts b/packages/dnb-eufemia/src/components/section/__tests__/Section.screenshot.test.ts new file mode 100644 index 00000000000..427798f6fb9 --- /dev/null +++ b/packages/dnb-eufemia/src/components/section/__tests__/Section.screenshot.test.ts @@ -0,0 +1,97 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../../core/jest/jestSetupScreenshots' + +describe('Section', () => { + setupPageScreenshot({ url: '/uilib/components/section/demos' }) + + it('have to match default section', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="section-default"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match white section', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="section-white"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match divider section', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="section-divider"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match mint-green section', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="section-mint-green"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match black-3 section', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="section-black-3"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match sea-green section', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="section-sea-green"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match emerald-green section', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="section-emerald-green"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match lavender section', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="section-lavender"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match sand-yellow section', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="section-sand-yellow"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match pistachio section', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="section-pistachio"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match fire-red section', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="section-fire-red"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match z-index test', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="section-z-index"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/components/section/__tests__/__image_snapshots__/section-have-to-match-black-3-section.snap.png b/packages/dnb-eufemia/src/components/section/__tests__/__image_snapshots__/section-have-to-match-black-3-section.snap.png new file mode 100644 index 00000000000..baa0f413292 Binary files /dev/null and b/packages/dnb-eufemia/src/components/section/__tests__/__image_snapshots__/section-have-to-match-black-3-section.snap.png differ diff --git a/packages/dnb-eufemia/src/components/section/__tests__/__image_snapshots__/section-have-to-match-default-section.snap.png b/packages/dnb-eufemia/src/components/section/__tests__/__image_snapshots__/section-have-to-match-default-section.snap.png new file mode 100644 index 00000000000..aceda60ea79 Binary files /dev/null and b/packages/dnb-eufemia/src/components/section/__tests__/__image_snapshots__/section-have-to-match-default-section.snap.png differ diff --git a/packages/dnb-eufemia/src/components/section/__tests__/__image_snapshots__/section-have-to-match-divider-section.snap.png b/packages/dnb-eufemia/src/components/section/__tests__/__image_snapshots__/section-have-to-match-divider-section.snap.png new file mode 100644 index 00000000000..7241c5a7f60 Binary files /dev/null and b/packages/dnb-eufemia/src/components/section/__tests__/__image_snapshots__/section-have-to-match-divider-section.snap.png differ diff --git a/packages/dnb-eufemia/src/components/section/__tests__/__image_snapshots__/section-have-to-match-emerald-green-section.snap.png b/packages/dnb-eufemia/src/components/section/__tests__/__image_snapshots__/section-have-to-match-emerald-green-section.snap.png new file mode 100644 index 00000000000..bd8c158fcad Binary files /dev/null and b/packages/dnb-eufemia/src/components/section/__tests__/__image_snapshots__/section-have-to-match-emerald-green-section.snap.png differ diff --git a/packages/dnb-eufemia/src/components/section/__tests__/__image_snapshots__/section-have-to-match-fire-red-section.snap.png b/packages/dnb-eufemia/src/components/section/__tests__/__image_snapshots__/section-have-to-match-fire-red-section.snap.png new file mode 100644 index 00000000000..0e61423e54d Binary files /dev/null and b/packages/dnb-eufemia/src/components/section/__tests__/__image_snapshots__/section-have-to-match-fire-red-section.snap.png differ diff --git a/packages/dnb-eufemia/src/components/section/__tests__/__image_snapshots__/section-have-to-match-lavender-section.snap.png b/packages/dnb-eufemia/src/components/section/__tests__/__image_snapshots__/section-have-to-match-lavender-section.snap.png new file mode 100644 index 00000000000..d2e50da6b33 Binary files /dev/null and b/packages/dnb-eufemia/src/components/section/__tests__/__image_snapshots__/section-have-to-match-lavender-section.snap.png differ diff --git a/packages/dnb-eufemia/src/components/section/__tests__/__image_snapshots__/section-have-to-match-mint-green-section.snap.png b/packages/dnb-eufemia/src/components/section/__tests__/__image_snapshots__/section-have-to-match-mint-green-section.snap.png new file mode 100644 index 00000000000..c948e2e462f Binary files /dev/null and b/packages/dnb-eufemia/src/components/section/__tests__/__image_snapshots__/section-have-to-match-mint-green-section.snap.png differ diff --git a/packages/dnb-eufemia/src/components/section/__tests__/__image_snapshots__/section-have-to-match-pistachio-section.snap.png b/packages/dnb-eufemia/src/components/section/__tests__/__image_snapshots__/section-have-to-match-pistachio-section.snap.png new file mode 100644 index 00000000000..de471d0c1ff Binary files /dev/null and b/packages/dnb-eufemia/src/components/section/__tests__/__image_snapshots__/section-have-to-match-pistachio-section.snap.png differ diff --git a/packages/dnb-eufemia/src/components/section/__tests__/__image_snapshots__/section-have-to-match-sand-yellow-section.snap.png b/packages/dnb-eufemia/src/components/section/__tests__/__image_snapshots__/section-have-to-match-sand-yellow-section.snap.png new file mode 100644 index 00000000000..01f8e34a3ad Binary files /dev/null and b/packages/dnb-eufemia/src/components/section/__tests__/__image_snapshots__/section-have-to-match-sand-yellow-section.snap.png differ diff --git a/packages/dnb-eufemia/src/components/section/__tests__/__image_snapshots__/section-have-to-match-sea-green-section.snap.png b/packages/dnb-eufemia/src/components/section/__tests__/__image_snapshots__/section-have-to-match-sea-green-section.snap.png new file mode 100644 index 00000000000..0e9058b7958 Binary files /dev/null and b/packages/dnb-eufemia/src/components/section/__tests__/__image_snapshots__/section-have-to-match-sea-green-section.snap.png differ diff --git a/packages/dnb-eufemia/src/components/section/__tests__/__image_snapshots__/section-have-to-match-white-section.snap.png b/packages/dnb-eufemia/src/components/section/__tests__/__image_snapshots__/section-have-to-match-white-section.snap.png new file mode 100644 index 00000000000..4d20dc7ce90 Binary files /dev/null and b/packages/dnb-eufemia/src/components/section/__tests__/__image_snapshots__/section-have-to-match-white-section.snap.png differ diff --git a/packages/dnb-eufemia/src/components/section/__tests__/__image_snapshots__/section-have-to-match-z-index-test.snap.png b/packages/dnb-eufemia/src/components/section/__tests__/__image_snapshots__/section-have-to-match-z-index-test.snap.png new file mode 100644 index 00000000000..bbc879ecb9d Binary files /dev/null and b/packages/dnb-eufemia/src/components/section/__tests__/__image_snapshots__/section-have-to-match-z-index-test.snap.png differ diff --git a/packages/dnb-eufemia/src/components/section/__tests__/__snapshots__/section-screenshot-test-js-section-screenshot-have-to-match-black-3-section-1-0599e.snap.png b/packages/dnb-eufemia/src/components/section/__tests__/__snapshots__/section-screenshot-test-js-section-screenshot-have-to-match-black-3-section-1-0599e.snap.png deleted file mode 100644 index 4759367258b..00000000000 Binary files a/packages/dnb-eufemia/src/components/section/__tests__/__snapshots__/section-screenshot-test-js-section-screenshot-have-to-match-black-3-section-1-0599e.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/section/__tests__/__snapshots__/section-screenshot-test-js-section-screenshot-have-to-match-default-section-1-b7c64.snap.png b/packages/dnb-eufemia/src/components/section/__tests__/__snapshots__/section-screenshot-test-js-section-screenshot-have-to-match-default-section-1-b7c64.snap.png deleted file mode 100644 index 56c498156a6..00000000000 Binary files a/packages/dnb-eufemia/src/components/section/__tests__/__snapshots__/section-screenshot-test-js-section-screenshot-have-to-match-default-section-1-b7c64.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/section/__tests__/__snapshots__/section-screenshot-test-js-section-screenshot-have-to-match-divider-section-1-09379.snap.png b/packages/dnb-eufemia/src/components/section/__tests__/__snapshots__/section-screenshot-test-js-section-screenshot-have-to-match-divider-section-1-09379.snap.png deleted file mode 100644 index 02f5d10fe4b..00000000000 Binary files a/packages/dnb-eufemia/src/components/section/__tests__/__snapshots__/section-screenshot-test-js-section-screenshot-have-to-match-divider-section-1-09379.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/section/__tests__/__snapshots__/section-screenshot-test-js-section-screenshot-have-to-match-emerald-green-section-1-a7bec.snap.png b/packages/dnb-eufemia/src/components/section/__tests__/__snapshots__/section-screenshot-test-js-section-screenshot-have-to-match-emerald-green-section-1-a7bec.snap.png deleted file mode 100644 index a7457c0c320..00000000000 Binary files a/packages/dnb-eufemia/src/components/section/__tests__/__snapshots__/section-screenshot-test-js-section-screenshot-have-to-match-emerald-green-section-1-a7bec.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/section/__tests__/__snapshots__/section-screenshot-test-js-section-screenshot-have-to-match-fire-red-section-1-98811.snap.png b/packages/dnb-eufemia/src/components/section/__tests__/__snapshots__/section-screenshot-test-js-section-screenshot-have-to-match-fire-red-section-1-98811.snap.png deleted file mode 100644 index c3ad4ac29c3..00000000000 Binary files a/packages/dnb-eufemia/src/components/section/__tests__/__snapshots__/section-screenshot-test-js-section-screenshot-have-to-match-fire-red-section-1-98811.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/section/__tests__/__snapshots__/section-screenshot-test-js-section-screenshot-have-to-match-lavender-section-1-bcea6.snap.png b/packages/dnb-eufemia/src/components/section/__tests__/__snapshots__/section-screenshot-test-js-section-screenshot-have-to-match-lavender-section-1-bcea6.snap.png deleted file mode 100644 index 93f4a0d723b..00000000000 Binary files a/packages/dnb-eufemia/src/components/section/__tests__/__snapshots__/section-screenshot-test-js-section-screenshot-have-to-match-lavender-section-1-bcea6.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/section/__tests__/__snapshots__/section-screenshot-test-js-section-screenshot-have-to-match-mint-green-section-1-e9553.snap.png b/packages/dnb-eufemia/src/components/section/__tests__/__snapshots__/section-screenshot-test-js-section-screenshot-have-to-match-mint-green-section-1-e9553.snap.png deleted file mode 100644 index 4b3e9161b18..00000000000 Binary files a/packages/dnb-eufemia/src/components/section/__tests__/__snapshots__/section-screenshot-test-js-section-screenshot-have-to-match-mint-green-section-1-e9553.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/section/__tests__/__snapshots__/section-screenshot-test-js-section-screenshot-have-to-match-pistachio-section-1-57e59.snap.png b/packages/dnb-eufemia/src/components/section/__tests__/__snapshots__/section-screenshot-test-js-section-screenshot-have-to-match-pistachio-section-1-57e59.snap.png deleted file mode 100644 index 1244a571cb9..00000000000 Binary files a/packages/dnb-eufemia/src/components/section/__tests__/__snapshots__/section-screenshot-test-js-section-screenshot-have-to-match-pistachio-section-1-57e59.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/section/__tests__/__snapshots__/section-screenshot-test-js-section-screenshot-have-to-match-sand-yellow-section-1-bcf67.snap.png b/packages/dnb-eufemia/src/components/section/__tests__/__snapshots__/section-screenshot-test-js-section-screenshot-have-to-match-sand-yellow-section-1-bcf67.snap.png deleted file mode 100644 index 8f84b22c14c..00000000000 Binary files a/packages/dnb-eufemia/src/components/section/__tests__/__snapshots__/section-screenshot-test-js-section-screenshot-have-to-match-sand-yellow-section-1-bcf67.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/section/__tests__/__snapshots__/section-screenshot-test-js-section-screenshot-have-to-match-sea-green-section-1-4cfc4.snap.png b/packages/dnb-eufemia/src/components/section/__tests__/__snapshots__/section-screenshot-test-js-section-screenshot-have-to-match-sea-green-section-1-4cfc4.snap.png deleted file mode 100644 index 532c427b245..00000000000 Binary files a/packages/dnb-eufemia/src/components/section/__tests__/__snapshots__/section-screenshot-test-js-section-screenshot-have-to-match-sea-green-section-1-4cfc4.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/section/__tests__/__snapshots__/section-screenshot-test-js-section-screenshot-have-to-match-signal-orange-section-1-defbd.snap.png b/packages/dnb-eufemia/src/components/section/__tests__/__snapshots__/section-screenshot-test-js-section-screenshot-have-to-match-signal-orange-section-1-defbd.snap.png deleted file mode 100644 index f5021be1293..00000000000 Binary files a/packages/dnb-eufemia/src/components/section/__tests__/__snapshots__/section-screenshot-test-js-section-screenshot-have-to-match-signal-orange-section-1-defbd.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/section/__tests__/__snapshots__/section-screenshot-test-js-section-screenshot-have-to-match-white-section-1-f1ace.snap.png b/packages/dnb-eufemia/src/components/section/__tests__/__snapshots__/section-screenshot-test-js-section-screenshot-have-to-match-white-section-1-f1ace.snap.png deleted file mode 100644 index bb9ba0cd276..00000000000 Binary files a/packages/dnb-eufemia/src/components/section/__tests__/__snapshots__/section-screenshot-test-js-section-screenshot-have-to-match-white-section-1-f1ace.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/section/__tests__/__snapshots__/section-screenshot-test-js-section-screenshot-have-to-match-z-index-test-1-6e39e.snap.png b/packages/dnb-eufemia/src/components/section/__tests__/__snapshots__/section-screenshot-test-js-section-screenshot-have-to-match-z-index-test-1-6e39e.snap.png deleted file mode 100644 index 89595a123aa..00000000000 Binary files a/packages/dnb-eufemia/src/components/section/__tests__/__snapshots__/section-screenshot-test-js-section-screenshot-have-to-match-z-index-test-1-6e39e.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/skeleton/__tests__/Skeleton.screenshot.test.js b/packages/dnb-eufemia/src/components/skeleton/__tests__/Skeleton.screenshot.test.js deleted file mode 100644 index 08795a98077..00000000000 --- a/packages/dnb-eufemia/src/components/skeleton/__tests__/Skeleton.screenshot.test.js +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -describe('Skeleton screenshot', () => { - setupPageScreenshot({ url: '/uilib/components/skeleton/demos' }) - - it('have to match skeleton article figure', async () => { - const screenshot = await testPageScreenshot({ - style: { width: '20rem', height: '20rem' }, - selector: '[data-visual-test="skeleton-figure-article"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match excluded components', async () => { - const screenshot = await testPageScreenshot({ - style: { width: '20rem', height: '20rem' }, - selector: '[data-visual-test="skeleton-exclude"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match a removed skeleton', async () => { - const screenshot = await testPageScreenshot({ - style: { width: '20rem', height: '20rem' }, - selector: '[data-visual-test="skeleton-exclude"]', - simulateSelector: - '[data-visual-test="skeleton-exclude"] .dnb-button', - simulate: 'click', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match all components - vertical', async () => { - const screenshot = await testPageScreenshot({ - style: { width: '60rem' }, - selector: '[data-visual-test="skeleton-all-vertical"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match all components - horizontal', async () => { - const screenshot = await testPageScreenshot({ - style: { width: '60rem' }, - selector: '[data-visual-test="skeleton-all-horizontal"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/components/skeleton/__tests__/Skeleton.screenshot.test.ts b/packages/dnb-eufemia/src/components/skeleton/__tests__/Skeleton.screenshot.test.ts new file mode 100644 index 00000000000..4d932855da3 --- /dev/null +++ b/packages/dnb-eufemia/src/components/skeleton/__tests__/Skeleton.screenshot.test.ts @@ -0,0 +1,56 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../../core/jest/jestSetupScreenshots' + +describe('Skeleton', () => { + setupPageScreenshot({ url: '/uilib/components/skeleton/demos' }) + + it('have to match skeleton article figure', async () => { + const screenshot = await makeScreenshot({ + style: { width: '20rem', height: '20rem' }, + selector: '[data-visual-test="skeleton-figure-article"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match excluded components', async () => { + const screenshot = await makeScreenshot({ + style: { width: '20rem', height: '20rem' }, + selector: '[data-visual-test="skeleton-exclude"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match a removed skeleton', async () => { + const screenshot = await makeScreenshot({ + style: { width: '20rem', height: '20rem' }, + selector: '[data-visual-test="skeleton-exclude"]', + simulateSelector: + '[data-visual-test="skeleton-exclude"] .dnb-button', + simulate: 'click', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match all components - vertical', async () => { + const screenshot = await makeScreenshot({ + style: { width: '60rem' }, + selector: '[data-visual-test="skeleton-all-vertical"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match all components - horizontal', async () => { + const screenshot = await makeScreenshot({ + style: { width: '60rem' }, + selector: '[data-visual-test="skeleton-all-horizontal"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/components/skeleton/__tests__/__image_snapshots__/skeleton-have-to-match-a-removed-skeleton.snap.png b/packages/dnb-eufemia/src/components/skeleton/__tests__/__image_snapshots__/skeleton-have-to-match-a-removed-skeleton.snap.png new file mode 100644 index 00000000000..8fa21177380 Binary files /dev/null and b/packages/dnb-eufemia/src/components/skeleton/__tests__/__image_snapshots__/skeleton-have-to-match-a-removed-skeleton.snap.png differ diff --git a/packages/dnb-eufemia/src/components/skeleton/__tests__/__image_snapshots__/skeleton-have-to-match-all-components-horizontal.snap.png b/packages/dnb-eufemia/src/components/skeleton/__tests__/__image_snapshots__/skeleton-have-to-match-all-components-horizontal.snap.png new file mode 100644 index 00000000000..c702492d8a9 Binary files /dev/null and b/packages/dnb-eufemia/src/components/skeleton/__tests__/__image_snapshots__/skeleton-have-to-match-all-components-horizontal.snap.png differ diff --git a/packages/dnb-eufemia/src/components/skeleton/__tests__/__image_snapshots__/skeleton-have-to-match-all-components-vertical.snap.png b/packages/dnb-eufemia/src/components/skeleton/__tests__/__image_snapshots__/skeleton-have-to-match-all-components-vertical.snap.png new file mode 100644 index 00000000000..ea8e3d1f6d9 Binary files /dev/null and b/packages/dnb-eufemia/src/components/skeleton/__tests__/__image_snapshots__/skeleton-have-to-match-all-components-vertical.snap.png differ diff --git a/packages/dnb-eufemia/src/components/skeleton/__tests__/__image_snapshots__/skeleton-have-to-match-excluded-components.snap.png b/packages/dnb-eufemia/src/components/skeleton/__tests__/__image_snapshots__/skeleton-have-to-match-excluded-components.snap.png new file mode 100644 index 00000000000..fec1479e39e Binary files /dev/null and b/packages/dnb-eufemia/src/components/skeleton/__tests__/__image_snapshots__/skeleton-have-to-match-excluded-components.snap.png differ diff --git a/packages/dnb-eufemia/src/components/skeleton/__tests__/__image_snapshots__/skeleton-have-to-match-skeleton-article-figure.snap.png b/packages/dnb-eufemia/src/components/skeleton/__tests__/__image_snapshots__/skeleton-have-to-match-skeleton-article-figure.snap.png new file mode 100644 index 00000000000..62345202b6f Binary files /dev/null and b/packages/dnb-eufemia/src/components/skeleton/__tests__/__image_snapshots__/skeleton-have-to-match-skeleton-article-figure.snap.png differ diff --git a/packages/dnb-eufemia/src/components/skeleton/__tests__/__snapshots__/skeleton-screenshot-test-js-skeleton-screenshot-have-to-match-a-removed-skeleton-1-162ea.snap.png b/packages/dnb-eufemia/src/components/skeleton/__tests__/__snapshots__/skeleton-screenshot-test-js-skeleton-screenshot-have-to-match-a-removed-skeleton-1-162ea.snap.png deleted file mode 100644 index d93fc12509e..00000000000 Binary files a/packages/dnb-eufemia/src/components/skeleton/__tests__/__snapshots__/skeleton-screenshot-test-js-skeleton-screenshot-have-to-match-a-removed-skeleton-1-162ea.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/skeleton/__tests__/__snapshots__/skeleton-screenshot-test-js-skeleton-screenshot-have-to-match-all-components-horizontal-1-e648b.snap.png b/packages/dnb-eufemia/src/components/skeleton/__tests__/__snapshots__/skeleton-screenshot-test-js-skeleton-screenshot-have-to-match-all-components-horizontal-1-e648b.snap.png deleted file mode 100644 index c1886ea729c..00000000000 Binary files a/packages/dnb-eufemia/src/components/skeleton/__tests__/__snapshots__/skeleton-screenshot-test-js-skeleton-screenshot-have-to-match-all-components-horizontal-1-e648b.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/skeleton/__tests__/__snapshots__/skeleton-screenshot-test-js-skeleton-screenshot-have-to-match-all-components-vertical-1-7ac34.snap.png b/packages/dnb-eufemia/src/components/skeleton/__tests__/__snapshots__/skeleton-screenshot-test-js-skeleton-screenshot-have-to-match-all-components-vertical-1-7ac34.snap.png deleted file mode 100644 index 156b4915f87..00000000000 Binary files a/packages/dnb-eufemia/src/components/skeleton/__tests__/__snapshots__/skeleton-screenshot-test-js-skeleton-screenshot-have-to-match-all-components-vertical-1-7ac34.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/skeleton/__tests__/__snapshots__/skeleton-screenshot-test-js-skeleton-screenshot-have-to-match-excluded-components-1-940df.snap.png b/packages/dnb-eufemia/src/components/skeleton/__tests__/__snapshots__/skeleton-screenshot-test-js-skeleton-screenshot-have-to-match-excluded-components-1-940df.snap.png deleted file mode 100644 index bdfc56c04ee..00000000000 Binary files a/packages/dnb-eufemia/src/components/skeleton/__tests__/__snapshots__/skeleton-screenshot-test-js-skeleton-screenshot-have-to-match-excluded-components-1-940df.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/skeleton/__tests__/__snapshots__/skeleton-screenshot-test-js-skeleton-screenshot-have-to-match-skeleton-article-figure-1-405bb.snap.png b/packages/dnb-eufemia/src/components/skeleton/__tests__/__snapshots__/skeleton-screenshot-test-js-skeleton-screenshot-have-to-match-skeleton-article-figure-1-405bb.snap.png deleted file mode 100644 index c60c1a8ce98..00000000000 Binary files a/packages/dnb-eufemia/src/components/skeleton/__tests__/__snapshots__/skeleton-screenshot-test-js-skeleton-screenshot-have-to-match-skeleton-article-figure-1-405bb.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/slider/__tests__/Slider.screenshot.test.ts b/packages/dnb-eufemia/src/components/slider/__tests__/Slider.screenshot.test.ts new file mode 100644 index 00000000000..d382003964a --- /dev/null +++ b/packages/dnb-eufemia/src/components/slider/__tests__/Slider.screenshot.test.ts @@ -0,0 +1,71 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../../core/jest/jestSetupScreenshots' + +describe('Slider', () => { + setupPageScreenshot({ url: '/uilib/components/slider/demos' }) + + it('have to match default slider', async () => { + const screenshot = await makeScreenshot({ + style: { width: '20rem' }, + selector: '[data-visual-test="slider-default"] .dnb-slider__wrapper', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the focus state', async () => { + const screenshot = await makeScreenshot({ + style: { width: '20rem', 'padding-top': '3rem' }, + selector: '[data-visual-test="slider-default"] .dnb-slider__wrapper', + simulateSelector: + '[data-visual-test="slider-default"] .dnb-slider__thumb .dnb-slider__button-helper', + simulate: 'focus', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the hover state', async () => { + const screenshot = await makeScreenshot({ + style: { width: '20rem', 'padding-top': '3rem' }, + selector: '[data-visual-test="slider-default"] .dnb-slider__wrapper', + simulateSelector: + '[data-visual-test="slider-default"] .dnb-slider__thumb .dnb-slider__button-helper', + simulate: 'hover', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the active state', async () => { + const screenshot = await makeScreenshot({ + style: { width: '20rem', 'padding-top': '3rem' }, + selector: '[data-visual-test="slider-default"] .dnb-slider__wrapper', + simulateSelector: + '[data-visual-test="slider-default"] .dnb-slider__thumb .dnb-slider__button-helper', + simulate: 'active', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match vertical slider', async () => { + const screenshot = await makeScreenshot({ + style: { height: '20rem' }, + selector: + '[data-visual-test="slider-vertical"] .dnb-slider__wrapper', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match multi thumbs slider', async () => { + const screenshot = await makeScreenshot({ + style: { width: '20rem', height: '10rem' }, + selector: '[data-visual-test="slider-multi"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/components/slider/__tests__/Slider.screenshot.test.tsx b/packages/dnb-eufemia/src/components/slider/__tests__/Slider.screenshot.test.tsx deleted file mode 100644 index 41a735203ab..00000000000 --- a/packages/dnb-eufemia/src/components/slider/__tests__/Slider.screenshot.test.tsx +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -describe('Slider screenshot', () => { - setupPageScreenshot({ url: '/uilib/components/slider/demos' }) - - it('have to match default slider', async () => { - const screenshot = await testPageScreenshot({ - style: { width: '20rem' }, - selector: '[data-visual-test="slider-default"] .dnb-slider__wrapper', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the focus state', async () => { - const screenshot = await testPageScreenshot({ - style: { width: '20rem', 'padding-top': '3rem' }, - selector: '[data-visual-test="slider-default"] .dnb-slider__wrapper', - simulateSelector: - '[data-visual-test="slider-default"] .dnb-slider__thumb .dnb-slider__button-helper', - simulate: 'focus', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the hover state', async () => { - const screenshot = await testPageScreenshot({ - style: { width: '20rem', 'padding-top': '3rem' }, - selector: '[data-visual-test="slider-default"] .dnb-slider__wrapper', - simulateSelector: - '[data-visual-test="slider-default"] .dnb-slider__thumb .dnb-slider__button-helper', - simulate: 'hover', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the active state', async () => { - const screenshot = await testPageScreenshot({ - style: { width: '20rem', 'padding-top': '3rem' }, - selector: '[data-visual-test="slider-default"] .dnb-slider__wrapper', - simulateSelector: - '[data-visual-test="slider-default"] .dnb-slider__thumb .dnb-slider__button-helper', - simulate: 'active', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match vertical slider', async () => { - const screenshot = await testPageScreenshot({ - style: { height: '20rem' }, - selector: - '[data-visual-test="slider-vertical"] .dnb-slider__wrapper', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match multi thumbs slider', async () => { - const screenshot = await testPageScreenshot({ - style: { width: '20rem', height: '10rem' }, - selector: '[data-visual-test="slider-multi"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/components/slider/__tests__/__image_snapshots__/slider-have-to-match-default-slider.snap.png b/packages/dnb-eufemia/src/components/slider/__tests__/__image_snapshots__/slider-have-to-match-default-slider.snap.png new file mode 100644 index 00000000000..8f375385ee1 Binary files /dev/null and b/packages/dnb-eufemia/src/components/slider/__tests__/__image_snapshots__/slider-have-to-match-default-slider.snap.png differ diff --git a/packages/dnb-eufemia/src/components/slider/__tests__/__image_snapshots__/slider-have-to-match-multi-thumbs-slider.snap.png b/packages/dnb-eufemia/src/components/slider/__tests__/__image_snapshots__/slider-have-to-match-multi-thumbs-slider.snap.png new file mode 100644 index 00000000000..b2ce1d414ee Binary files /dev/null and b/packages/dnb-eufemia/src/components/slider/__tests__/__image_snapshots__/slider-have-to-match-multi-thumbs-slider.snap.png differ diff --git a/packages/dnb-eufemia/src/components/slider/__tests__/__image_snapshots__/slider-have-to-match-the-active-state.snap.png b/packages/dnb-eufemia/src/components/slider/__tests__/__image_snapshots__/slider-have-to-match-the-active-state.snap.png new file mode 100644 index 00000000000..5ca9c3d510a Binary files /dev/null and b/packages/dnb-eufemia/src/components/slider/__tests__/__image_snapshots__/slider-have-to-match-the-active-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/slider/__tests__/__image_snapshots__/slider-have-to-match-the-focus-state.snap.png b/packages/dnb-eufemia/src/components/slider/__tests__/__image_snapshots__/slider-have-to-match-the-focus-state.snap.png new file mode 100644 index 00000000000..dc57443ac9b Binary files /dev/null and b/packages/dnb-eufemia/src/components/slider/__tests__/__image_snapshots__/slider-have-to-match-the-focus-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/slider/__tests__/__image_snapshots__/slider-have-to-match-the-hover-state.snap.png b/packages/dnb-eufemia/src/components/slider/__tests__/__image_snapshots__/slider-have-to-match-the-hover-state.snap.png new file mode 100644 index 00000000000..dc57443ac9b Binary files /dev/null and b/packages/dnb-eufemia/src/components/slider/__tests__/__image_snapshots__/slider-have-to-match-the-hover-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/slider/__tests__/__image_snapshots__/slider-have-to-match-vertical-slider.snap.png b/packages/dnb-eufemia/src/components/slider/__tests__/__image_snapshots__/slider-have-to-match-vertical-slider.snap.png new file mode 100644 index 00000000000..38412fda4a5 Binary files /dev/null and b/packages/dnb-eufemia/src/components/slider/__tests__/__image_snapshots__/slider-have-to-match-vertical-slider.snap.png differ diff --git a/packages/dnb-eufemia/src/components/slider/__tests__/__snapshots__/slider-screenshot-test-tsx-slider-screenshot-have-to-match-default-slider-1-95c9e.snap.png b/packages/dnb-eufemia/src/components/slider/__tests__/__snapshots__/slider-screenshot-test-tsx-slider-screenshot-have-to-match-default-slider-1-95c9e.snap.png deleted file mode 100644 index ca44131a36c..00000000000 Binary files a/packages/dnb-eufemia/src/components/slider/__tests__/__snapshots__/slider-screenshot-test-tsx-slider-screenshot-have-to-match-default-slider-1-95c9e.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/slider/__tests__/__snapshots__/slider-screenshot-test-tsx-slider-screenshot-have-to-match-multi-thumbs-slider-1-b69b2.snap.png b/packages/dnb-eufemia/src/components/slider/__tests__/__snapshots__/slider-screenshot-test-tsx-slider-screenshot-have-to-match-multi-thumbs-slider-1-b69b2.snap.png deleted file mode 100644 index f1b31b202f2..00000000000 Binary files a/packages/dnb-eufemia/src/components/slider/__tests__/__snapshots__/slider-screenshot-test-tsx-slider-screenshot-have-to-match-multi-thumbs-slider-1-b69b2.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/slider/__tests__/__snapshots__/slider-screenshot-test-tsx-slider-screenshot-have-to-match-the-active-state-1-727c9.snap.png b/packages/dnb-eufemia/src/components/slider/__tests__/__snapshots__/slider-screenshot-test-tsx-slider-screenshot-have-to-match-the-active-state-1-727c9.snap.png deleted file mode 100644 index 69278edde1d..00000000000 Binary files a/packages/dnb-eufemia/src/components/slider/__tests__/__snapshots__/slider-screenshot-test-tsx-slider-screenshot-have-to-match-the-active-state-1-727c9.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/slider/__tests__/__snapshots__/slider-screenshot-test-tsx-slider-screenshot-have-to-match-the-focus-state-1-20f95.snap.png b/packages/dnb-eufemia/src/components/slider/__tests__/__snapshots__/slider-screenshot-test-tsx-slider-screenshot-have-to-match-the-focus-state-1-20f95.snap.png deleted file mode 100644 index 5c08274757c..00000000000 Binary files a/packages/dnb-eufemia/src/components/slider/__tests__/__snapshots__/slider-screenshot-test-tsx-slider-screenshot-have-to-match-the-focus-state-1-20f95.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/slider/__tests__/__snapshots__/slider-screenshot-test-tsx-slider-screenshot-have-to-match-the-hover-state-1-2d7de.snap.png b/packages/dnb-eufemia/src/components/slider/__tests__/__snapshots__/slider-screenshot-test-tsx-slider-screenshot-have-to-match-the-hover-state-1-2d7de.snap.png deleted file mode 100644 index f8286d77417..00000000000 Binary files a/packages/dnb-eufemia/src/components/slider/__tests__/__snapshots__/slider-screenshot-test-tsx-slider-screenshot-have-to-match-the-hover-state-1-2d7de.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/slider/__tests__/__snapshots__/slider-screenshot-test-tsx-slider-screenshot-have-to-match-vertical-slider-1-2f934.snap.png b/packages/dnb-eufemia/src/components/slider/__tests__/__snapshots__/slider-screenshot-test-tsx-slider-screenshot-have-to-match-vertical-slider-1-2f934.snap.png deleted file mode 100644 index 8c039143bab..00000000000 Binary files a/packages/dnb-eufemia/src/components/slider/__tests__/__snapshots__/slider-screenshot-test-tsx-slider-screenshot-have-to-match-vertical-slider-1-2f934.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/space/__tests__/Space.screenshot.test.js b/packages/dnb-eufemia/src/components/space/__tests__/Space.screenshot.test.js deleted file mode 100644 index 25fea8eed77..00000000000 --- a/packages/dnb-eufemia/src/components/space/__tests__/Space.screenshot.test.js +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -describe('Space screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/space/demos', - }) - - it('have to match the spacing patterns', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="spacing-patterns"] .spacing-patterns', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the spacing with elements', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="spacing-elements"] .spacing-elements', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the 2.5 spacing margins', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="spacing-margins"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the spacing method 1', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="spacing-method-space"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the spacing method 2', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="spacing-method-form-row"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the spacing method 3', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="spacing-method-component"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/components/space/__tests__/Space.screenshot.test.ts b/packages/dnb-eufemia/src/components/space/__tests__/Space.screenshot.test.ts new file mode 100644 index 00000000000..dee6f0d61bd --- /dev/null +++ b/packages/dnb-eufemia/src/components/space/__tests__/Space.screenshot.test.ts @@ -0,0 +1,57 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../../core/jest/jestSetupScreenshots' + +describe('Space', () => { + setupPageScreenshot({ + url: '/uilib/components/space/demos', + }) + + it('have to match the spacing patterns', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="spacing-patterns"] .spacing-patterns', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the spacing with elements', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="spacing-elements"] .spacing-elements', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the 2.5 spacing margins', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="spacing-margins"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the spacing method 1', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="spacing-method-space"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the spacing method 2', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="spacing-method-form-row"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the spacing method 3', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="spacing-method-component"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/components/space/__tests__/__image_snapshots__/space-have-to-match-the-25-spacing-margins.snap.png b/packages/dnb-eufemia/src/components/space/__tests__/__image_snapshots__/space-have-to-match-the-25-spacing-margins.snap.png new file mode 100644 index 00000000000..724f078796a Binary files /dev/null and b/packages/dnb-eufemia/src/components/space/__tests__/__image_snapshots__/space-have-to-match-the-25-spacing-margins.snap.png differ diff --git a/packages/dnb-eufemia/src/components/space/__tests__/__image_snapshots__/space-have-to-match-the-spacing-method-1.snap.png b/packages/dnb-eufemia/src/components/space/__tests__/__image_snapshots__/space-have-to-match-the-spacing-method-1.snap.png new file mode 100644 index 00000000000..1ee5eda5cc5 Binary files /dev/null and b/packages/dnb-eufemia/src/components/space/__tests__/__image_snapshots__/space-have-to-match-the-spacing-method-1.snap.png differ diff --git a/packages/dnb-eufemia/src/components/space/__tests__/__image_snapshots__/space-have-to-match-the-spacing-method-2.snap.png b/packages/dnb-eufemia/src/components/space/__tests__/__image_snapshots__/space-have-to-match-the-spacing-method-2.snap.png new file mode 100644 index 00000000000..506ef6ff29c Binary files /dev/null and b/packages/dnb-eufemia/src/components/space/__tests__/__image_snapshots__/space-have-to-match-the-spacing-method-2.snap.png differ diff --git a/packages/dnb-eufemia/src/components/space/__tests__/__image_snapshots__/space-have-to-match-the-spacing-method-3.snap.png b/packages/dnb-eufemia/src/components/space/__tests__/__image_snapshots__/space-have-to-match-the-spacing-method-3.snap.png new file mode 100644 index 00000000000..cdd4cfacbaf Binary files /dev/null and b/packages/dnb-eufemia/src/components/space/__tests__/__image_snapshots__/space-have-to-match-the-spacing-method-3.snap.png differ diff --git a/packages/dnb-eufemia/src/components/space/__tests__/__image_snapshots__/space-have-to-match-the-spacing-patterns.snap.png b/packages/dnb-eufemia/src/components/space/__tests__/__image_snapshots__/space-have-to-match-the-spacing-patterns.snap.png new file mode 100644 index 00000000000..183d4d4b287 Binary files /dev/null and b/packages/dnb-eufemia/src/components/space/__tests__/__image_snapshots__/space-have-to-match-the-spacing-patterns.snap.png differ diff --git a/packages/dnb-eufemia/src/components/space/__tests__/__image_snapshots__/space-have-to-match-the-spacing-with-elements.snap.png b/packages/dnb-eufemia/src/components/space/__tests__/__image_snapshots__/space-have-to-match-the-spacing-with-elements.snap.png new file mode 100644 index 00000000000..51e8ff36678 Binary files /dev/null and b/packages/dnb-eufemia/src/components/space/__tests__/__image_snapshots__/space-have-to-match-the-spacing-with-elements.snap.png differ diff --git a/packages/dnb-eufemia/src/components/space/__tests__/__snapshots__/space-screenshot-test-js-space-screenshot-have-to-match-the-2-5-spacing-margins-1-896d5.snap.png b/packages/dnb-eufemia/src/components/space/__tests__/__snapshots__/space-screenshot-test-js-space-screenshot-have-to-match-the-2-5-spacing-margins-1-896d5.snap.png deleted file mode 100644 index 524972b1f88..00000000000 Binary files a/packages/dnb-eufemia/src/components/space/__tests__/__snapshots__/space-screenshot-test-js-space-screenshot-have-to-match-the-2-5-spacing-margins-1-896d5.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/space/__tests__/__snapshots__/space-screenshot-test-js-space-screenshot-have-to-match-the-spacing-method-1-1-14557.snap.png b/packages/dnb-eufemia/src/components/space/__tests__/__snapshots__/space-screenshot-test-js-space-screenshot-have-to-match-the-spacing-method-1-1-14557.snap.png deleted file mode 100644 index e47d6a2ff8e..00000000000 Binary files a/packages/dnb-eufemia/src/components/space/__tests__/__snapshots__/space-screenshot-test-js-space-screenshot-have-to-match-the-spacing-method-1-1-14557.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/space/__tests__/__snapshots__/space-screenshot-test-js-space-screenshot-have-to-match-the-spacing-method-2-1-a70c2.snap.png b/packages/dnb-eufemia/src/components/space/__tests__/__snapshots__/space-screenshot-test-js-space-screenshot-have-to-match-the-spacing-method-2-1-a70c2.snap.png deleted file mode 100644 index ba0c0b75234..00000000000 Binary files a/packages/dnb-eufemia/src/components/space/__tests__/__snapshots__/space-screenshot-test-js-space-screenshot-have-to-match-the-spacing-method-2-1-a70c2.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/space/__tests__/__snapshots__/space-screenshot-test-js-space-screenshot-have-to-match-the-spacing-method-3-1-995dd.snap.png b/packages/dnb-eufemia/src/components/space/__tests__/__snapshots__/space-screenshot-test-js-space-screenshot-have-to-match-the-spacing-method-3-1-995dd.snap.png deleted file mode 100644 index 4d4b3c63bcd..00000000000 Binary files a/packages/dnb-eufemia/src/components/space/__tests__/__snapshots__/space-screenshot-test-js-space-screenshot-have-to-match-the-spacing-method-3-1-995dd.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/space/__tests__/__snapshots__/space-screenshot-test-js-space-screenshot-have-to-match-the-spacing-patterns-1-8047b.snap.png b/packages/dnb-eufemia/src/components/space/__tests__/__snapshots__/space-screenshot-test-js-space-screenshot-have-to-match-the-spacing-patterns-1-8047b.snap.png deleted file mode 100644 index 308375950a8..00000000000 Binary files a/packages/dnb-eufemia/src/components/space/__tests__/__snapshots__/space-screenshot-test-js-space-screenshot-have-to-match-the-spacing-patterns-1-8047b.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/space/__tests__/__snapshots__/space-screenshot-test-js-space-screenshot-have-to-match-the-spacing-with-elements-1-7f354.snap.png b/packages/dnb-eufemia/src/components/space/__tests__/__snapshots__/space-screenshot-test-js-space-screenshot-have-to-match-the-spacing-with-elements-1-7f354.snap.png deleted file mode 100644 index cf451a63411..00000000000 Binary files a/packages/dnb-eufemia/src/components/space/__tests__/__snapshots__/space-screenshot-test-js-space-screenshot-have-to-match-the-spacing-with-elements-1-7f354.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/step-indicator/__tests__/StepIndicator.screenshot.test.js b/packages/dnb-eufemia/src/components/step-indicator/__tests__/StepIndicator.screenshot.test.js deleted file mode 100644 index ebb24a87091..00000000000 --- a/packages/dnb-eufemia/src/components/step-indicator/__tests__/StepIndicator.screenshot.test.js +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -describe('StepIndicator screenshot', () => { - setupPageScreenshot({ url: '/uilib/components/step-indicator/demos' }) - - it('have to match loose mode', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="step-indicator-loose"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match loose mode after click simulation', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="step-indicator-loose"]', - simulateSelector: - '[data-visual-test="step-indicator-loose"] .dnb-step-indicator__item:nth-of-type(3) button', - simulate: 'click', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match strict mode', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="step-indicator-strict"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match strict mode after click simulation', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="step-indicator-strict"]', - simulateSelector: - '[data-visual-test="step-indicator-strict"] .dnb-step-indicator__item:nth-of-type(1) button', - simulate: 'click', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match static mode after click simulation', async () => { - const screenshot = await testPageScreenshot({ - selector: 'div#dnb-modal-root', - simulateSelector: - '[data-visual-test="step-indicator-static"] .dnb-step-indicator__trigger__button', - simulate: 'click', - screenshotSelector: '.dnb-modal__content', - rootClassName: 'hide-page-content', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('StepIndicator screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/step-indicator/demos', - pageViewport: { - width: 500, - height: 600, - }, - }) - - it('have to match loose mode for small screens', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="step-indicator-loose"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match strict mode for small screens', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="step-indicator-strict"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match strict mode for small screens after click simulation', async () => { - const screenshot = await testPageScreenshot({ - selector: 'div#dnb-modal-root', - simulateSelector: - '[data-visual-test="step-indicator-strict"] .dnb-step-indicator__trigger__button', - simulate: 'click', - screenshotSelector: '.dnb-modal__content', - rootClassName: 'hide-page-content', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/components/step-indicator/__tests__/StepIndicator.screenshot.test.ts b/packages/dnb-eufemia/src/components/step-indicator/__tests__/StepIndicator.screenshot.test.ts new file mode 100644 index 00000000000..418a5ce8da5 --- /dev/null +++ b/packages/dnb-eufemia/src/components/step-indicator/__tests__/StepIndicator.screenshot.test.ts @@ -0,0 +1,95 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../../core/jest/jestSetupScreenshots' + +describe('StepIndicator', () => { + setupPageScreenshot({ url: '/uilib/components/step-indicator/demos' }) + + it('have to match loose mode', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="step-indicator-loose"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match loose mode after click simulation', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="step-indicator-loose"]', + simulateSelector: + '[data-visual-test="step-indicator-loose"] .dnb-step-indicator__item:nth-of-type(3) button', + simulate: 'click', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match strict mode', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="step-indicator-strict"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match strict mode after click simulation', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="step-indicator-strict"]', + simulateSelector: + '[data-visual-test="step-indicator-strict"] .dnb-step-indicator__item:nth-of-type(1) button', + simulate: 'click', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match static mode after click simulation', async () => { + const screenshot = await makeScreenshot({ + selector: 'div#dnb-modal-root', + simulateSelector: + '[data-visual-test="step-indicator-static"] .dnb-step-indicator__trigger__button', + simulate: 'click', + screenshotSelector: '.dnb-modal__content', + rootClassName: 'hide-page-content', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) + +describe('StepIndicator', () => { + setupPageScreenshot({ + url: '/uilib/components/step-indicator/demos', + pageViewport: { + width: 500, + height: 600, + }, + }) + + it('have to match loose mode for small screens', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="step-indicator-loose"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match strict mode for small screens', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="step-indicator-strict"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match strict mode for small screens after click simulation', async () => { + const screenshot = await makeScreenshot({ + selector: 'div#dnb-modal-root', + simulateSelector: + '[data-visual-test="step-indicator-strict"] .dnb-step-indicator__trigger__button', + simulate: 'click', + screenshotSelector: '.dnb-modal__content', + rootClassName: 'hide-page-content', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/components/step-indicator/__tests__/__image_snapshots__/stepindicator-have-to-match-loose-mode-after-click-simulation.snap.png b/packages/dnb-eufemia/src/components/step-indicator/__tests__/__image_snapshots__/stepindicator-have-to-match-loose-mode-after-click-simulation.snap.png new file mode 100644 index 00000000000..4e79e5ea6a2 Binary files /dev/null and b/packages/dnb-eufemia/src/components/step-indicator/__tests__/__image_snapshots__/stepindicator-have-to-match-loose-mode-after-click-simulation.snap.png differ diff --git a/packages/dnb-eufemia/src/components/step-indicator/__tests__/__image_snapshots__/stepindicator-have-to-match-loose-mode-for-small-screens.snap.png b/packages/dnb-eufemia/src/components/step-indicator/__tests__/__image_snapshots__/stepindicator-have-to-match-loose-mode-for-small-screens.snap.png new file mode 100644 index 00000000000..7b0b24104d7 Binary files /dev/null and b/packages/dnb-eufemia/src/components/step-indicator/__tests__/__image_snapshots__/stepindicator-have-to-match-loose-mode-for-small-screens.snap.png differ diff --git a/packages/dnb-eufemia/src/components/step-indicator/__tests__/__image_snapshots__/stepindicator-have-to-match-loose-mode.snap.png b/packages/dnb-eufemia/src/components/step-indicator/__tests__/__image_snapshots__/stepindicator-have-to-match-loose-mode.snap.png new file mode 100644 index 00000000000..d4854e146a0 Binary files /dev/null and b/packages/dnb-eufemia/src/components/step-indicator/__tests__/__image_snapshots__/stepindicator-have-to-match-loose-mode.snap.png differ diff --git a/packages/dnb-eufemia/src/components/step-indicator/__tests__/__image_snapshots__/stepindicator-have-to-match-static-mode-after-click-simulation.snap.png b/packages/dnb-eufemia/src/components/step-indicator/__tests__/__image_snapshots__/stepindicator-have-to-match-static-mode-after-click-simulation.snap.png new file mode 100644 index 00000000000..d955244e164 Binary files /dev/null and b/packages/dnb-eufemia/src/components/step-indicator/__tests__/__image_snapshots__/stepindicator-have-to-match-static-mode-after-click-simulation.snap.png differ diff --git a/packages/dnb-eufemia/src/components/step-indicator/__tests__/__image_snapshots__/stepindicator-have-to-match-strict-mode-after-click-simulation.snap.png b/packages/dnb-eufemia/src/components/step-indicator/__tests__/__image_snapshots__/stepindicator-have-to-match-strict-mode-after-click-simulation.snap.png new file mode 100644 index 00000000000..20220e863f8 Binary files /dev/null and b/packages/dnb-eufemia/src/components/step-indicator/__tests__/__image_snapshots__/stepindicator-have-to-match-strict-mode-after-click-simulation.snap.png differ diff --git a/packages/dnb-eufemia/src/components/step-indicator/__tests__/__image_snapshots__/stepindicator-have-to-match-strict-mode-for-small-screens-after-click-simulation.snap.png b/packages/dnb-eufemia/src/components/step-indicator/__tests__/__image_snapshots__/stepindicator-have-to-match-strict-mode-for-small-screens-after-click-simulation.snap.png new file mode 100644 index 00000000000..3e3e2ee0ae4 Binary files /dev/null and b/packages/dnb-eufemia/src/components/step-indicator/__tests__/__image_snapshots__/stepindicator-have-to-match-strict-mode-for-small-screens-after-click-simulation.snap.png differ diff --git a/packages/dnb-eufemia/src/components/step-indicator/__tests__/__image_snapshots__/stepindicator-have-to-match-strict-mode-for-small-screens.snap.png b/packages/dnb-eufemia/src/components/step-indicator/__tests__/__image_snapshots__/stepindicator-have-to-match-strict-mode-for-small-screens.snap.png new file mode 100644 index 00000000000..b4543719dd7 Binary files /dev/null and b/packages/dnb-eufemia/src/components/step-indicator/__tests__/__image_snapshots__/stepindicator-have-to-match-strict-mode-for-small-screens.snap.png differ diff --git a/packages/dnb-eufemia/src/components/step-indicator/__tests__/__image_snapshots__/stepindicator-have-to-match-strict-mode.snap.png b/packages/dnb-eufemia/src/components/step-indicator/__tests__/__image_snapshots__/stepindicator-have-to-match-strict-mode.snap.png new file mode 100644 index 00000000000..7cca71f9ecd Binary files /dev/null and b/packages/dnb-eufemia/src/components/step-indicator/__tests__/__image_snapshots__/stepindicator-have-to-match-strict-mode.snap.png differ diff --git a/packages/dnb-eufemia/src/components/step-indicator/__tests__/__snapshots__/step-indicator-screenshot-test-js-step-indicator-screenshot-have-to-match-loose-mode-1-8707e.snap.png b/packages/dnb-eufemia/src/components/step-indicator/__tests__/__snapshots__/step-indicator-screenshot-test-js-step-indicator-screenshot-have-to-match-loose-mode-1-8707e.snap.png deleted file mode 100644 index c9115e5a0fc..00000000000 Binary files a/packages/dnb-eufemia/src/components/step-indicator/__tests__/__snapshots__/step-indicator-screenshot-test-js-step-indicator-screenshot-have-to-match-loose-mode-1-8707e.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/step-indicator/__tests__/__snapshots__/step-indicator-screenshot-test-js-step-indicator-screenshot-have-to-match-loose-mode-after-click-simulation-1-908c4.snap.png b/packages/dnb-eufemia/src/components/step-indicator/__tests__/__snapshots__/step-indicator-screenshot-test-js-step-indicator-screenshot-have-to-match-loose-mode-after-click-simulation-1-908c4.snap.png deleted file mode 100644 index 2ed9957233f..00000000000 Binary files a/packages/dnb-eufemia/src/components/step-indicator/__tests__/__snapshots__/step-indicator-screenshot-test-js-step-indicator-screenshot-have-to-match-loose-mode-after-click-simulation-1-908c4.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/step-indicator/__tests__/__snapshots__/step-indicator-screenshot-test-js-step-indicator-screenshot-have-to-match-loose-mode-for-small-screens-1-66f8b.snap.png b/packages/dnb-eufemia/src/components/step-indicator/__tests__/__snapshots__/step-indicator-screenshot-test-js-step-indicator-screenshot-have-to-match-loose-mode-for-small-screens-1-66f8b.snap.png deleted file mode 100644 index 37413161911..00000000000 Binary files a/packages/dnb-eufemia/src/components/step-indicator/__tests__/__snapshots__/step-indicator-screenshot-test-js-step-indicator-screenshot-have-to-match-loose-mode-for-small-screens-1-66f8b.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/step-indicator/__tests__/__snapshots__/step-indicator-screenshot-test-js-step-indicator-screenshot-have-to-match-static-mode-after-click-simulation-1-0c21f.snap.png b/packages/dnb-eufemia/src/components/step-indicator/__tests__/__snapshots__/step-indicator-screenshot-test-js-step-indicator-screenshot-have-to-match-static-mode-after-click-simulation-1-0c21f.snap.png deleted file mode 100644 index 79cc3ddce2b..00000000000 Binary files a/packages/dnb-eufemia/src/components/step-indicator/__tests__/__snapshots__/step-indicator-screenshot-test-js-step-indicator-screenshot-have-to-match-static-mode-after-click-simulation-1-0c21f.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/step-indicator/__tests__/__snapshots__/step-indicator-screenshot-test-js-step-indicator-screenshot-have-to-match-strict-mode-1-9f730.snap.png b/packages/dnb-eufemia/src/components/step-indicator/__tests__/__snapshots__/step-indicator-screenshot-test-js-step-indicator-screenshot-have-to-match-strict-mode-1-9f730.snap.png deleted file mode 100644 index 444853f340b..00000000000 Binary files a/packages/dnb-eufemia/src/components/step-indicator/__tests__/__snapshots__/step-indicator-screenshot-test-js-step-indicator-screenshot-have-to-match-strict-mode-1-9f730.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/step-indicator/__tests__/__snapshots__/step-indicator-screenshot-test-js-step-indicator-screenshot-have-to-match-strict-mode-after-click-simulation-1-f42d5.snap.png b/packages/dnb-eufemia/src/components/step-indicator/__tests__/__snapshots__/step-indicator-screenshot-test-js-step-indicator-screenshot-have-to-match-strict-mode-after-click-simulation-1-f42d5.snap.png deleted file mode 100644 index 9bea0d27aa4..00000000000 Binary files a/packages/dnb-eufemia/src/components/step-indicator/__tests__/__snapshots__/step-indicator-screenshot-test-js-step-indicator-screenshot-have-to-match-strict-mode-after-click-simulation-1-f42d5.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/step-indicator/__tests__/__snapshots__/step-indicator-screenshot-test-js-step-indicator-screenshot-have-to-match-strict-mode-for-small-screens-1-4e70f.snap.png b/packages/dnb-eufemia/src/components/step-indicator/__tests__/__snapshots__/step-indicator-screenshot-test-js-step-indicator-screenshot-have-to-match-strict-mode-for-small-screens-1-4e70f.snap.png deleted file mode 100644 index 3413e5d9800..00000000000 Binary files a/packages/dnb-eufemia/src/components/step-indicator/__tests__/__snapshots__/step-indicator-screenshot-test-js-step-indicator-screenshot-have-to-match-strict-mode-for-small-screens-1-4e70f.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/step-indicator/__tests__/__snapshots__/step-indicator-screenshot-test-js-step-indicator-screenshot-have-to-match-strict-mode-for-small-screens-after-click-simulation-1-cdbb8.snap.png b/packages/dnb-eufemia/src/components/step-indicator/__tests__/__snapshots__/step-indicator-screenshot-test-js-step-indicator-screenshot-have-to-match-strict-mode-for-small-screens-after-click-simulation-1-cdbb8.snap.png deleted file mode 100644 index 66a0d484400..00000000000 Binary files a/packages/dnb-eufemia/src/components/step-indicator/__tests__/__snapshots__/step-indicator-screenshot-test-js-step-indicator-screenshot-have-to-match-strict-mode-for-small-screens-after-click-simulation-1-cdbb8.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/switch/__tests__/Switch.screenshot.test.js b/packages/dnb-eufemia/src/components/switch/__tests__/Switch.screenshot.test.js deleted file mode 100644 index 87a990a4247..00000000000 --- a/packages/dnb-eufemia/src/components/switch/__tests__/Switch.screenshot.test.js +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -describe('Switch unchecked screenshot', () => { - setupPageScreenshot({ url: '/uilib/components/switch/demos' }) - - it('have to match switch in unchecked state', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="switch-default"] .dnb-switch', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match switch in unchecked state with focus', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="switch-default"] .dnb-switch', - simulateSelector: - '[data-visual-test="switch-default"] .dnb-switch__input', - simulate: 'focus', // should be tested first - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match switch in unchecked state with hover', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="switch-default"] .dnb-switch', - simulateSelector: - '[data-visual-test="switch-default"] .dnb-switch__input', - simulate: 'hover', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -// NB: Because of focus simulation and screenshotElement.press('Tab') -// we have to run the two focus simulations in a separate run each -describe('Switch checked screenshot', () => { - setupPageScreenshot({ url: '/uilib/components/switch/demos' }) - - it('have to match switch in checked state', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="switch-checked"] .dnb-switch', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match switch in checked state with focus', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="switch-checked"] .dnb-switch', - simulateSelector: - '[data-visual-test="switch-checked"] .dnb-switch__input', - simulate: 'focus', // should be tested first - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match switch in checked state with hover', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="switch-checked"] .dnb-switch', - simulateSelector: - '[data-visual-test="switch-checked"] .dnb-switch__input', - simulate: 'hover', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match switch in different sizes', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="switch-sizes"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match disabled switch', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="switch-disabled"] .dnb-switch', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match switch in error state', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="switch-error"] .dnb-switch', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/components/switch/__tests__/Switch.screenshot.test.ts b/packages/dnb-eufemia/src/components/switch/__tests__/Switch.screenshot.test.ts new file mode 100644 index 00000000000..2c8853ba731 --- /dev/null +++ b/packages/dnb-eufemia/src/components/switch/__tests__/Switch.screenshot.test.ts @@ -0,0 +1,94 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../../core/jest/jestSetupScreenshots' + +describe('Switch unchecked', () => { + setupPageScreenshot({ url: '/uilib/components/switch/demos' }) + + it('have to match switch in unchecked state', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="switch-default"] .dnb-switch', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match switch in unchecked state with focus', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="switch-default"] .dnb-switch', + simulateSelector: + '[data-visual-test="switch-default"] .dnb-switch__input', + simulate: 'focus', // should be tested first + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match switch in unchecked state with hover', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="switch-default"] .dnb-switch', + simulateSelector: + '[data-visual-test="switch-default"] .dnb-switch__input', + simulate: 'hover', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) + +// NB: Because of focus simulation and screenshotElement.press('Tab') +// we have to run the two focus simulations in a separate run each +describe('Switch checked', () => { + setupPageScreenshot({ url: '/uilib/components/switch/demos' }) + + it('have to match switch in checked state', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="switch-checked"] .dnb-switch', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match switch in checked state with focus', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="switch-checked"] .dnb-switch', + simulateSelector: + '[data-visual-test="switch-checked"] .dnb-switch__input', + simulate: 'focus', // should be tested first + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match switch in checked state with hover', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="switch-checked"] .dnb-switch', + simulateSelector: + '[data-visual-test="switch-checked"] .dnb-switch__input', + simulate: 'hover', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match switch in different sizes', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="switch-sizes"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match disabled switch', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="switch-disabled"] .dnb-switch', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match switch in error state', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="switch-error"] .dnb-switch', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/components/switch/__tests__/__image_snapshots__/switch-checked-have-to-match-disabled-switch.snap.png b/packages/dnb-eufemia/src/components/switch/__tests__/__image_snapshots__/switch-checked-have-to-match-disabled-switch.snap.png new file mode 100644 index 00000000000..fd5c9a9cb62 Binary files /dev/null and b/packages/dnb-eufemia/src/components/switch/__tests__/__image_snapshots__/switch-checked-have-to-match-disabled-switch.snap.png differ diff --git a/packages/dnb-eufemia/src/components/switch/__tests__/__image_snapshots__/switch-checked-have-to-match-switch-in-checked-state-with-focus.snap.png b/packages/dnb-eufemia/src/components/switch/__tests__/__image_snapshots__/switch-checked-have-to-match-switch-in-checked-state-with-focus.snap.png new file mode 100644 index 00000000000..290ba9e51d5 Binary files /dev/null and b/packages/dnb-eufemia/src/components/switch/__tests__/__image_snapshots__/switch-checked-have-to-match-switch-in-checked-state-with-focus.snap.png differ diff --git a/packages/dnb-eufemia/src/components/switch/__tests__/__image_snapshots__/switch-checked-have-to-match-switch-in-checked-state-with-hover.snap.png b/packages/dnb-eufemia/src/components/switch/__tests__/__image_snapshots__/switch-checked-have-to-match-switch-in-checked-state-with-hover.snap.png new file mode 100644 index 00000000000..f2bf66fe41f Binary files /dev/null and b/packages/dnb-eufemia/src/components/switch/__tests__/__image_snapshots__/switch-checked-have-to-match-switch-in-checked-state-with-hover.snap.png differ diff --git a/packages/dnb-eufemia/src/components/switch/__tests__/__image_snapshots__/switch-checked-have-to-match-switch-in-checked-state.snap.png b/packages/dnb-eufemia/src/components/switch/__tests__/__image_snapshots__/switch-checked-have-to-match-switch-in-checked-state.snap.png new file mode 100644 index 00000000000..f318d35489d Binary files /dev/null and b/packages/dnb-eufemia/src/components/switch/__tests__/__image_snapshots__/switch-checked-have-to-match-switch-in-checked-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/switch/__tests__/__image_snapshots__/switch-checked-have-to-match-switch-in-different-sizes.snap.png b/packages/dnb-eufemia/src/components/switch/__tests__/__image_snapshots__/switch-checked-have-to-match-switch-in-different-sizes.snap.png new file mode 100644 index 00000000000..ef27158950b Binary files /dev/null and b/packages/dnb-eufemia/src/components/switch/__tests__/__image_snapshots__/switch-checked-have-to-match-switch-in-different-sizes.snap.png differ diff --git a/packages/dnb-eufemia/src/components/switch/__tests__/__image_snapshots__/switch-checked-have-to-match-switch-in-error-state.snap.png b/packages/dnb-eufemia/src/components/switch/__tests__/__image_snapshots__/switch-checked-have-to-match-switch-in-error-state.snap.png new file mode 100644 index 00000000000..a5328ac22ef Binary files /dev/null and b/packages/dnb-eufemia/src/components/switch/__tests__/__image_snapshots__/switch-checked-have-to-match-switch-in-error-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/switch/__tests__/__image_snapshots__/switch-unchecked-have-to-match-switch-in-unchecked-state-with-focus.snap.png b/packages/dnb-eufemia/src/components/switch/__tests__/__image_snapshots__/switch-unchecked-have-to-match-switch-in-unchecked-state-with-focus.snap.png new file mode 100644 index 00000000000..31691a82db4 Binary files /dev/null and b/packages/dnb-eufemia/src/components/switch/__tests__/__image_snapshots__/switch-unchecked-have-to-match-switch-in-unchecked-state-with-focus.snap.png differ diff --git a/packages/dnb-eufemia/src/components/switch/__tests__/__image_snapshots__/switch-unchecked-have-to-match-switch-in-unchecked-state-with-hover.snap.png b/packages/dnb-eufemia/src/components/switch/__tests__/__image_snapshots__/switch-unchecked-have-to-match-switch-in-unchecked-state-with-hover.snap.png new file mode 100644 index 00000000000..41ae60ca663 Binary files /dev/null and b/packages/dnb-eufemia/src/components/switch/__tests__/__image_snapshots__/switch-unchecked-have-to-match-switch-in-unchecked-state-with-hover.snap.png differ diff --git a/packages/dnb-eufemia/src/components/switch/__tests__/__image_snapshots__/switch-unchecked-have-to-match-switch-in-unchecked-state.snap.png b/packages/dnb-eufemia/src/components/switch/__tests__/__image_snapshots__/switch-unchecked-have-to-match-switch-in-unchecked-state.snap.png new file mode 100644 index 00000000000..547267464bb Binary files /dev/null and b/packages/dnb-eufemia/src/components/switch/__tests__/__image_snapshots__/switch-unchecked-have-to-match-switch-in-unchecked-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/switch/__tests__/__snapshots__/switch-screenshot-test-js-switch-checked-screenshot-have-to-match-disabled-switch-1-bca2f.snap.png b/packages/dnb-eufemia/src/components/switch/__tests__/__snapshots__/switch-screenshot-test-js-switch-checked-screenshot-have-to-match-disabled-switch-1-bca2f.snap.png deleted file mode 100644 index 0bc8eae29d0..00000000000 Binary files a/packages/dnb-eufemia/src/components/switch/__tests__/__snapshots__/switch-screenshot-test-js-switch-checked-screenshot-have-to-match-disabled-switch-1-bca2f.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/switch/__tests__/__snapshots__/switch-screenshot-test-js-switch-checked-screenshot-have-to-match-switch-in-checked-state-1-3982f.snap.png b/packages/dnb-eufemia/src/components/switch/__tests__/__snapshots__/switch-screenshot-test-js-switch-checked-screenshot-have-to-match-switch-in-checked-state-1-3982f.snap.png deleted file mode 100644 index 8d6187ff9c6..00000000000 Binary files a/packages/dnb-eufemia/src/components/switch/__tests__/__snapshots__/switch-screenshot-test-js-switch-checked-screenshot-have-to-match-switch-in-checked-state-1-3982f.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/switch/__tests__/__snapshots__/switch-screenshot-test-js-switch-checked-screenshot-have-to-match-switch-in-checked-state-with-focus-1-191f7.snap.png b/packages/dnb-eufemia/src/components/switch/__tests__/__snapshots__/switch-screenshot-test-js-switch-checked-screenshot-have-to-match-switch-in-checked-state-with-focus-1-191f7.snap.png deleted file mode 100644 index c5b947764dd..00000000000 Binary files a/packages/dnb-eufemia/src/components/switch/__tests__/__snapshots__/switch-screenshot-test-js-switch-checked-screenshot-have-to-match-switch-in-checked-state-with-focus-1-191f7.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/switch/__tests__/__snapshots__/switch-screenshot-test-js-switch-checked-screenshot-have-to-match-switch-in-checked-state-with-hover-1-b010a.snap.png b/packages/dnb-eufemia/src/components/switch/__tests__/__snapshots__/switch-screenshot-test-js-switch-checked-screenshot-have-to-match-switch-in-checked-state-with-hover-1-b010a.snap.png deleted file mode 100644 index 5745d2c2f0e..00000000000 Binary files a/packages/dnb-eufemia/src/components/switch/__tests__/__snapshots__/switch-screenshot-test-js-switch-checked-screenshot-have-to-match-switch-in-checked-state-with-hover-1-b010a.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/switch/__tests__/__snapshots__/switch-screenshot-test-js-switch-checked-screenshot-have-to-match-switch-in-different-sizes-1-a2cdf.snap.png b/packages/dnb-eufemia/src/components/switch/__tests__/__snapshots__/switch-screenshot-test-js-switch-checked-screenshot-have-to-match-switch-in-different-sizes-1-a2cdf.snap.png deleted file mode 100644 index bcef980a0c9..00000000000 Binary files a/packages/dnb-eufemia/src/components/switch/__tests__/__snapshots__/switch-screenshot-test-js-switch-checked-screenshot-have-to-match-switch-in-different-sizes-1-a2cdf.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/switch/__tests__/__snapshots__/switch-screenshot-test-js-switch-checked-screenshot-have-to-match-switch-in-error-state-1-83a9c.snap.png b/packages/dnb-eufemia/src/components/switch/__tests__/__snapshots__/switch-screenshot-test-js-switch-checked-screenshot-have-to-match-switch-in-error-state-1-83a9c.snap.png deleted file mode 100644 index daf711b7fe2..00000000000 Binary files a/packages/dnb-eufemia/src/components/switch/__tests__/__snapshots__/switch-screenshot-test-js-switch-checked-screenshot-have-to-match-switch-in-error-state-1-83a9c.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/switch/__tests__/__snapshots__/switch-screenshot-test-js-switch-unchecked-screenshot-have-to-match-switch-in-unchecked-state-1-0a34a.snap.png b/packages/dnb-eufemia/src/components/switch/__tests__/__snapshots__/switch-screenshot-test-js-switch-unchecked-screenshot-have-to-match-switch-in-unchecked-state-1-0a34a.snap.png deleted file mode 100644 index d931a1c8538..00000000000 Binary files a/packages/dnb-eufemia/src/components/switch/__tests__/__snapshots__/switch-screenshot-test-js-switch-unchecked-screenshot-have-to-match-switch-in-unchecked-state-1-0a34a.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/switch/__tests__/__snapshots__/switch-screenshot-test-js-switch-unchecked-screenshot-have-to-match-switch-in-unchecked-state-with-focus-1-60ced.snap.png b/packages/dnb-eufemia/src/components/switch/__tests__/__snapshots__/switch-screenshot-test-js-switch-unchecked-screenshot-have-to-match-switch-in-unchecked-state-with-focus-1-60ced.snap.png deleted file mode 100644 index 41128e0cfc5..00000000000 Binary files a/packages/dnb-eufemia/src/components/switch/__tests__/__snapshots__/switch-screenshot-test-js-switch-unchecked-screenshot-have-to-match-switch-in-unchecked-state-with-focus-1-60ced.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/switch/__tests__/__snapshots__/switch-screenshot-test-js-switch-unchecked-screenshot-have-to-match-switch-in-unchecked-state-with-hover-1-50039.snap.png b/packages/dnb-eufemia/src/components/switch/__tests__/__snapshots__/switch-screenshot-test-js-switch-unchecked-screenshot-have-to-match-switch-in-unchecked-state-with-hover-1-50039.snap.png deleted file mode 100644 index 86aa5d96c3d..00000000000 Binary files a/packages/dnb-eufemia/src/components/switch/__tests__/__snapshots__/switch-screenshot-test-js-switch-unchecked-screenshot-have-to-match-switch-in-unchecked-state-with-hover-1-50039.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/table/__tests__/Table.screenshot.test.ts b/packages/dnb-eufemia/src/components/table/__tests__/Table.screenshot.test.ts new file mode 100644 index 00000000000..7bdc949a7d0 --- /dev/null +++ b/packages/dnb-eufemia/src/components/table/__tests__/Table.screenshot.test.ts @@ -0,0 +1,266 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../../core/jest/jestSetupScreenshots' + +describe('Table', () => { + setupPageScreenshot({ url: '/uilib/components/table/demos' }) + + it('have to match the default choice of table styles', async () => { + const screenshot = await makeScreenshot({ + style: { + width: '30rem', + }, + selector: '[data-visual-test="table-default"] .dnb-table', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match a complex table layout', async () => { + const screenshot = await makeScreenshot({ + style: { + width: '50rem', + }, + selector: '[data-visual-test="table-complex"] .dnb-table', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match a row scope only table layout', async () => { + const screenshot = await testPageScreenshot({ + selector: '[data-visual-test="table-row-scope-only"] .dnb-table', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match a fixed table layout', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="table-fixed"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match table container', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="table-container"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match table empty container head and foot', async () => { + const screenshot = await testPageScreenshot({ + selector: '[data-visual-test="table-container-empty"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match table in medium size', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="table-size-medium"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match table in small size', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="table-size-small"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match header with wrapped text', async () => { + const selector = '[data-visual-test="table-header"] .dnb-table' + const screenshot = await makeScreenshot({ + style: { + width: '40rem', + }, + selector, + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match sticky header', async () => { + const selector = '[data-visual-test="table-sticky"]' + const screenshot = await makeScreenshot({ + style: { + width: '30rem', + }, + selector, + executeBeforeSimulate: () => { + document + .querySelector( + '[data-visual-test="table-sticky"] table tbody tr:nth-of-type(5)' + ) + .scrollIntoView({ + behavior: 'auto', + }) + }, + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) + +describe('Table', () => { + setupPageScreenshot({ url: '/uilib/components/table/demos' }) + + // should be tested first + it('have to match a sortable table header on focus', async () => { + const selector = + '[data-visual-test="table-classes"] th.dnb-table--sortable.dnb-table--reversed' + const screenshot = await makeScreenshot({ + selector, + simulateSelector: `${selector} .dnb-button`, + simulate: 'focus', + wrapperStyle: { margin: 0 }, // will only add a padding, but avoid a negative margin + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match a sortable table header on active', async () => { + const selector = + '[data-visual-test="table-classes"] th.dnb-table--sortable.dnb-table--reversed' + const screenshot = await makeScreenshot({ + selector, + simulateSelector: `${selector} .dnb-button`, + simulate: 'active', + wrapperStyle: { margin: 0 }, // will only add a padding, but avoid a negative margin + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match a active sortable table header on active state', async () => { + const selector = + '[data-visual-test="table-classes"] th.dnb-table--sortable.dnb-table--active' + const screenshot = await makeScreenshot({ + selector, + simulateSelector: `${selector} .dnb-button`, + simulate: 'active', + wrapperStyle: { margin: 0 }, // will only add a padding, but avoid a negative margin + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match a sortable table header on hover', async () => { + const selector = + '[data-visual-test="table-classes"] th.dnb-table--sortable.dnb-table--reversed' + const screenshot = await makeScreenshot({ + selector, + simulateSelector: `${selector} .dnb-button`, + simulate: 'hover', + wrapperStyle: { margin: '0 2rem 0 0' }, // will only add a padding, but avoid a negative margin + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) + +describe('Table with skeleton', () => { + setupPageScreenshot({ url: '/uilib/components/table/demos?skeleton' }) + + it('have to match default table', async () => { + const screenshot = await makeScreenshot({ + style: { + width: '40rem', + }, + selector: '[data-visual-test="table-default"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) + +describe('Table with accordion', () => { + const url = '/uilib/components/table' + + it('have to match default state', async () => { + const screenshot = await makeScreenshot({ + url, + style: { + width: '35rem', + }, + selector: '[data-visual-test="table-accordion"] .dnb-table', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match hover state on first row', async () => { + const screenshot = await makeScreenshot({ + url, + style: { + width: '35rem', + }, + selector: + '[data-visual-test="table-accordion"] .dnb-scroll-view:last-of-type', + simulateSelector: + '[data-visual-test="table-accordion"] .dnb-scroll-view:last-of-type tbody tr:first-of-type', + simulate: 'hover', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match hover state on last row', async () => { + const screenshot = await makeScreenshot({ + url, + style: { + width: '35rem', + }, + selector: + '[data-visual-test="table-accordion"] .dnb-scroll-view:last-of-type', + simulateSelector: + '[data-visual-test="table-accordion"] .dnb-scroll-view:last-of-type tbody tr:nth-last-child(2)', + simulate: 'hover', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match focus state on last row', async () => { + const screenshot = await makeScreenshot({ + url, + style: { + width: '35rem', + }, + selector: + '[data-visual-test="table-accordion"] .dnb-scroll-view:last-of-type', + simulateSelector: + '[data-visual-test="table-accordion"] .dnb-scroll-view:last-of-type tbody tr:nth-last-child(2)', + simulate: 'focus', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match active state on last row', async () => { + const screenshot = await makeScreenshot({ + url, + style: { + width: '35rem', + }, + selector: + '[data-visual-test="table-accordion"] .dnb-scroll-view:last-of-type', + simulateSelector: + '[data-visual-test="table-accordion"] .dnb-scroll-view:last-of-type tbody tr:nth-last-child(2)', + simulate: 'active', + }) + expect(screenshot).toMatchImageSnapshot({ + failureThreshold: 0.01, // locally as well + }) + }) + + it('have to match expanded state on first row', async () => { + const screenshot = await makeScreenshot({ + url, + style: { + width: '35rem', + height: '20rem', + }, + selector: + '[data-visual-test="table-accordion"] .dnb-scroll-view:last-of-type', + simulateSelector: + '[data-visual-test="table-accordion"] .dnb-scroll-view:last-of-type tbody tr:first-of-type', + simulate: 'click', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/components/table/__tests__/Table.screenshot.test.tsx b/packages/dnb-eufemia/src/components/table/__tests__/Table.screenshot.test.tsx deleted file mode 100644 index 09b72c0a00f..00000000000 --- a/packages/dnb-eufemia/src/components/table/__tests__/Table.screenshot.test.tsx +++ /dev/null @@ -1,258 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -describe('Table screenshot', () => { - setupPageScreenshot({ url: '/uilib/components/table/demos' }) - - it('have to match the default choice of table styles', async () => { - const screenshot = await testPageScreenshot({ - style: { - width: '30rem', - }, - selector: '[data-visual-test="table-default"] .dnb-table', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match a complex table layout', async () => { - const screenshot = await testPageScreenshot({ - style: { - width: '50rem', - }, - selector: '[data-visual-test="table-complex"] .dnb-table', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match a row scope only table layout', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="table-row-scope-only"] .dnb-table', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match a fixed table layout', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="table-fixed"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match table container', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="table-container"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match table empty container head and foot', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="table-container-empty"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match table in medium size', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="table-size-medium"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match table in small size', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="table-size-small"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match header with wrapped text', async () => { - const selector = '[data-visual-test="table-header"] .dnb-table' - const screenshot = await testPageScreenshot({ - style: { - width: '40rem', - }, - selector, - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match sticky header', async () => { - const selector = '[data-visual-test="table-sticky"]' - const screenshot = await testPageScreenshot({ - style: { - width: '30rem', - }, - selector, - executeBeforeSimulate: () => { - document - .querySelector( - '[data-visual-test="table-sticky"] table tbody tr:nth-of-type(5)' - ) - .scrollIntoView({ - behavior: 'auto', - }) - }, - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Table screenshot', () => { - setupPageScreenshot({ url: '/uilib/components/table/demos' }) - - // should be tested first - it('have to match a sortable table header on focus', async () => { - const selector = - '[data-visual-test="table-classes"] th.dnb-table--sortable.dnb-table--reversed' - const screenshot = await testPageScreenshot({ - selector, - simulateSelector: `${selector} .dnb-button`, - simulate: 'focus', - wrapperStyle: { margin: 0 }, // will only add a padding, but avoid a negative margin - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match a sortable table header on active', async () => { - const selector = - '[data-visual-test="table-classes"] th.dnb-table--sortable.dnb-table--reversed' - const screenshot = await testPageScreenshot({ - selector, - simulateSelector: `${selector} .dnb-button`, - simulate: 'active', - wrapperStyle: { margin: 0 }, // will only add a padding, but avoid a negative margin - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match a active sortable table header on active state', async () => { - const selector = - '[data-visual-test="table-classes"] th.dnb-table--sortable.dnb-table--active' - const screenshot = await testPageScreenshot({ - selector, - simulateSelector: `${selector} .dnb-button`, - simulate: 'active', - wrapperStyle: { margin: 0 }, // will only add a padding, but avoid a negative margin - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match a sortable table header on hover', async () => { - const selector = - '[data-visual-test="table-classes"] th.dnb-table--sortable.dnb-table--reversed' - const screenshot = await testPageScreenshot({ - selector, - simulateSelector: `${selector} .dnb-button`, - simulate: 'hover', - wrapperStyle: { margin: '0 2rem 0 0' }, // will only add a padding, but avoid a negative margin - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Table with skeleton screenshot', () => { - setupPageScreenshot({ url: '/uilib/components/table/demos?skeleton' }) - - it('have to match default table', async () => { - const screenshot = await testPageScreenshot({ - style: { - width: '40rem', - }, - selector: '[data-visual-test="table-default"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Table with accordion screenshot', () => { - setupPageScreenshot({ url: '/uilib/components/table' }) - - it('have to match default state', async () => { - const screenshot = await testPageScreenshot({ - style: { - width: '35rem', - }, - selector: '[data-visual-test="table-accordion"] .dnb-table', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match hover state on first row', async () => { - const screenshot = await testPageScreenshot({ - style: { - width: '35rem', - }, - selector: - '[data-visual-test="table-accordion"] .dnb-scroll-view:last-of-type', - simulateSelector: - '[data-visual-test="table-accordion"] .dnb-scroll-view:last-of-type tbody tr:first-of-type', - simulate: 'hover', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match hover state on last row', async () => { - const screenshot = await testPageScreenshot({ - style: { - width: '35rem', - }, - selector: - '[data-visual-test="table-accordion"] .dnb-scroll-view:last-of-type', - simulateSelector: - '[data-visual-test="table-accordion"] .dnb-scroll-view:last-of-type tbody tr:nth-last-child(2)', - simulate: 'hover', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match focus state on last row', async () => { - const screenshot = await testPageScreenshot({ - style: { - width: '35rem', - }, - selector: - '[data-visual-test="table-accordion"] .dnb-scroll-view:last-of-type', - simulateSelector: - '[data-visual-test="table-accordion"] .dnb-scroll-view:last-of-type tbody tr:nth-last-child(2)', - simulate: 'focus', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match active state on last row', async () => { - const screenshot = await testPageScreenshot({ - style: { - width: '35rem', - }, - selector: - '[data-visual-test="table-accordion"] .dnb-scroll-view:last-of-type', - simulateSelector: - '[data-visual-test="table-accordion"] .dnb-scroll-view:last-of-type tbody tr:nth-last-child(2)', - simulate: 'active', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match expanded state on first row', async () => { - const screenshot = await testPageScreenshot({ - style: { - width: '35rem', - height: '20rem', - }, - selector: - '[data-visual-test="table-accordion"] .dnb-scroll-view:last-of-type', - simulateSelector: - '[data-visual-test="table-accordion"] .dnb-scroll-view:last-of-type tbody tr:first-of-type', - simulate: 'click', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-have-to-match-a-active-sortable-table-header-on-active-state.snap.png b/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-have-to-match-a-active-sortable-table-header-on-active-state.snap.png new file mode 100644 index 00000000000..a70cd1b0304 Binary files /dev/null and b/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-have-to-match-a-active-sortable-table-header-on-active-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-have-to-match-a-complex-table-layout.snap.png b/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-have-to-match-a-complex-table-layout.snap.png new file mode 100644 index 00000000000..7ebdb726c27 Binary files /dev/null and b/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-have-to-match-a-complex-table-layout.snap.png differ diff --git a/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-have-to-match-a-fixed-table-layout.snap.png b/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-have-to-match-a-fixed-table-layout.snap.png new file mode 100644 index 00000000000..aa1d270563c Binary files /dev/null and b/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-have-to-match-a-fixed-table-layout.snap.png differ diff --git a/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-have-to-match-a-sortable-table-header-on-active.snap.png b/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-have-to-match-a-sortable-table-header-on-active.snap.png new file mode 100644 index 00000000000..ed2c09838ed Binary files /dev/null and b/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-have-to-match-a-sortable-table-header-on-active.snap.png differ diff --git a/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-have-to-match-a-sortable-table-header-on-focus.snap.png b/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-have-to-match-a-sortable-table-header-on-focus.snap.png new file mode 100644 index 00000000000..ed2c09838ed Binary files /dev/null and b/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-have-to-match-a-sortable-table-header-on-focus.snap.png differ diff --git a/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-have-to-match-a-sortable-table-header-on-hover.snap.png b/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-have-to-match-a-sortable-table-header-on-hover.snap.png new file mode 100644 index 00000000000..4b41caf064f Binary files /dev/null and b/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-have-to-match-a-sortable-table-header-on-hover.snap.png differ diff --git a/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-have-to-match-header-with-wrapped-text.snap.png b/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-have-to-match-header-with-wrapped-text.snap.png new file mode 100644 index 00000000000..fc2cea6b86f Binary files /dev/null and b/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-have-to-match-header-with-wrapped-text.snap.png differ diff --git a/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-have-to-match-sticky-header.snap.png b/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-have-to-match-sticky-header.snap.png new file mode 100644 index 00000000000..c9ff897a305 Binary files /dev/null and b/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-have-to-match-sticky-header.snap.png differ diff --git a/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-have-to-match-table-container.snap.png b/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-have-to-match-table-container.snap.png new file mode 100644 index 00000000000..39c47a3dbeb Binary files /dev/null and b/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-have-to-match-table-container.snap.png differ diff --git a/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-have-to-match-table-in-medium-size.snap.png b/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-have-to-match-table-in-medium-size.snap.png new file mode 100644 index 00000000000..70cf4086fae Binary files /dev/null and b/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-have-to-match-table-in-medium-size.snap.png differ diff --git a/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-have-to-match-table-in-small-size.snap.png b/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-have-to-match-table-in-small-size.snap.png new file mode 100644 index 00000000000..c6cbfaeac3e Binary files /dev/null and b/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-have-to-match-table-in-small-size.snap.png differ diff --git a/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-have-to-match-the-default-choice-of-table-styles.snap.png b/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-have-to-match-the-default-choice-of-table-styles.snap.png new file mode 100644 index 00000000000..e2120e5967a Binary files /dev/null and b/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-have-to-match-the-default-choice-of-table-styles.snap.png differ diff --git a/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-with-accordion-have-to-match-active-state-on-last-row.snap.png b/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-with-accordion-have-to-match-active-state-on-last-row.snap.png new file mode 100644 index 00000000000..c324d3c36fd Binary files /dev/null and b/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-with-accordion-have-to-match-active-state-on-last-row.snap.png differ diff --git a/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-with-accordion-have-to-match-default-state.snap.png b/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-with-accordion-have-to-match-default-state.snap.png new file mode 100644 index 00000000000..15c313ee9d5 Binary files /dev/null and b/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-with-accordion-have-to-match-default-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-with-accordion-have-to-match-expanded-state-on-first-row.snap.png b/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-with-accordion-have-to-match-expanded-state-on-first-row.snap.png new file mode 100644 index 00000000000..a2531876170 Binary files /dev/null and b/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-with-accordion-have-to-match-expanded-state-on-first-row.snap.png differ diff --git a/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-with-accordion-have-to-match-focus-state-on-last-row.snap.png b/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-with-accordion-have-to-match-focus-state-on-last-row.snap.png new file mode 100644 index 00000000000..bc0e4bfd790 Binary files /dev/null and b/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-with-accordion-have-to-match-focus-state-on-last-row.snap.png differ diff --git a/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-with-accordion-have-to-match-hover-state-on-first-row.snap.png b/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-with-accordion-have-to-match-hover-state-on-first-row.snap.png new file mode 100644 index 00000000000..491f29ea145 Binary files /dev/null and b/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-with-accordion-have-to-match-hover-state-on-first-row.snap.png differ diff --git a/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-with-accordion-have-to-match-hover-state-on-last-row.snap.png b/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-with-accordion-have-to-match-hover-state-on-last-row.snap.png new file mode 100644 index 00000000000..b316c4c04f9 Binary files /dev/null and b/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-with-accordion-have-to-match-hover-state-on-last-row.snap.png differ diff --git a/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-with-skeleton-have-to-match-default-table.snap.png b/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-with-skeleton-have-to-match-default-table.snap.png new file mode 100644 index 00000000000..726f31cdc0e Binary files /dev/null and b/packages/dnb-eufemia/src/components/table/__tests__/__image_snapshots__/table-with-skeleton-have-to-match-default-table.snap.png differ diff --git a/packages/dnb-eufemia/src/components/table/__tests__/__snapshots__/Table.test.tsx.snap b/packages/dnb-eufemia/src/components/table/__tests__/__snapshots__/Table.test.tsx.snap index e06969e784b..1f174803c2c 100644 --- a/packages/dnb-eufemia/src/components/table/__tests__/__snapshots__/Table.test.tsx.snap +++ b/packages/dnb-eufemia/src/components/table/__tests__/__snapshots__/Table.test.tsx.snap @@ -162,7 +162,7 @@ exports[`Table scss have to match snapshot 1`] = ` opacity: 0; transition: opacity 200ms ease-out, transform 500ms ease-out; } -[data-visual-test-wrapper] .dnb-table > thead > tr > th.dnb-table--sortable .dnb-table__sort-button.dnb-button > .dnb-icon, [data-visual-test-wrapper] .dnb-table .dnb-table__th.dnb-table--sortable .dnb-table__sort-button.dnb-button > .dnb-icon { +html[data-visual-test] .dnb-table > thead > tr > th.dnb-table--sortable .dnb-table__sort-button.dnb-button > .dnb-icon, html[data-visual-test] .dnb-table .dnb-table__th.dnb-table--sortable .dnb-table__sort-button.dnb-button > .dnb-icon { transition: none; } .dnb-table > thead > tr > th.dnb-table--sortable .dnb-table__sort-button.dnb-button .dnb-button__text, .dnb-table .dnb-table__th.dnb-table--sortable .dnb-table__sort-button.dnb-button .dnb-button__text { diff --git a/packages/dnb-eufemia/src/components/table/__tests__/__snapshots__/table-screenshot-test-tsx-table-screenshot-have-to-match-a-active-sortable-table-header-on-active-state-1-56bc7.snap.png b/packages/dnb-eufemia/src/components/table/__tests__/__snapshots__/table-screenshot-test-tsx-table-screenshot-have-to-match-a-active-sortable-table-header-on-active-state-1-56bc7.snap.png deleted file mode 100644 index a9f323c275f..00000000000 Binary files a/packages/dnb-eufemia/src/components/table/__tests__/__snapshots__/table-screenshot-test-tsx-table-screenshot-have-to-match-a-active-sortable-table-header-on-active-state-1-56bc7.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/table/__tests__/__snapshots__/table-screenshot-test-tsx-table-screenshot-have-to-match-a-sortable-table-header-on-active-1-69e38.snap.png b/packages/dnb-eufemia/src/components/table/__tests__/__snapshots__/table-screenshot-test-tsx-table-screenshot-have-to-match-a-sortable-table-header-on-active-1-69e38.snap.png deleted file mode 100644 index bf5448edca2..00000000000 Binary files a/packages/dnb-eufemia/src/components/table/__tests__/__snapshots__/table-screenshot-test-tsx-table-screenshot-have-to-match-a-sortable-table-header-on-active-1-69e38.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/table/__tests__/__snapshots__/table-screenshot-test-tsx-table-screenshot-have-to-match-a-sortable-table-header-on-focus-1-7afe2.snap.png b/packages/dnb-eufemia/src/components/table/__tests__/__snapshots__/table-screenshot-test-tsx-table-screenshot-have-to-match-a-sortable-table-header-on-focus-1-7afe2.snap.png deleted file mode 100644 index a6657be98e8..00000000000 Binary files a/packages/dnb-eufemia/src/components/table/__tests__/__snapshots__/table-screenshot-test-tsx-table-screenshot-have-to-match-a-sortable-table-header-on-focus-1-7afe2.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/table/__tests__/__snapshots__/table-screenshot-test-tsx-table-screenshot-have-to-match-a-sortable-table-header-on-hover-1-76257.snap.png b/packages/dnb-eufemia/src/components/table/__tests__/__snapshots__/table-screenshot-test-tsx-table-screenshot-have-to-match-a-sortable-table-header-on-hover-1-76257.snap.png deleted file mode 100644 index 2ac117359d7..00000000000 Binary files a/packages/dnb-eufemia/src/components/table/__tests__/__snapshots__/table-screenshot-test-tsx-table-screenshot-have-to-match-a-sortable-table-header-on-hover-1-76257.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/table/__tests__/__snapshots__/table-screenshot-test-tsx-table-screenshot-have-to-match-sticky-header-1-4aef0.snap.png b/packages/dnb-eufemia/src/components/table/__tests__/__snapshots__/table-screenshot-test-tsx-table-screenshot-have-to-match-sticky-header-1-4aef0.snap.png deleted file mode 100644 index 8c4b47cc4bd..00000000000 Binary files a/packages/dnb-eufemia/src/components/table/__tests__/__snapshots__/table-screenshot-test-tsx-table-screenshot-have-to-match-sticky-header-1-4aef0.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/table/style/table-header-buttons.scss b/packages/dnb-eufemia/src/components/table/style/table-header-buttons.scss index 8b4578cac06..41c18694e5c 100644 --- a/packages/dnb-eufemia/src/components/table/style/table-header-buttons.scss +++ b/packages/dnb-eufemia/src/components/table/style/table-header-buttons.scss @@ -21,7 +21,7 @@ > .dnb-icon { opacity: 0; transition: opacity 200ms ease-out, transform 500ms ease-out; - [data-visual-test-wrapper] & { + html[data-visual-test] & { transition: none; } } diff --git a/packages/dnb-eufemia/src/components/tabs/__tests__/Tabs.screenshot.test.js b/packages/dnb-eufemia/src/components/tabs/__tests__/Tabs.screenshot.test.js deleted file mode 100644 index e7c990a1f32..00000000000 --- a/packages/dnb-eufemia/src/components/tabs/__tests__/Tabs.screenshot.test.js +++ /dev/null @@ -1,208 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -describe('Tabs screenshot', () => { - setupPageScreenshot({ url: '/uilib/components/tabs/demos' }) - - it('have to match the "Tablist"', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="tabs-tablist"] .dnb-tabs__tabs', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match a tablist with a click handler', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="tabs-clickhandler"] .dnb-tabs__tabs', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match horizontal aligned tabs', async () => { - const screenshot = await testPageScreenshot({ - style: { - width: '60rem', - }, - selector: '[data-visual-test="tabs-horizontal-aligned"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match max-width tabs', async () => { - const screenshot = await testPageScreenshot({ - style: { - width: '40rem', - height: '4rem', - }, - selector: '[data-visual-test="tabs-max-width"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match custom section styles', async () => { - const screenshot = await testPageScreenshot({ - style: { - width: '40rem', - height: '14rem', - padding: '0 2rem 4rem 2rem', - }, - selector: '[data-visual-test="tabs-section-styles"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match tabs with no bottom border', async () => { - const screenshot = await testPageScreenshot({ - style: { - width: '40rem', - height: '10rem', - padding: '0 2rem 4rem 2rem', - }, - selector: '[data-visual-test="tabs-no-border"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Tabs screenshot', () => { - setupPageScreenshot({ url: '/uilib/components/tabs/demos' }) - - it('have to match ignored scrollable tabs', async () => { - const screenshot = await testPageScreenshot({ - style: { - width: '80rem', - padding: '0 2rem 4rem 2rem', - }, - selector: '[data-visual-test="tabs-tablist-scrollable"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the "Tablist" on focus state', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="tabs-tablist"] .dnb-tabs__tabs', - style: { margin: '0 2rem' }, - simulateSelector: - '[data-visual-test="tabs-tablist"] .dnb-tabs__tabs__tablist', - simulate: 'focus', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match a tab button in focus state', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="tabs-tablist"] .dnb-tabs__tabs', - simulateSelector: - '[data-visual-test="tabs-tablist"] .dnb-tabs__tabs__tablist .dnb-tabs__button__snap:nth-of-type(2) button', - simulate: 'focus', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match tabs content with focus ring', async () => { - const screenshot = await testPageScreenshot({ - selector: - '[data-visual-test="tabs-section-styles"] .dnb-tabs__content', - simulateSelector: - '[data-visual-test="tabs-section-styles"] .dnb-tabs__content', - simulate: 'focus', - executeBeforeSimulate: () => { - document.documentElement.setAttribute('data-whatinput', 'keyboard') - }, - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Tabs screenshot', () => { - setupPageScreenshot({ - pageViewport: { - width: 480, // 30rem - }, - url: '/uilib/components/tabs/demos', - }) - - it('have to match scrollable tabs narrow', async () => { - const screenshot = await testPageScreenshot({ - style: { - width: '30rem', - padding: '0 3rem 4rem 3rem', - }, - selector: '[data-visual-test="tabs-tablist-scrollable"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Tabs screenshot', () => { - setupPageScreenshot({ - pageViewport: { - width: 800, // 50rem - }, - url: '/uilib/components/tabs/demos', - }) - - it('have to match scrollable tabs', async () => { - const screenshot = await testPageScreenshot({ - style: { - width: '50rem', - padding: '0 3rem 4rem 3rem', - }, - selector: '[data-visual-test="tabs-tablist-scrollable"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Tabs screenshot', () => { - setupPageScreenshot({ - pageViewport: { - width: 800, // 50rem - }, - url: '/uilib/components/tabs/demos', - }) - - it('have to match first scrollable tabs', async () => { - const screenshot = await testPageScreenshot({ - style: { - width: '50rem', - padding: '0 3rem 4rem 3rem', - }, - selector: '[data-visual-test="tabs-tablist-scrollable"]', - simulateSelector: - '[data-visual-test="tabs-tablist-scrollable"] .dnb-tabs__tabs__tablist .dnb-tabs__button__snap:first-of-type button', - simulate: 'click', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Tabs screenshot', () => { - setupPageScreenshot({ - pageViewport: { - width: 800, // 50rem - }, - url: '/uilib/components/tabs/demos', - }) - - it('have to match last scrollable tabs', async () => { - const screenshot = await testPageScreenshot({ - style: { - width: '50rem', - padding: '0 3rem 4rem 3rem', - }, - selector: '[data-visual-test="tabs-tablist-scrollable"]', - simulateSelector: - '[data-visual-test="tabs-tablist-scrollable"] .dnb-tabs__tabs__tablist .dnb-tabs__button__snap:last-of-type button', - simulate: 'click', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/components/tabs/__tests__/Tabs.screenshot.test.ts b/packages/dnb-eufemia/src/components/tabs/__tests__/Tabs.screenshot.test.ts new file mode 100644 index 00000000000..b5f6d3a65a3 --- /dev/null +++ b/packages/dnb-eufemia/src/components/tabs/__tests__/Tabs.screenshot.test.ts @@ -0,0 +1,189 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { makeScreenshot } from '../../../core/jest/jestSetupScreenshots' + +describe('Tabs', () => { + it('have to match the "Tablist"', async () => { + const screenshot = await makeScreenshot({ + url: '/uilib/components/tabs/demos', + selector: '[data-visual-test="tabs-tablist"] .dnb-tabs__tabs', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match a tablist with a click handler', async () => { + const screenshot = await makeScreenshot({ + url: '/uilib/components/tabs/demos', + selector: '[data-visual-test="tabs-clickhandler"] .dnb-tabs__tabs', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match horizontal aligned tabs', async () => { + const screenshot = await makeScreenshot({ + url: '/uilib/components/tabs/demos', + style: { + width: '60rem', + }, + selector: '[data-visual-test="tabs-horizontal-aligned"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match max-width tabs', async () => { + const screenshot = await makeScreenshot({ + url: '/uilib/components/tabs/demos', + style: { + width: '40rem', + height: '4rem', + }, + selector: '[data-visual-test="tabs-max-width"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match custom section styles', async () => { + const screenshot = await makeScreenshot({ + url: '/uilib/components/tabs/demos', + style: { + width: '40rem', + height: '14rem', + padding: '0 2rem 4rem 2rem', + }, + selector: '[data-visual-test="tabs-section-styles"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match tabs with no bottom border', async () => { + const screenshot = await makeScreenshot({ + url: '/uilib/components/tabs/demos', + style: { + width: '40rem', + height: '10rem', + padding: '0 2rem 4rem 2rem', + }, + selector: '[data-visual-test="tabs-no-border"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match ignored scrollable tabs', async () => { + const screenshot = await makeScreenshot({ + url: '/uilib/components/tabs/demos', + style: { + width: '80rem', + padding: '0 2rem 4rem 2rem', + }, + selector: '[data-visual-test="tabs-tablist-scrollable"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the "Tablist" on focus state', async () => { + const screenshot = await makeScreenshot({ + url: '/uilib/components/tabs/demos', + selector: '[data-visual-test="tabs-tablist"] .dnb-tabs__tabs', + style: { margin: '0 2rem' }, + simulateSelector: + '[data-visual-test="tabs-tablist"] .dnb-tabs__tabs__tablist', + simulate: 'focus', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match a tab button in focus state', async () => { + const screenshot = await makeScreenshot({ + url: '/uilib/components/tabs/demos', + selector: '[data-visual-test="tabs-tablist"] .dnb-tabs__tabs', + simulateSelector: + '[data-visual-test="tabs-tablist"] .dnb-tabs__tabs__tablist .dnb-tabs__button__snap:nth-of-type(2) button', + simulate: 'focus', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match tabs content with focus ring', async () => { + const screenshot = await makeScreenshot({ + url: '/uilib/components/tabs/demos', + selector: + '[data-visual-test="tabs-section-styles"] .dnb-tabs__content', + simulateSelector: + '[data-visual-test="tabs-section-styles"] .dnb-tabs__content', + simulate: 'focus', + executeBeforeSimulate: () => { + document.documentElement.setAttribute('data-whatinput', 'keyboard') + }, + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match scrollable tabs narrow', async () => { + const screenshot = await makeScreenshot({ + url: '/uilib/components/tabs/demos', + pageViewport: { + width: 480, // 30rem + }, + style: { + width: '30rem', + padding: '0 3rem 4rem 3rem', + }, + selector: '[data-visual-test="tabs-tablist-scrollable"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match scrollable tabs', async () => { + const screenshot = await makeScreenshot({ + url: '/uilib/components/tabs/demos', + pageViewport: { + width: 800, // 50rem + }, + style: { + width: '50rem', + padding: '0 3rem 4rem 3rem', + }, + selector: '[data-visual-test="tabs-tablist-scrollable"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match first scrollable tabs', async () => { + const screenshot = await makeScreenshot({ + pageViewport: { + width: 800, // 50rem + }, + url: '/uilib/components/tabs/demos', + style: { + width: '50rem', + padding: '0 3rem 4rem 3rem', + }, + selector: '[data-visual-test="tabs-tablist-scrollable"]', + simulateSelector: + '[data-visual-test="tabs-tablist-scrollable"] .dnb-tabs__tabs__tablist .dnb-tabs__button__snap:first-of-type button', + simulate: 'click', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match last scrollable tabs', async () => { + const screenshot = await makeScreenshot({ + pageViewport: { + width: 800, // 50rem + }, + url: '/uilib/components/tabs/demos', + style: { + width: '50rem', + padding: '0 3rem 4rem 3rem', + }, + selector: '[data-visual-test="tabs-tablist-scrollable"]', + simulateSelector: + '[data-visual-test="tabs-tablist-scrollable"] .dnb-tabs__tabs__tablist .dnb-tabs__button__snap:last-of-type button', + simulate: 'click', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/components/tabs/__tests__/__image_snapshots__/tabs-have-to-match-a-tab-button-in-focus-state.snap.png b/packages/dnb-eufemia/src/components/tabs/__tests__/__image_snapshots__/tabs-have-to-match-a-tab-button-in-focus-state.snap.png new file mode 100644 index 00000000000..fd29d57d205 Binary files /dev/null and b/packages/dnb-eufemia/src/components/tabs/__tests__/__image_snapshots__/tabs-have-to-match-a-tab-button-in-focus-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/tabs/__tests__/__image_snapshots__/tabs-have-to-match-a-tablist-with-a-click-handler.snap.png b/packages/dnb-eufemia/src/components/tabs/__tests__/__image_snapshots__/tabs-have-to-match-a-tablist-with-a-click-handler.snap.png new file mode 100644 index 00000000000..3e17a95c031 Binary files /dev/null and b/packages/dnb-eufemia/src/components/tabs/__tests__/__image_snapshots__/tabs-have-to-match-a-tablist-with-a-click-handler.snap.png differ diff --git a/packages/dnb-eufemia/src/components/tabs/__tests__/__image_snapshots__/tabs-have-to-match-custom-section-styles.snap.png b/packages/dnb-eufemia/src/components/tabs/__tests__/__image_snapshots__/tabs-have-to-match-custom-section-styles.snap.png new file mode 100644 index 00000000000..0df158c8f81 Binary files /dev/null and b/packages/dnb-eufemia/src/components/tabs/__tests__/__image_snapshots__/tabs-have-to-match-custom-section-styles.snap.png differ diff --git a/packages/dnb-eufemia/src/components/tabs/__tests__/__image_snapshots__/tabs-have-to-match-first-scrollable-tabs.snap.png b/packages/dnb-eufemia/src/components/tabs/__tests__/__image_snapshots__/tabs-have-to-match-first-scrollable-tabs.snap.png new file mode 100644 index 00000000000..59f5084f1f1 Binary files /dev/null and b/packages/dnb-eufemia/src/components/tabs/__tests__/__image_snapshots__/tabs-have-to-match-first-scrollable-tabs.snap.png differ diff --git a/packages/dnb-eufemia/src/components/tabs/__tests__/__image_snapshots__/tabs-have-to-match-horizontal-aligned-tabs.snap.png b/packages/dnb-eufemia/src/components/tabs/__tests__/__image_snapshots__/tabs-have-to-match-horizontal-aligned-tabs.snap.png new file mode 100644 index 00000000000..551f7e66ace Binary files /dev/null and b/packages/dnb-eufemia/src/components/tabs/__tests__/__image_snapshots__/tabs-have-to-match-horizontal-aligned-tabs.snap.png differ diff --git a/packages/dnb-eufemia/src/components/tabs/__tests__/__image_snapshots__/tabs-have-to-match-ignored-scrollable-tabs.snap.png b/packages/dnb-eufemia/src/components/tabs/__tests__/__image_snapshots__/tabs-have-to-match-ignored-scrollable-tabs.snap.png new file mode 100644 index 00000000000..5529738f1db Binary files /dev/null and b/packages/dnb-eufemia/src/components/tabs/__tests__/__image_snapshots__/tabs-have-to-match-ignored-scrollable-tabs.snap.png differ diff --git a/packages/dnb-eufemia/src/components/tabs/__tests__/__image_snapshots__/tabs-have-to-match-last-scrollable-tabs.snap.png b/packages/dnb-eufemia/src/components/tabs/__tests__/__image_snapshots__/tabs-have-to-match-last-scrollable-tabs.snap.png new file mode 100644 index 00000000000..9447d4f5bf2 Binary files /dev/null and b/packages/dnb-eufemia/src/components/tabs/__tests__/__image_snapshots__/tabs-have-to-match-last-scrollable-tabs.snap.png differ diff --git a/packages/dnb-eufemia/src/components/tabs/__tests__/__image_snapshots__/tabs-have-to-match-max-width-tabs.snap.png b/packages/dnb-eufemia/src/components/tabs/__tests__/__image_snapshots__/tabs-have-to-match-max-width-tabs.snap.png new file mode 100644 index 00000000000..3b2af7a3f3f Binary files /dev/null and b/packages/dnb-eufemia/src/components/tabs/__tests__/__image_snapshots__/tabs-have-to-match-max-width-tabs.snap.png differ diff --git a/packages/dnb-eufemia/src/components/tabs/__tests__/__image_snapshots__/tabs-have-to-match-scrollable-tabs-narrow.snap.png b/packages/dnb-eufemia/src/components/tabs/__tests__/__image_snapshots__/tabs-have-to-match-scrollable-tabs-narrow.snap.png new file mode 100644 index 00000000000..4d04d996785 Binary files /dev/null and b/packages/dnb-eufemia/src/components/tabs/__tests__/__image_snapshots__/tabs-have-to-match-scrollable-tabs-narrow.snap.png differ diff --git a/packages/dnb-eufemia/src/components/tabs/__tests__/__image_snapshots__/tabs-have-to-match-scrollable-tabs.snap.png b/packages/dnb-eufemia/src/components/tabs/__tests__/__image_snapshots__/tabs-have-to-match-scrollable-tabs.snap.png new file mode 100644 index 00000000000..8807a8fd860 Binary files /dev/null and b/packages/dnb-eufemia/src/components/tabs/__tests__/__image_snapshots__/tabs-have-to-match-scrollable-tabs.snap.png differ diff --git a/packages/dnb-eufemia/src/components/tabs/__tests__/__image_snapshots__/tabs-have-to-match-tabs-content-with-focus-ring.snap.png b/packages/dnb-eufemia/src/components/tabs/__tests__/__image_snapshots__/tabs-have-to-match-tabs-content-with-focus-ring.snap.png new file mode 100644 index 00000000000..c4dee5e73d3 Binary files /dev/null and b/packages/dnb-eufemia/src/components/tabs/__tests__/__image_snapshots__/tabs-have-to-match-tabs-content-with-focus-ring.snap.png differ diff --git a/packages/dnb-eufemia/src/components/tabs/__tests__/__image_snapshots__/tabs-have-to-match-tabs-with-no-bottom-border.snap.png b/packages/dnb-eufemia/src/components/tabs/__tests__/__image_snapshots__/tabs-have-to-match-tabs-with-no-bottom-border.snap.png new file mode 100644 index 00000000000..608ad791344 Binary files /dev/null and b/packages/dnb-eufemia/src/components/tabs/__tests__/__image_snapshots__/tabs-have-to-match-tabs-with-no-bottom-border.snap.png differ diff --git a/packages/dnb-eufemia/src/components/tabs/__tests__/__image_snapshots__/tabs-have-to-match-the-tablist-on-focus-state.snap.png b/packages/dnb-eufemia/src/components/tabs/__tests__/__image_snapshots__/tabs-have-to-match-the-tablist-on-focus-state.snap.png new file mode 100644 index 00000000000..79ce7bbc9fa Binary files /dev/null and b/packages/dnb-eufemia/src/components/tabs/__tests__/__image_snapshots__/tabs-have-to-match-the-tablist-on-focus-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/tabs/__tests__/__image_snapshots__/tabs-have-to-match-the-tablist.snap.png b/packages/dnb-eufemia/src/components/tabs/__tests__/__image_snapshots__/tabs-have-to-match-the-tablist.snap.png new file mode 100644 index 00000000000..0c8dc450a4d Binary files /dev/null and b/packages/dnb-eufemia/src/components/tabs/__tests__/__image_snapshots__/tabs-have-to-match-the-tablist.snap.png differ diff --git a/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/Tabs.test.js.snap b/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/Tabs.test.js.snap index e9d463d71ff..5620ce13d0d 100644 --- a/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/Tabs.test.js.snap +++ b/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/Tabs.test.js.snap @@ -1413,6 +1413,9 @@ html[data-whatinput=keyboard] .dnb-tabs__tabs__tablist:focus { box-shadow: 0 0 0 0.125rem var(--border-color); border-color: transparent; } +html:not([data-visual-test]) .dnb-tabs__tabs__tablist { + scroll-behavior: smooth; +} @supports not (scrollbar-color: auto) { .dnb-tabs__tabs__tablist::-webkit-scrollbar { background-color: var(--color-black-8); @@ -1431,12 +1434,6 @@ html[data-whatinput=keyboard] .dnb-tabs__tabs__tablist:focus { background-color: var(--color-emerald-green); } } -html:not([data-visual-test]) .dnb-tabs__tabs__tablist { - scroll-behavior: smooth; -} -html[data-visual-test] .dnb-tabs__tabs__tablist { - scroll-behavior: auto !important; -} .dnb-tabs__tabs__tablist::-webkit-scrollbar { display: none; } diff --git a/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/tabs-screenshot-test-js-tabs-screenshot-have-to-match-a-tab-button-in-focus-state-1-6972f.snap.png b/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/tabs-screenshot-test-js-tabs-screenshot-have-to-match-a-tab-button-in-focus-state-1-6972f.snap.png deleted file mode 100644 index 72c4af37ea9..00000000000 Binary files a/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/tabs-screenshot-test-js-tabs-screenshot-have-to-match-a-tab-button-in-focus-state-1-6972f.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/tabs-screenshot-test-js-tabs-screenshot-have-to-match-a-tablist-with-a-click-handler-1-eebc0.snap.png b/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/tabs-screenshot-test-js-tabs-screenshot-have-to-match-a-tablist-with-a-click-handler-1-eebc0.snap.png deleted file mode 100644 index 6ca5c82f0b7..00000000000 Binary files a/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/tabs-screenshot-test-js-tabs-screenshot-have-to-match-a-tablist-with-a-click-handler-1-eebc0.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/tabs-screenshot-test-js-tabs-screenshot-have-to-match-custom-section-styles-1-3b711.snap.png b/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/tabs-screenshot-test-js-tabs-screenshot-have-to-match-custom-section-styles-1-3b711.snap.png deleted file mode 100644 index 1fa0ab3cbee..00000000000 Binary files a/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/tabs-screenshot-test-js-tabs-screenshot-have-to-match-custom-section-styles-1-3b711.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/tabs-screenshot-test-js-tabs-screenshot-have-to-match-first-scrollable-tabs-1-a8b55.snap.png b/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/tabs-screenshot-test-js-tabs-screenshot-have-to-match-first-scrollable-tabs-1-a8b55.snap.png deleted file mode 100644 index e8ed181dc2c..00000000000 Binary files a/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/tabs-screenshot-test-js-tabs-screenshot-have-to-match-first-scrollable-tabs-1-a8b55.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/tabs-screenshot-test-js-tabs-screenshot-have-to-match-horizontal-aligned-tabs-1-9d7ac.snap.png b/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/tabs-screenshot-test-js-tabs-screenshot-have-to-match-horizontal-aligned-tabs-1-9d7ac.snap.png deleted file mode 100644 index e854006d0b2..00000000000 Binary files a/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/tabs-screenshot-test-js-tabs-screenshot-have-to-match-horizontal-aligned-tabs-1-9d7ac.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/tabs-screenshot-test-js-tabs-screenshot-have-to-match-ignored-scrollable-tabs-1-f28ef.snap.png b/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/tabs-screenshot-test-js-tabs-screenshot-have-to-match-ignored-scrollable-tabs-1-f28ef.snap.png deleted file mode 100644 index 78496ae5064..00000000000 Binary files a/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/tabs-screenshot-test-js-tabs-screenshot-have-to-match-ignored-scrollable-tabs-1-f28ef.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/tabs-screenshot-test-js-tabs-screenshot-have-to-match-last-scrollable-tabs-1-0e3b8.snap.png b/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/tabs-screenshot-test-js-tabs-screenshot-have-to-match-last-scrollable-tabs-1-0e3b8.snap.png deleted file mode 100644 index 6be36310dac..00000000000 Binary files a/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/tabs-screenshot-test-js-tabs-screenshot-have-to-match-last-scrollable-tabs-1-0e3b8.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/tabs-screenshot-test-js-tabs-screenshot-have-to-match-max-width-tabs-1-0e662.snap.png b/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/tabs-screenshot-test-js-tabs-screenshot-have-to-match-max-width-tabs-1-0e662.snap.png deleted file mode 100644 index 1d123d32afb..00000000000 Binary files a/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/tabs-screenshot-test-js-tabs-screenshot-have-to-match-max-width-tabs-1-0e662.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/tabs-screenshot-test-js-tabs-screenshot-have-to-match-scrollable-tabs-1-13924.snap.png b/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/tabs-screenshot-test-js-tabs-screenshot-have-to-match-scrollable-tabs-1-13924.snap.png deleted file mode 100644 index 9060c6b7591..00000000000 Binary files a/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/tabs-screenshot-test-js-tabs-screenshot-have-to-match-scrollable-tabs-1-13924.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/tabs-screenshot-test-js-tabs-screenshot-have-to-match-scrollable-tabs-narrow-1-8960f.snap.png b/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/tabs-screenshot-test-js-tabs-screenshot-have-to-match-scrollable-tabs-narrow-1-8960f.snap.png deleted file mode 100644 index ccb842a20f0..00000000000 Binary files a/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/tabs-screenshot-test-js-tabs-screenshot-have-to-match-scrollable-tabs-narrow-1-8960f.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/tabs-screenshot-test-js-tabs-screenshot-have-to-match-tabs-content-with-focus-ring-1-aa150.snap.png b/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/tabs-screenshot-test-js-tabs-screenshot-have-to-match-tabs-content-with-focus-ring-1-aa150.snap.png deleted file mode 100644 index cd5aef62367..00000000000 Binary files a/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/tabs-screenshot-test-js-tabs-screenshot-have-to-match-tabs-content-with-focus-ring-1-aa150.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/tabs-screenshot-test-js-tabs-screenshot-have-to-match-tabs-with-no-bottom-border-1-6f4ae.snap.png b/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/tabs-screenshot-test-js-tabs-screenshot-have-to-match-tabs-with-no-bottom-border-1-6f4ae.snap.png deleted file mode 100644 index 52bc1773106..00000000000 Binary files a/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/tabs-screenshot-test-js-tabs-screenshot-have-to-match-tabs-with-no-bottom-border-1-6f4ae.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/tabs-screenshot-test-js-tabs-screenshot-have-to-match-the-tablist-1-5ff66.snap.png b/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/tabs-screenshot-test-js-tabs-screenshot-have-to-match-the-tablist-1-5ff66.snap.png deleted file mode 100644 index 246f997ce58..00000000000 Binary files a/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/tabs-screenshot-test-js-tabs-screenshot-have-to-match-the-tablist-1-5ff66.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/tabs-screenshot-test-js-tabs-screenshot-have-to-match-the-tablist-on-focus-state-1-ae6b2.snap.png b/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/tabs-screenshot-test-js-tabs-screenshot-have-to-match-the-tablist-on-focus-state-1-ae6b2.snap.png deleted file mode 100644 index e06171ab33a..00000000000 Binary files a/packages/dnb-eufemia/src/components/tabs/__tests__/__snapshots__/tabs-screenshot-test-js-tabs-screenshot-have-to-match-the-tablist-on-focus-state-1-ae6b2.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/tag/__tests__/Tag.screenshot.test.js b/packages/dnb-eufemia/src/components/tag/__tests__/Tag.screenshot.test.js deleted file mode 100644 index 40105c27616..00000000000 --- a/packages/dnb-eufemia/src/components/tag/__tests__/Tag.screenshot.test.js +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -describe('Tag screenshot', () => { - setupPageScreenshot({ url: '/uilib/components/tag/demos' }) - - it('have to match Tag default', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="tag-default"] .dnb-tag', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match Tag with icon', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="tag-icon"] .dnb-tag', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match a removable Tag', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="tag-removable"] .dnb-tag', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match a removable Tag list', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="tag-removable-list"] .dnb-tag', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match a inline Tag', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="tag-inline"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match a skeleton Tag', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="tag-skeleton"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Clickable tag screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/tag/visual-tests/clickable-tag', - }) - it('have to match a clickable Tag', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="tag-clickable"] .dnb-tag', - }) - - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/components/tag/__tests__/Tag.screenshot.test.ts b/packages/dnb-eufemia/src/components/tag/__tests__/Tag.screenshot.test.ts new file mode 100644 index 00000000000..52ad54c9a4f --- /dev/null +++ b/packages/dnb-eufemia/src/components/tag/__tests__/Tag.screenshot.test.ts @@ -0,0 +1,68 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../../core/jest/jestSetupScreenshots' + +describe('Tag', () => { + setupPageScreenshot({ url: '/uilib/components/tag/demos' }) + + it('have to match Tag default', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="tag-default"] .dnb-tag', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match Tag with icon', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="tag-icon"] .dnb-tag', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match a removable Tag', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="tag-removable"] .dnb-tag', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match a removable Tag list', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="tag-removable-list"] .dnb-tag', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match a inline Tag', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="tag-inline"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match a skeleton Tag', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="tag-skeleton"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) + +describe('Clickable tag', () => { + setupPageScreenshot({ + url: '/uilib/components/tag/visual-tests/clickable-tag', + }) + it('have to match a clickable Tag', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="tag-clickable"] .dnb-tag', + }) + + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/components/tag/__tests__/__image_snapshots__/clickable-tag-have-to-match-a-clickable-tag.snap.png b/packages/dnb-eufemia/src/components/tag/__tests__/__image_snapshots__/clickable-tag-have-to-match-a-clickable-tag.snap.png new file mode 100644 index 00000000000..b56e8622a25 Binary files /dev/null and b/packages/dnb-eufemia/src/components/tag/__tests__/__image_snapshots__/clickable-tag-have-to-match-a-clickable-tag.snap.png differ diff --git a/packages/dnb-eufemia/src/components/tag/__tests__/__image_snapshots__/tag-have-to-match-a-inline-tag.snap.png b/packages/dnb-eufemia/src/components/tag/__tests__/__image_snapshots__/tag-have-to-match-a-inline-tag.snap.png new file mode 100644 index 00000000000..7d5b9bc23ba Binary files /dev/null and b/packages/dnb-eufemia/src/components/tag/__tests__/__image_snapshots__/tag-have-to-match-a-inline-tag.snap.png differ diff --git a/packages/dnb-eufemia/src/components/tag/__tests__/__image_snapshots__/tag-have-to-match-a-removable-tag-list.snap.png b/packages/dnb-eufemia/src/components/tag/__tests__/__image_snapshots__/tag-have-to-match-a-removable-tag-list.snap.png new file mode 100644 index 00000000000..75a3266a2f5 Binary files /dev/null and b/packages/dnb-eufemia/src/components/tag/__tests__/__image_snapshots__/tag-have-to-match-a-removable-tag-list.snap.png differ diff --git a/packages/dnb-eufemia/src/components/tag/__tests__/__image_snapshots__/tag-have-to-match-a-removable-tag.snap.png b/packages/dnb-eufemia/src/components/tag/__tests__/__image_snapshots__/tag-have-to-match-a-removable-tag.snap.png new file mode 100644 index 00000000000..d068a492096 Binary files /dev/null and b/packages/dnb-eufemia/src/components/tag/__tests__/__image_snapshots__/tag-have-to-match-a-removable-tag.snap.png differ diff --git a/packages/dnb-eufemia/src/components/tag/__tests__/__image_snapshots__/tag-have-to-match-a-skeleton-tag.snap.png b/packages/dnb-eufemia/src/components/tag/__tests__/__image_snapshots__/tag-have-to-match-a-skeleton-tag.snap.png new file mode 100644 index 00000000000..6200a6e5fee Binary files /dev/null and b/packages/dnb-eufemia/src/components/tag/__tests__/__image_snapshots__/tag-have-to-match-a-skeleton-tag.snap.png differ diff --git a/packages/dnb-eufemia/src/components/tag/__tests__/__image_snapshots__/tag-have-to-match-tag-default.snap.png b/packages/dnb-eufemia/src/components/tag/__tests__/__image_snapshots__/tag-have-to-match-tag-default.snap.png new file mode 100644 index 00000000000..dc236811c54 Binary files /dev/null and b/packages/dnb-eufemia/src/components/tag/__tests__/__image_snapshots__/tag-have-to-match-tag-default.snap.png differ diff --git a/packages/dnb-eufemia/src/components/tag/__tests__/__image_snapshots__/tag-have-to-match-tag-with-icon.snap.png b/packages/dnb-eufemia/src/components/tag/__tests__/__image_snapshots__/tag-have-to-match-tag-with-icon.snap.png new file mode 100644 index 00000000000..8c9c95c2020 Binary files /dev/null and b/packages/dnb-eufemia/src/components/tag/__tests__/__image_snapshots__/tag-have-to-match-tag-with-icon.snap.png differ diff --git a/packages/dnb-eufemia/src/components/tag/__tests__/__snapshots__/tag-screenshot-test-js-clickable-tag-screenshot-have-to-match-a-clickable-tag-1-68164.snap.png b/packages/dnb-eufemia/src/components/tag/__tests__/__snapshots__/tag-screenshot-test-js-clickable-tag-screenshot-have-to-match-a-clickable-tag-1-68164.snap.png deleted file mode 100644 index c7b25e7cb0d..00000000000 Binary files a/packages/dnb-eufemia/src/components/tag/__tests__/__snapshots__/tag-screenshot-test-js-clickable-tag-screenshot-have-to-match-a-clickable-tag-1-68164.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/tag/__tests__/__snapshots__/tag-screenshot-test-js-tag-screenshot-have-to-match-a-inline-tag-1-631aa.snap.png b/packages/dnb-eufemia/src/components/tag/__tests__/__snapshots__/tag-screenshot-test-js-tag-screenshot-have-to-match-a-inline-tag-1-631aa.snap.png deleted file mode 100644 index 16fddbdcbcd..00000000000 Binary files a/packages/dnb-eufemia/src/components/tag/__tests__/__snapshots__/tag-screenshot-test-js-tag-screenshot-have-to-match-a-inline-tag-1-631aa.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/tag/__tests__/__snapshots__/tag-screenshot-test-js-tag-screenshot-have-to-match-a-removable-tag-1-f94a5.snap.png b/packages/dnb-eufemia/src/components/tag/__tests__/__snapshots__/tag-screenshot-test-js-tag-screenshot-have-to-match-a-removable-tag-1-f94a5.snap.png deleted file mode 100644 index 671863a3837..00000000000 Binary files a/packages/dnb-eufemia/src/components/tag/__tests__/__snapshots__/tag-screenshot-test-js-tag-screenshot-have-to-match-a-removable-tag-1-f94a5.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/tag/__tests__/__snapshots__/tag-screenshot-test-js-tag-screenshot-have-to-match-a-removable-tag-list-1-48dc0.snap.png b/packages/dnb-eufemia/src/components/tag/__tests__/__snapshots__/tag-screenshot-test-js-tag-screenshot-have-to-match-a-removable-tag-list-1-48dc0.snap.png deleted file mode 100644 index 337b3c3172f..00000000000 Binary files a/packages/dnb-eufemia/src/components/tag/__tests__/__snapshots__/tag-screenshot-test-js-tag-screenshot-have-to-match-a-removable-tag-list-1-48dc0.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/tag/__tests__/__snapshots__/tag-screenshot-test-js-tag-screenshot-have-to-match-a-skeleton-tag-1-8658d.snap.png b/packages/dnb-eufemia/src/components/tag/__tests__/__snapshots__/tag-screenshot-test-js-tag-screenshot-have-to-match-a-skeleton-tag-1-8658d.snap.png deleted file mode 100644 index 8e8c4ca3e9c..00000000000 Binary files a/packages/dnb-eufemia/src/components/tag/__tests__/__snapshots__/tag-screenshot-test-js-tag-screenshot-have-to-match-a-skeleton-tag-1-8658d.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/tag/__tests__/__snapshots__/tag-screenshot-test-js-tag-screenshot-have-to-match-tag-default-1-58f81.snap.png b/packages/dnb-eufemia/src/components/tag/__tests__/__snapshots__/tag-screenshot-test-js-tag-screenshot-have-to-match-tag-default-1-58f81.snap.png deleted file mode 100644 index e61f3dd92c0..00000000000 Binary files a/packages/dnb-eufemia/src/components/tag/__tests__/__snapshots__/tag-screenshot-test-js-tag-screenshot-have-to-match-tag-default-1-58f81.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/tag/__tests__/__snapshots__/tag-screenshot-test-js-tag-screenshot-have-to-match-tag-with-icon-1-25cd8.snap.png b/packages/dnb-eufemia/src/components/tag/__tests__/__snapshots__/tag-screenshot-test-js-tag-screenshot-have-to-match-tag-with-icon-1-25cd8.snap.png deleted file mode 100644 index 79e85dae554..00000000000 Binary files a/packages/dnb-eufemia/src/components/tag/__tests__/__snapshots__/tag-screenshot-test-js-tag-screenshot-have-to-match-tag-with-icon-1-25cd8.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/textarea/__tests__/Textarea.screenshot.test.js b/packages/dnb-eufemia/src/components/textarea/__tests__/Textarea.screenshot.test.js deleted file mode 100644 index 0c5634a4a31..00000000000 --- a/packages/dnb-eufemia/src/components/textarea/__tests__/Textarea.screenshot.test.js +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -describe('Textarea screenshot', () => { - const style = { - width: '14rem', // make sure our textarea gets an explicit width, because of mac/linux rendering differences - } - setupPageScreenshot({ url: '/uilib/components/textarea/demos' }) - - it('have to match the "default" textarea style', async () => { - const screenshot = await testPageScreenshot({ - style, - selector: '[data-visual-test="textarea-default"]', - // Only for screenshot testing - make textarea having same width on linux chromium - styleSelector: '[data-visual-test="textarea-default"] textarea', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the default error textarea style', async () => { - const screenshot = await testPageScreenshot({ - style, - selector: '[data-visual-test="textarea-error"]', - // Only for screenshot testing - make textarea having same width on linux chromium - styleSelector: '[data-visual-test="textarea-error"] textarea', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match stretched textarea style', async () => { - const screenshot = await testPageScreenshot({ - style: { - width: '30rem', // make sure our textarea gets an explicit width, because of mac/linux rendering differences - }, - // Only for screenshot testing - make textarea having same width on linux chromium - // styleSelector: '[data-visual-test="textarea-stretch"]', - selector: '[data-visual-test="textarea-stretch"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - // we do not make a active state, due to the differences of font rendering - - it('have to match the "focus" textarea style', async () => { - const screenshot = await testPageScreenshot({ - style, - selector: '[data-visual-test="textarea-default"]', - simulateSelector: '[data-visual-test="textarea-default"] textarea', - simulate: 'focus', // should be tested first - // Only for screenshot testing - make textarea having same width on linux chromium - styleSelector: '[data-visual-test="textarea-default"] textarea', - }) - expect(screenshot).toMatchImageSnapshot() - }) - // we do not make a active state, due to the differences of font rendering - - it('have to match the "hover" textarea style', async () => { - const screenshot = await testPageScreenshot({ - style, - selector: '[data-visual-test="textarea-default"]', - simulateSelector: '[data-visual-test="textarea-default"] textarea', - simulate: 'hover', - // Only for screenshot testing - make textarea having same width on linux chromium - styleSelector: '[data-visual-test="textarea-default"] textarea', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/components/textarea/__tests__/Textarea.screenshot.test.ts b/packages/dnb-eufemia/src/components/textarea/__tests__/Textarea.screenshot.test.ts new file mode 100644 index 00000000000..11eeb22bc81 --- /dev/null +++ b/packages/dnb-eufemia/src/components/textarea/__tests__/Textarea.screenshot.test.ts @@ -0,0 +1,74 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../../core/jest/jestSetupScreenshots' + +describe('Textarea', () => { + const style = { + width: '14rem', // make sure our textarea gets an explicit width, because of mac/linux rendering differences + } + setupPageScreenshot({ url: '/uilib/components/textarea/demos' }) + + it('have to match the "default" textarea style', async () => { + const screenshot = await makeScreenshot({ + style, + selector: '[data-visual-test="textarea-default"]', + // Only for screenshot testing - make textarea having same width on linux chromium + styleSelector: '[data-visual-test="textarea-default"] textarea', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the default error textarea style', async () => { + const screenshot = await makeScreenshot({ + style, + selector: '[data-visual-test="textarea-error"]', + // Only for screenshot testing - make textarea having same width on linux chromium + styleSelector: '[data-visual-test="textarea-error"] textarea', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match stretched textarea style', async () => { + const screenshot = await makeScreenshot({ + style: { + width: '30rem', // make sure our textarea gets an explicit width, because of mac/linux rendering differences + }, + // Only for screenshot testing - make textarea having same width on linux chromium + // styleSelector: '[data-visual-test="textarea-stretch"]', + selector: '[data-visual-test="textarea-stretch"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + // we do not make a active state, due to the differences of font rendering + + it('have to match the "focus" textarea style', async () => { + const screenshot = await makeScreenshot({ + style, + selector: '[data-visual-test="textarea-default"]', + simulateSelector: '[data-visual-test="textarea-default"] textarea', + simulate: 'focus', // should be tested first + // Only for screenshot testing - make textarea having same width on linux chromium + styleSelector: '[data-visual-test="textarea-default"] textarea', + }) + expect(screenshot).toMatchImageSnapshot() + }) + // we do not make a active state, due to the differences of font rendering + + it('have to match the "hover" textarea style', async () => { + const screenshot = await makeScreenshot({ + style, + selector: '[data-visual-test="textarea-default"]', + simulateSelector: '[data-visual-test="textarea-default"] textarea', + simulate: 'hover', + // Only for screenshot testing - make textarea having same width on linux chromium + styleSelector: '[data-visual-test="textarea-default"] textarea', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/components/textarea/__tests__/__image_snapshots__/textarea-have-to-match-stretched-textarea-style.snap.png b/packages/dnb-eufemia/src/components/textarea/__tests__/__image_snapshots__/textarea-have-to-match-stretched-textarea-style.snap.png new file mode 100644 index 00000000000..f1f967291db Binary files /dev/null and b/packages/dnb-eufemia/src/components/textarea/__tests__/__image_snapshots__/textarea-have-to-match-stretched-textarea-style.snap.png differ diff --git a/packages/dnb-eufemia/src/components/textarea/__tests__/__image_snapshots__/textarea-have-to-match-the-default-error-textarea-style.snap.png b/packages/dnb-eufemia/src/components/textarea/__tests__/__image_snapshots__/textarea-have-to-match-the-default-error-textarea-style.snap.png new file mode 100644 index 00000000000..0100603099a Binary files /dev/null and b/packages/dnb-eufemia/src/components/textarea/__tests__/__image_snapshots__/textarea-have-to-match-the-default-error-textarea-style.snap.png differ diff --git a/packages/dnb-eufemia/src/components/textarea/__tests__/__image_snapshots__/textarea-have-to-match-the-default-textarea-style.snap.png b/packages/dnb-eufemia/src/components/textarea/__tests__/__image_snapshots__/textarea-have-to-match-the-default-textarea-style.snap.png new file mode 100644 index 00000000000..d3f7383decf Binary files /dev/null and b/packages/dnb-eufemia/src/components/textarea/__tests__/__image_snapshots__/textarea-have-to-match-the-default-textarea-style.snap.png differ diff --git a/packages/dnb-eufemia/src/components/textarea/__tests__/__image_snapshots__/textarea-have-to-match-the-focus-textarea-style.snap.png b/packages/dnb-eufemia/src/components/textarea/__tests__/__image_snapshots__/textarea-have-to-match-the-focus-textarea-style.snap.png new file mode 100644 index 00000000000..bc2201e306c Binary files /dev/null and b/packages/dnb-eufemia/src/components/textarea/__tests__/__image_snapshots__/textarea-have-to-match-the-focus-textarea-style.snap.png differ diff --git a/packages/dnb-eufemia/src/components/textarea/__tests__/__image_snapshots__/textarea-have-to-match-the-hover-textarea-style.snap.png b/packages/dnb-eufemia/src/components/textarea/__tests__/__image_snapshots__/textarea-have-to-match-the-hover-textarea-style.snap.png new file mode 100644 index 00000000000..9be8d88722c Binary files /dev/null and b/packages/dnb-eufemia/src/components/textarea/__tests__/__image_snapshots__/textarea-have-to-match-the-hover-textarea-style.snap.png differ diff --git a/packages/dnb-eufemia/src/components/textarea/__tests__/__snapshots__/Textarea.test.js.snap b/packages/dnb-eufemia/src/components/textarea/__tests__/__snapshots__/Textarea.test.js.snap index 873a07ce004..bf0ac6febbe 100644 --- a/packages/dnb-eufemia/src/components/textarea/__tests__/__snapshots__/Textarea.test.js.snap +++ b/packages/dnb-eufemia/src/components/textarea/__tests__/__snapshots__/Textarea.test.js.snap @@ -169,6 +169,9 @@ exports[`Textarea scss have to match default theme snapshot 1`] = ` color: var(--color-black); text-shadow: none; } +html:not([data-visual-test]) .dnb-textarea__textarea { + scroll-behavior: smooth; +} @supports not (scrollbar-color: auto) { .dnb-textarea__textarea::-webkit-scrollbar { background-color: var(--color-black-8); @@ -187,12 +190,6 @@ exports[`Textarea scss have to match default theme snapshot 1`] = ` background-color: var(--color-emerald-green); } } -html:not([data-visual-test]) .dnb-textarea__textarea { - scroll-behavior: smooth; -} -html[data-visual-test] .dnb-textarea__textarea { - scroll-behavior: auto !important; -} .dnb-textarea__placeholder { color: var(--color-black-55); display: -webkit-box; diff --git a/packages/dnb-eufemia/src/components/textarea/__tests__/__snapshots__/textarea-screenshot-test-js-textarea-screenshot-have-to-match-stretched-textarea-style-1-30d8e.snap.png b/packages/dnb-eufemia/src/components/textarea/__tests__/__snapshots__/textarea-screenshot-test-js-textarea-screenshot-have-to-match-stretched-textarea-style-1-30d8e.snap.png deleted file mode 100644 index 2de7b491818..00000000000 Binary files a/packages/dnb-eufemia/src/components/textarea/__tests__/__snapshots__/textarea-screenshot-test-js-textarea-screenshot-have-to-match-stretched-textarea-style-1-30d8e.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/textarea/__tests__/__snapshots__/textarea-screenshot-test-js-textarea-screenshot-have-to-match-the-default-error-textarea-style-1-355e0.snap.png b/packages/dnb-eufemia/src/components/textarea/__tests__/__snapshots__/textarea-screenshot-test-js-textarea-screenshot-have-to-match-the-default-error-textarea-style-1-355e0.snap.png deleted file mode 100644 index 05c5d2dcee6..00000000000 Binary files a/packages/dnb-eufemia/src/components/textarea/__tests__/__snapshots__/textarea-screenshot-test-js-textarea-screenshot-have-to-match-the-default-error-textarea-style-1-355e0.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/textarea/__tests__/__snapshots__/textarea-screenshot-test-js-textarea-screenshot-have-to-match-the-default-textarea-style-1-2ef6c.snap.png b/packages/dnb-eufemia/src/components/textarea/__tests__/__snapshots__/textarea-screenshot-test-js-textarea-screenshot-have-to-match-the-default-textarea-style-1-2ef6c.snap.png deleted file mode 100644 index f3497b3d95f..00000000000 Binary files a/packages/dnb-eufemia/src/components/textarea/__tests__/__snapshots__/textarea-screenshot-test-js-textarea-screenshot-have-to-match-the-default-textarea-style-1-2ef6c.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/textarea/__tests__/__snapshots__/textarea-screenshot-test-js-textarea-screenshot-have-to-match-the-focus-textarea-style-1-9fcc3.snap.png b/packages/dnb-eufemia/src/components/textarea/__tests__/__snapshots__/textarea-screenshot-test-js-textarea-screenshot-have-to-match-the-focus-textarea-style-1-9fcc3.snap.png deleted file mode 100644 index 455e576fd1c..00000000000 Binary files a/packages/dnb-eufemia/src/components/textarea/__tests__/__snapshots__/textarea-screenshot-test-js-textarea-screenshot-have-to-match-the-focus-textarea-style-1-9fcc3.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/textarea/__tests__/__snapshots__/textarea-screenshot-test-js-textarea-screenshot-have-to-match-the-hover-textarea-style-1-b1419.snap.png b/packages/dnb-eufemia/src/components/textarea/__tests__/__snapshots__/textarea-screenshot-test-js-textarea-screenshot-have-to-match-the-hover-textarea-style-1-b1419.snap.png deleted file mode 100644 index a8153079fd3..00000000000 Binary files a/packages/dnb-eufemia/src/components/textarea/__tests__/__snapshots__/textarea-screenshot-test-js-textarea-screenshot-have-to-match-the-hover-textarea-style-1-b1419.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/timeline/__tests__/Timeline.screenshot.test.js b/packages/dnb-eufemia/src/components/timeline/__tests__/Timeline.screenshot.test.js deleted file mode 100644 index f5491cf46a7..00000000000 --- a/packages/dnb-eufemia/src/components/timeline/__tests__/Timeline.screenshot.test.js +++ /dev/null @@ -1,120 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -describe('Timeline screenshot', () => { - setupPageScreenshot({ url: '/uilib/components/timeline/demos' }) - - it('have to match Timeline single completed', async () => { - const screenshot = await testPageScreenshot({ - selector: - '[data-visual-test="timeline-single-completed"] .dnb-timeline', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match Timeline single current', async () => { - const screenshot = await testPageScreenshot({ - selector: - '[data-visual-test="timeline-single-current"] .dnb-timeline', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match Timeline single upcoming', async () => { - const screenshot = await testPageScreenshot({ - selector: - '[data-visual-test="timeline-single-upcoming"] .dnb-timeline', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match Timeline multiple', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="timeline-multiple"] .dnb-timeline', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match Timeline multiple with children', async () => { - const screenshot = await testPageScreenshot({ - selector: - '[data-visual-test="timeline-multiple-children"] .dnb-timeline', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match Timeline with multiple completed time ine items', async () => { - const screenshot = await testPageScreenshot({ - selector: - '[data-visual-test="timeline-multiple-completed"] .dnb-timeline', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match Timeline with multiple upcoming timeline items', async () => { - const screenshot = await testPageScreenshot({ - selector: - '[data-visual-test="timeline-multiple-upcoming"] .dnb-timeline', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match Timeline with multiple current timeline items', async () => { - const screenshot = await testPageScreenshot({ - selector: - '[data-visual-test="timeline-multiple-current"] .dnb-timeline', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match Timeline states', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="timeline-states"] .dnb-timeline', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match Timeline icons', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="timeline-icons"] .dnb-timeline', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match Timeline icons', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="timeline-icons"] .dnb-timeline', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match Timeline skeleton', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="timeline-skeleton"] .dnb-timeline', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match Timeline as children skeleton', async () => { - const screenshot = await testPageScreenshot({ - selector: - '[data-visual-test="timeline-children-skeleton"] .dnb-timeline', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match Timeline item skeleton', async () => { - const screenshot = await testPageScreenshot({ - selector: - '[data-visual-test="timeline-item-skeleton"] .dnb-timeline', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/components/timeline/__tests__/Timeline.screenshot.test.ts b/packages/dnb-eufemia/src/components/timeline/__tests__/Timeline.screenshot.test.ts new file mode 100644 index 00000000000..777a0de7d5a --- /dev/null +++ b/packages/dnb-eufemia/src/components/timeline/__tests__/Timeline.screenshot.test.ts @@ -0,0 +1,120 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../../core/jest/jestSetupScreenshots' + +describe('Timeline', () => { + setupPageScreenshot({ url: '/uilib/components/timeline/demos' }) + + it('have to match Timeline single completed', async () => { + const screenshot = await makeScreenshot({ + selector: + '[data-visual-test="timeline-single-completed"] .dnb-timeline', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match Timeline single current', async () => { + const screenshot = await makeScreenshot({ + selector: + '[data-visual-test="timeline-single-current"] .dnb-timeline', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match Timeline single upcoming', async () => { + const screenshot = await makeScreenshot({ + selector: + '[data-visual-test="timeline-single-upcoming"] .dnb-timeline', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match Timeline multiple', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="timeline-multiple"] .dnb-timeline', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match Timeline multiple with children', async () => { + const screenshot = await makeScreenshot({ + selector: + '[data-visual-test="timeline-multiple-children"] .dnb-timeline', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match Timeline with multiple completed time ine items', async () => { + const screenshot = await makeScreenshot({ + selector: + '[data-visual-test="timeline-multiple-completed"] .dnb-timeline', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match Timeline with multiple upcoming timeline items', async () => { + const screenshot = await makeScreenshot({ + selector: + '[data-visual-test="timeline-multiple-upcoming"] .dnb-timeline', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match Timeline with multiple current timeline items', async () => { + const screenshot = await makeScreenshot({ + selector: + '[data-visual-test="timeline-multiple-current"] .dnb-timeline', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match Timeline states', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="timeline-states"] .dnb-timeline', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match Timeline icons', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="timeline-icons"] .dnb-timeline', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match Timeline icons', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="timeline-icons"] .dnb-timeline', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match Timeline skeleton', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="timeline-skeleton"] .dnb-timeline', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match Timeline as children skeleton', async () => { + const screenshot = await makeScreenshot({ + selector: + '[data-visual-test="timeline-children-skeleton"] .dnb-timeline', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match Timeline item skeleton', async () => { + const screenshot = await makeScreenshot({ + selector: + '[data-visual-test="timeline-item-skeleton"] .dnb-timeline', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/components/timeline/__tests__/__image_snapshots__/timeline-have-to-match-timeline-as-children-skeleton.snap.png b/packages/dnb-eufemia/src/components/timeline/__tests__/__image_snapshots__/timeline-have-to-match-timeline-as-children-skeleton.snap.png new file mode 100644 index 00000000000..2735dd23063 Binary files /dev/null and b/packages/dnb-eufemia/src/components/timeline/__tests__/__image_snapshots__/timeline-have-to-match-timeline-as-children-skeleton.snap.png differ diff --git a/packages/dnb-eufemia/src/components/timeline/__tests__/__image_snapshots__/timeline-have-to-match-timeline-icons.snap.png b/packages/dnb-eufemia/src/components/timeline/__tests__/__image_snapshots__/timeline-have-to-match-timeline-icons.snap.png new file mode 100644 index 00000000000..af22dbfeaf6 Binary files /dev/null and b/packages/dnb-eufemia/src/components/timeline/__tests__/__image_snapshots__/timeline-have-to-match-timeline-icons.snap.png differ diff --git a/packages/dnb-eufemia/src/components/timeline/__tests__/__image_snapshots__/timeline-have-to-match-timeline-item-skeleton.snap.png b/packages/dnb-eufemia/src/components/timeline/__tests__/__image_snapshots__/timeline-have-to-match-timeline-item-skeleton.snap.png new file mode 100644 index 00000000000..c5dc6b3bd9a Binary files /dev/null and b/packages/dnb-eufemia/src/components/timeline/__tests__/__image_snapshots__/timeline-have-to-match-timeline-item-skeleton.snap.png differ diff --git a/packages/dnb-eufemia/src/components/timeline/__tests__/__image_snapshots__/timeline-have-to-match-timeline-multiple-with-children.snap.png b/packages/dnb-eufemia/src/components/timeline/__tests__/__image_snapshots__/timeline-have-to-match-timeline-multiple-with-children.snap.png new file mode 100644 index 00000000000..6454ffb110c Binary files /dev/null and b/packages/dnb-eufemia/src/components/timeline/__tests__/__image_snapshots__/timeline-have-to-match-timeline-multiple-with-children.snap.png differ diff --git a/packages/dnb-eufemia/src/components/timeline/__tests__/__image_snapshots__/timeline-have-to-match-timeline-multiple.snap.png b/packages/dnb-eufemia/src/components/timeline/__tests__/__image_snapshots__/timeline-have-to-match-timeline-multiple.snap.png new file mode 100644 index 00000000000..6454ffb110c Binary files /dev/null and b/packages/dnb-eufemia/src/components/timeline/__tests__/__image_snapshots__/timeline-have-to-match-timeline-multiple.snap.png differ diff --git a/packages/dnb-eufemia/src/components/timeline/__tests__/__image_snapshots__/timeline-have-to-match-timeline-single-completed.snap.png b/packages/dnb-eufemia/src/components/timeline/__tests__/__image_snapshots__/timeline-have-to-match-timeline-single-completed.snap.png new file mode 100644 index 00000000000..4f9b887be14 Binary files /dev/null and b/packages/dnb-eufemia/src/components/timeline/__tests__/__image_snapshots__/timeline-have-to-match-timeline-single-completed.snap.png differ diff --git a/packages/dnb-eufemia/src/components/timeline/__tests__/__image_snapshots__/timeline-have-to-match-timeline-single-current.snap.png b/packages/dnb-eufemia/src/components/timeline/__tests__/__image_snapshots__/timeline-have-to-match-timeline-single-current.snap.png new file mode 100644 index 00000000000..ce6d65f408c Binary files /dev/null and b/packages/dnb-eufemia/src/components/timeline/__tests__/__image_snapshots__/timeline-have-to-match-timeline-single-current.snap.png differ diff --git a/packages/dnb-eufemia/src/components/timeline/__tests__/__image_snapshots__/timeline-have-to-match-timeline-single-upcoming.snap.png b/packages/dnb-eufemia/src/components/timeline/__tests__/__image_snapshots__/timeline-have-to-match-timeline-single-upcoming.snap.png new file mode 100644 index 00000000000..75e5ebc016e Binary files /dev/null and b/packages/dnb-eufemia/src/components/timeline/__tests__/__image_snapshots__/timeline-have-to-match-timeline-single-upcoming.snap.png differ diff --git a/packages/dnb-eufemia/src/components/timeline/__tests__/__image_snapshots__/timeline-have-to-match-timeline-skeleton.snap.png b/packages/dnb-eufemia/src/components/timeline/__tests__/__image_snapshots__/timeline-have-to-match-timeline-skeleton.snap.png new file mode 100644 index 00000000000..2735dd23063 Binary files /dev/null and b/packages/dnb-eufemia/src/components/timeline/__tests__/__image_snapshots__/timeline-have-to-match-timeline-skeleton.snap.png differ diff --git a/packages/dnb-eufemia/src/components/timeline/__tests__/__image_snapshots__/timeline-have-to-match-timeline-states.snap.png b/packages/dnb-eufemia/src/components/timeline/__tests__/__image_snapshots__/timeline-have-to-match-timeline-states.snap.png new file mode 100644 index 00000000000..30b2ada1076 Binary files /dev/null and b/packages/dnb-eufemia/src/components/timeline/__tests__/__image_snapshots__/timeline-have-to-match-timeline-states.snap.png differ diff --git a/packages/dnb-eufemia/src/components/timeline/__tests__/__image_snapshots__/timeline-have-to-match-timeline-with-multiple-completed-time-ine-items.snap.png b/packages/dnb-eufemia/src/components/timeline/__tests__/__image_snapshots__/timeline-have-to-match-timeline-with-multiple-completed-time-ine-items.snap.png new file mode 100644 index 00000000000..23657ce1f02 Binary files /dev/null and b/packages/dnb-eufemia/src/components/timeline/__tests__/__image_snapshots__/timeline-have-to-match-timeline-with-multiple-completed-time-ine-items.snap.png differ diff --git a/packages/dnb-eufemia/src/components/timeline/__tests__/__image_snapshots__/timeline-have-to-match-timeline-with-multiple-current-timeline-items.snap.png b/packages/dnb-eufemia/src/components/timeline/__tests__/__image_snapshots__/timeline-have-to-match-timeline-with-multiple-current-timeline-items.snap.png new file mode 100644 index 00000000000..4eb47b8d0d1 Binary files /dev/null and b/packages/dnb-eufemia/src/components/timeline/__tests__/__image_snapshots__/timeline-have-to-match-timeline-with-multiple-current-timeline-items.snap.png differ diff --git a/packages/dnb-eufemia/src/components/timeline/__tests__/__image_snapshots__/timeline-have-to-match-timeline-with-multiple-upcoming-timeline-items.snap.png b/packages/dnb-eufemia/src/components/timeline/__tests__/__image_snapshots__/timeline-have-to-match-timeline-with-multiple-upcoming-timeline-items.snap.png new file mode 100644 index 00000000000..c56748c19fd Binary files /dev/null and b/packages/dnb-eufemia/src/components/timeline/__tests__/__image_snapshots__/timeline-have-to-match-timeline-with-multiple-upcoming-timeline-items.snap.png differ diff --git a/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-as-children-skeleton-1-bc4f1.snap.png b/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-as-children-skeleton-1-bc4f1.snap.png deleted file mode 100644 index 5e5520a79c8..00000000000 Binary files a/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-as-children-skeleton-1-bc4f1.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-icons-1-e1616.snap.png b/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-icons-1-e1616.snap.png deleted file mode 100644 index d98f8033cdc..00000000000 Binary files a/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-icons-1-e1616.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-icons-2-3e8d7.snap.png b/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-icons-2-3e8d7.snap.png deleted file mode 100644 index d98f8033cdc..00000000000 Binary files a/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-icons-2-3e8d7.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-item-skeleton-1-7e15f.snap.png b/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-item-skeleton-1-7e15f.snap.png deleted file mode 100644 index 6a9371a3c6e..00000000000 Binary files a/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-item-skeleton-1-7e15f.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-multiple-1-7b364.snap.png b/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-multiple-1-7b364.snap.png deleted file mode 100644 index c6abb670463..00000000000 Binary files a/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-multiple-1-7b364.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-multiple-with-children-1-b5a74.snap.png b/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-multiple-with-children-1-b5a74.snap.png deleted file mode 100644 index c6abb670463..00000000000 Binary files a/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-multiple-with-children-1-b5a74.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-single-1-dc5be.snap.png b/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-single-1-dc5be.snap.png deleted file mode 100644 index e3cfbc3b4d2..00000000000 Binary files a/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-single-1-dc5be.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-single-completed-1-adc72.snap.png b/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-single-completed-1-adc72.snap.png deleted file mode 100644 index 73cdf307d87..00000000000 Binary files a/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-single-completed-1-adc72.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-single-current-1-ba668.snap.png b/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-single-current-1-ba668.snap.png deleted file mode 100644 index b992582c1b1..00000000000 Binary files a/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-single-current-1-ba668.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-single-upcoming-1-b5850.snap.png b/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-single-upcoming-1-b5850.snap.png deleted file mode 100644 index 1ab4dc38ece..00000000000 Binary files a/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-single-upcoming-1-b5850.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-skeleton-1-5cfaa.snap.png b/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-skeleton-1-5cfaa.snap.png deleted file mode 100644 index 5e5520a79c8..00000000000 Binary files a/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-skeleton-1-5cfaa.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-states-1-e31a0.snap.png b/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-states-1-e31a0.snap.png deleted file mode 100644 index 1fa7ae259cb..00000000000 Binary files a/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-states-1-e31a0.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-with-multiple-completed-time-ine-items-1-b1617.snap.png b/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-with-multiple-completed-time-ine-items-1-b1617.snap.png deleted file mode 100644 index a9a1d3d27b7..00000000000 Binary files a/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-with-multiple-completed-time-ine-items-1-b1617.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-with-multiple-current-timeline-items-1-22d5d.snap.png b/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-with-multiple-current-timeline-items-1-22d5d.snap.png deleted file mode 100644 index 965bfaa8c25..00000000000 Binary files a/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-with-multiple-current-timeline-items-1-22d5d.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-with-multiple-upcoming-timeline-items-1-5b819.snap.png b/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-with-multiple-upcoming-timeline-items-1-5b819.snap.png deleted file mode 100644 index dadf8652fea..00000000000 Binary files a/packages/dnb-eufemia/src/components/timeline/__tests__/__snapshots__/timeline-screenshot-test-js-timeline-screenshot-have-to-match-timeline-with-multiple-upcoming-timeline-items-1-5b819.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/toggle-button/__tests__/ToggleButton.screenshot.test.js b/packages/dnb-eufemia/src/components/toggle-button/__tests__/ToggleButton.screenshot.test.js deleted file mode 100644 index 50de9966a07..00000000000 --- a/packages/dnb-eufemia/src/components/toggle-button/__tests__/ToggleButton.screenshot.test.js +++ /dev/null @@ -1,109 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -describe('ToggleButton unchecked screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/toggle-button/demos', - }) - - it('have to match toggle-button in unchecked state', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="toggle-button-default"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match toggle-button in unchecked state with focus', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="toggle-button-default"]', - simulateSelector: - '[data-visual-test="toggle-button-default"] .dnb-toggle-button__button', - simulate: 'focus', // should be tested first - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match toggle-button in unchecked state with hover', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="toggle-button-default"]', - simulateSelector: - '[data-visual-test="toggle-button-default"] .dnb-toggle-button__button', - simulate: 'hover', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -// NB: Because of focus simulation and screenshotElement.press('Tab') -// we have to run the two focus simulations in a separate run each -describe('ToggleButton checked screenshot', () => { - setupPageScreenshot({ url: '/uilib/components/toggle-button/demos' }) - - it('have to match toggle-button in checked state', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="toggle-button-checked"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match toggle-button in checked state with focus', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="toggle-button-checked"]', - simulateSelector: - '[data-visual-test="toggle-button-checked"] .dnb-toggle-button__button', - simulate: 'focus', // should be tested first - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match toggle-button in checked state with hover', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="toggle-button-checked"]', - simulateSelector: - '[data-visual-test="toggle-button-checked"] .dnb-toggle-button__button', - simulate: 'hover', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match toggle-button in active focus state', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="toggle-button-checked"]', - simulateSelector: - '[data-visual-test="toggle-button-checked"] .dnb-toggle-button__button', - simulate: 'clickfocus', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match toggle-button group', async () => { - const screenshot = await testPageScreenshot({ - selector: - '[data-visual-test="toggle-button-group-default"] .dnb-toggle-button-group', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match toggle-button group in vertical layout', async () => { - const screenshot = await testPageScreenshot({ - selector: - '[data-visual-test="toggle-button-group-vertical"] .dnb-toggle-button-group', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match toggle-button group with form-status', async () => { - const screenshot = await testPageScreenshot({ - selector: - '[data-visual-test="toggle-button-group-status"] .dnb-toggle-button-group', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/components/toggle-button/__tests__/ToggleButton.screenshot.test.ts b/packages/dnb-eufemia/src/components/toggle-button/__tests__/ToggleButton.screenshot.test.ts new file mode 100644 index 00000000000..00fcf1701c2 --- /dev/null +++ b/packages/dnb-eufemia/src/components/toggle-button/__tests__/ToggleButton.screenshot.test.ts @@ -0,0 +1,111 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../../core/jest/jestSetupScreenshots' + +describe('ToggleButton', () => { + describe('ToggleButto unchecked', () => { + setupPageScreenshot({ + url: '/uilib/components/toggle-button/demos', + }) + + it('have to match toggle-button in unchecked state', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="toggle-button-default"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match toggle-button in unchecked state with focus', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="toggle-button-default"]', + simulateSelector: + '[data-visual-test="toggle-button-default"] .dnb-toggle-button__button', + simulate: 'focus', // should be tested first + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match toggle-button in unchecked state with hover', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="toggle-button-default"]', + simulateSelector: + '[data-visual-test="toggle-button-default"] .dnb-toggle-button__button', + simulate: 'hover', + }) + expect(screenshot).toMatchImageSnapshot() + }) + }) + + // NB: Because of focus simulation and screenshotElement.press('Tab') + // we have to run the two focus simulations in a separate run each + describe('checked', () => { + setupPageScreenshot({ url: '/uilib/components/toggle-button/demos' }) + + it('have to match toggle-button in checked state', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="toggle-button-checked"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match toggle-button in checked state with focus', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="toggle-button-checked"]', + simulateSelector: + '[data-visual-test="toggle-button-checked"] .dnb-toggle-button__button', + simulate: 'focus', // should be tested first + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match toggle-button in checked state with hover', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="toggle-button-checked"]', + simulateSelector: + '[data-visual-test="toggle-button-checked"] .dnb-toggle-button__button', + simulate: 'hover', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match toggle-button in active focus state', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="toggle-button-checked"]', + simulateSelector: + '[data-visual-test="toggle-button-checked"] .dnb-toggle-button__button', + simulate: 'clickfocus', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match toggle-button group', async () => { + const screenshot = await makeScreenshot({ + selector: + '[data-visual-test="toggle-button-group-default"] .dnb-toggle-button-group', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match toggle-button group in vertical layout', async () => { + const screenshot = await makeScreenshot({ + selector: + '[data-visual-test="toggle-button-group-vertical"] .dnb-toggle-button-group', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match toggle-button group with form-status', async () => { + const screenshot = await makeScreenshot({ + selector: + '[data-visual-test="toggle-button-group-status"] .dnb-toggle-button-group', + }) + expect(screenshot).toMatchImageSnapshot() + }) + }) +}) diff --git a/packages/dnb-eufemia/src/components/toggle-button/__tests__/__image_snapshots__/togglebutton-checked-have-to-match-toggle-button-group-in-vertical-layout.snap.png b/packages/dnb-eufemia/src/components/toggle-button/__tests__/__image_snapshots__/togglebutton-checked-have-to-match-toggle-button-group-in-vertical-layout.snap.png new file mode 100644 index 00000000000..592ab22ac53 Binary files /dev/null and b/packages/dnb-eufemia/src/components/toggle-button/__tests__/__image_snapshots__/togglebutton-checked-have-to-match-toggle-button-group-in-vertical-layout.snap.png differ diff --git a/packages/dnb-eufemia/src/components/toggle-button/__tests__/__image_snapshots__/togglebutton-checked-have-to-match-toggle-button-group-with-form-status.snap.png b/packages/dnb-eufemia/src/components/toggle-button/__tests__/__image_snapshots__/togglebutton-checked-have-to-match-toggle-button-group-with-form-status.snap.png new file mode 100644 index 00000000000..ce8f07f288e Binary files /dev/null and b/packages/dnb-eufemia/src/components/toggle-button/__tests__/__image_snapshots__/togglebutton-checked-have-to-match-toggle-button-group-with-form-status.snap.png differ diff --git a/packages/dnb-eufemia/src/components/toggle-button/__tests__/__image_snapshots__/togglebutton-checked-have-to-match-toggle-button-group.snap.png b/packages/dnb-eufemia/src/components/toggle-button/__tests__/__image_snapshots__/togglebutton-checked-have-to-match-toggle-button-group.snap.png new file mode 100644 index 00000000000..791af3c21fc Binary files /dev/null and b/packages/dnb-eufemia/src/components/toggle-button/__tests__/__image_snapshots__/togglebutton-checked-have-to-match-toggle-button-group.snap.png differ diff --git a/packages/dnb-eufemia/src/components/toggle-button/__tests__/__image_snapshots__/togglebutton-checked-have-to-match-toggle-button-in-active-focus-state.snap.png b/packages/dnb-eufemia/src/components/toggle-button/__tests__/__image_snapshots__/togglebutton-checked-have-to-match-toggle-button-in-active-focus-state.snap.png new file mode 100644 index 00000000000..afdd5fa0174 Binary files /dev/null and b/packages/dnb-eufemia/src/components/toggle-button/__tests__/__image_snapshots__/togglebutton-checked-have-to-match-toggle-button-in-active-focus-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/toggle-button/__tests__/__image_snapshots__/togglebutton-checked-have-to-match-toggle-button-in-checked-state-with-focus.snap.png b/packages/dnb-eufemia/src/components/toggle-button/__tests__/__image_snapshots__/togglebutton-checked-have-to-match-toggle-button-in-checked-state-with-focus.snap.png new file mode 100644 index 00000000000..fd899dd2b71 Binary files /dev/null and b/packages/dnb-eufemia/src/components/toggle-button/__tests__/__image_snapshots__/togglebutton-checked-have-to-match-toggle-button-in-checked-state-with-focus.snap.png differ diff --git a/packages/dnb-eufemia/src/components/toggle-button/__tests__/__image_snapshots__/togglebutton-checked-have-to-match-toggle-button-in-checked-state-with-hover.snap.png b/packages/dnb-eufemia/src/components/toggle-button/__tests__/__image_snapshots__/togglebutton-checked-have-to-match-toggle-button-in-checked-state-with-hover.snap.png new file mode 100644 index 00000000000..d19629fe92f Binary files /dev/null and b/packages/dnb-eufemia/src/components/toggle-button/__tests__/__image_snapshots__/togglebutton-checked-have-to-match-toggle-button-in-checked-state-with-hover.snap.png differ diff --git a/packages/dnb-eufemia/src/components/toggle-button/__tests__/__image_snapshots__/togglebutton-checked-have-to-match-toggle-button-in-checked-state.snap.png b/packages/dnb-eufemia/src/components/toggle-button/__tests__/__image_snapshots__/togglebutton-checked-have-to-match-toggle-button-in-checked-state.snap.png new file mode 100644 index 00000000000..e998c37fc8d Binary files /dev/null and b/packages/dnb-eufemia/src/components/toggle-button/__tests__/__image_snapshots__/togglebutton-checked-have-to-match-toggle-button-in-checked-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/toggle-button/__tests__/__image_snapshots__/togglebutton-togglebutto-unchecked-have-to-match-toggle-button-in-unchecked-state-with-focus.snap.png b/packages/dnb-eufemia/src/components/toggle-button/__tests__/__image_snapshots__/togglebutton-togglebutto-unchecked-have-to-match-toggle-button-in-unchecked-state-with-focus.snap.png new file mode 100644 index 00000000000..e3248df3940 Binary files /dev/null and b/packages/dnb-eufemia/src/components/toggle-button/__tests__/__image_snapshots__/togglebutton-togglebutto-unchecked-have-to-match-toggle-button-in-unchecked-state-with-focus.snap.png differ diff --git a/packages/dnb-eufemia/src/components/toggle-button/__tests__/__image_snapshots__/togglebutton-togglebutto-unchecked-have-to-match-toggle-button-in-unchecked-state-with-hover.snap.png b/packages/dnb-eufemia/src/components/toggle-button/__tests__/__image_snapshots__/togglebutton-togglebutto-unchecked-have-to-match-toggle-button-in-unchecked-state-with-hover.snap.png new file mode 100644 index 00000000000..9efd8c3d747 Binary files /dev/null and b/packages/dnb-eufemia/src/components/toggle-button/__tests__/__image_snapshots__/togglebutton-togglebutto-unchecked-have-to-match-toggle-button-in-unchecked-state-with-hover.snap.png differ diff --git a/packages/dnb-eufemia/src/components/toggle-button/__tests__/__image_snapshots__/togglebutton-togglebutto-unchecked-have-to-match-toggle-button-in-unchecked-state.snap.png b/packages/dnb-eufemia/src/components/toggle-button/__tests__/__image_snapshots__/togglebutton-togglebutto-unchecked-have-to-match-toggle-button-in-unchecked-state.snap.png new file mode 100644 index 00000000000..aa336982e9d Binary files /dev/null and b/packages/dnb-eufemia/src/components/toggle-button/__tests__/__image_snapshots__/togglebutton-togglebutto-unchecked-have-to-match-toggle-button-in-unchecked-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/toggle-button/__tests__/__snapshots__/toggle-button-screenshot-test-js-toggle-button-checked-screenshot-have-to-match-toggle-button-group-1-b4ef7.snap.png b/packages/dnb-eufemia/src/components/toggle-button/__tests__/__snapshots__/toggle-button-screenshot-test-js-toggle-button-checked-screenshot-have-to-match-toggle-button-group-1-b4ef7.snap.png deleted file mode 100644 index 40d1c8f286a..00000000000 Binary files a/packages/dnb-eufemia/src/components/toggle-button/__tests__/__snapshots__/toggle-button-screenshot-test-js-toggle-button-checked-screenshot-have-to-match-toggle-button-group-1-b4ef7.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/toggle-button/__tests__/__snapshots__/toggle-button-screenshot-test-js-toggle-button-checked-screenshot-have-to-match-toggle-button-group-2-08a83.snap.png b/packages/dnb-eufemia/src/components/toggle-button/__tests__/__snapshots__/toggle-button-screenshot-test-js-toggle-button-checked-screenshot-have-to-match-toggle-button-group-2-08a83.snap.png deleted file mode 100644 index 40d1c8f286a..00000000000 Binary files a/packages/dnb-eufemia/src/components/toggle-button/__tests__/__snapshots__/toggle-button-screenshot-test-js-toggle-button-checked-screenshot-have-to-match-toggle-button-group-2-08a83.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/toggle-button/__tests__/__snapshots__/toggle-button-screenshot-test-js-toggle-button-checked-screenshot-have-to-match-toggle-button-group-in-vertical-layout-1-8fb66.snap.png b/packages/dnb-eufemia/src/components/toggle-button/__tests__/__snapshots__/toggle-button-screenshot-test-js-toggle-button-checked-screenshot-have-to-match-toggle-button-group-in-vertical-layout-1-8fb66.snap.png deleted file mode 100644 index 7ad5fe759c2..00000000000 Binary files a/packages/dnb-eufemia/src/components/toggle-button/__tests__/__snapshots__/toggle-button-screenshot-test-js-toggle-button-checked-screenshot-have-to-match-toggle-button-group-in-vertical-layout-1-8fb66.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/toggle-button/__tests__/__snapshots__/toggle-button-screenshot-test-js-toggle-button-checked-screenshot-have-to-match-toggle-button-group-with-form-status-1-127dd.snap.png b/packages/dnb-eufemia/src/components/toggle-button/__tests__/__snapshots__/toggle-button-screenshot-test-js-toggle-button-checked-screenshot-have-to-match-toggle-button-group-with-form-status-1-127dd.snap.png deleted file mode 100644 index 7d933ed05db..00000000000 Binary files a/packages/dnb-eufemia/src/components/toggle-button/__tests__/__snapshots__/toggle-button-screenshot-test-js-toggle-button-checked-screenshot-have-to-match-toggle-button-group-with-form-status-1-127dd.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/toggle-button/__tests__/__snapshots__/toggle-button-screenshot-test-js-toggle-button-checked-screenshot-have-to-match-toggle-button-in-active-focus-state-1-55ba4.snap.png b/packages/dnb-eufemia/src/components/toggle-button/__tests__/__snapshots__/toggle-button-screenshot-test-js-toggle-button-checked-screenshot-have-to-match-toggle-button-in-active-focus-state-1-55ba4.snap.png deleted file mode 100644 index 2e35a78ef7f..00000000000 Binary files a/packages/dnb-eufemia/src/components/toggle-button/__tests__/__snapshots__/toggle-button-screenshot-test-js-toggle-button-checked-screenshot-have-to-match-toggle-button-in-active-focus-state-1-55ba4.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/toggle-button/__tests__/__snapshots__/toggle-button-screenshot-test-js-toggle-button-checked-screenshot-have-to-match-toggle-button-in-checked-state-1-3c3b4.snap.png b/packages/dnb-eufemia/src/components/toggle-button/__tests__/__snapshots__/toggle-button-screenshot-test-js-toggle-button-checked-screenshot-have-to-match-toggle-button-in-checked-state-1-3c3b4.snap.png deleted file mode 100644 index 2d633511625..00000000000 Binary files a/packages/dnb-eufemia/src/components/toggle-button/__tests__/__snapshots__/toggle-button-screenshot-test-js-toggle-button-checked-screenshot-have-to-match-toggle-button-in-checked-state-1-3c3b4.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/toggle-button/__tests__/__snapshots__/toggle-button-screenshot-test-js-toggle-button-checked-screenshot-have-to-match-toggle-button-in-checked-state-with-focus-1-f54f3.snap.png b/packages/dnb-eufemia/src/components/toggle-button/__tests__/__snapshots__/toggle-button-screenshot-test-js-toggle-button-checked-screenshot-have-to-match-toggle-button-in-checked-state-with-focus-1-f54f3.snap.png deleted file mode 100644 index 2c8e84f6f76..00000000000 Binary files a/packages/dnb-eufemia/src/components/toggle-button/__tests__/__snapshots__/toggle-button-screenshot-test-js-toggle-button-checked-screenshot-have-to-match-toggle-button-in-checked-state-with-focus-1-f54f3.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/toggle-button/__tests__/__snapshots__/toggle-button-screenshot-test-js-toggle-button-checked-screenshot-have-to-match-toggle-button-in-checked-state-with-hover-1-01c2c.snap.png b/packages/dnb-eufemia/src/components/toggle-button/__tests__/__snapshots__/toggle-button-screenshot-test-js-toggle-button-checked-screenshot-have-to-match-toggle-button-in-checked-state-with-hover-1-01c2c.snap.png deleted file mode 100644 index 9fb411826e5..00000000000 Binary files a/packages/dnb-eufemia/src/components/toggle-button/__tests__/__snapshots__/toggle-button-screenshot-test-js-toggle-button-checked-screenshot-have-to-match-toggle-button-in-checked-state-with-hover-1-01c2c.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/toggle-button/__tests__/__snapshots__/toggle-button-screenshot-test-js-toggle-button-unchecked-screenshot-have-to-match-toggle-button-in-unchecked-state-1-1adb4.snap.png b/packages/dnb-eufemia/src/components/toggle-button/__tests__/__snapshots__/toggle-button-screenshot-test-js-toggle-button-unchecked-screenshot-have-to-match-toggle-button-in-unchecked-state-1-1adb4.snap.png deleted file mode 100644 index 0d86a589f0c..00000000000 Binary files a/packages/dnb-eufemia/src/components/toggle-button/__tests__/__snapshots__/toggle-button-screenshot-test-js-toggle-button-unchecked-screenshot-have-to-match-toggle-button-in-unchecked-state-1-1adb4.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/toggle-button/__tests__/__snapshots__/toggle-button-screenshot-test-js-toggle-button-unchecked-screenshot-have-to-match-toggle-button-in-unchecked-state-with-focus-1-912dd.snap.png b/packages/dnb-eufemia/src/components/toggle-button/__tests__/__snapshots__/toggle-button-screenshot-test-js-toggle-button-unchecked-screenshot-have-to-match-toggle-button-in-unchecked-state-with-focus-1-912dd.snap.png deleted file mode 100644 index 9cb99164d40..00000000000 Binary files a/packages/dnb-eufemia/src/components/toggle-button/__tests__/__snapshots__/toggle-button-screenshot-test-js-toggle-button-unchecked-screenshot-have-to-match-toggle-button-in-unchecked-state-with-focus-1-912dd.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/toggle-button/__tests__/__snapshots__/toggle-button-screenshot-test-js-toggle-button-unchecked-screenshot-have-to-match-toggle-button-in-unchecked-state-with-hover-1-2eba2.snap.png b/packages/dnb-eufemia/src/components/toggle-button/__tests__/__snapshots__/toggle-button-screenshot-test-js-toggle-button-unchecked-screenshot-have-to-match-toggle-button-in-unchecked-state-with-hover-1-2eba2.snap.png deleted file mode 100644 index b3ace7611d0..00000000000 Binary files a/packages/dnb-eufemia/src/components/toggle-button/__tests__/__snapshots__/toggle-button-screenshot-test-js-toggle-button-unchecked-screenshot-have-to-match-toggle-button-in-unchecked-state-with-hover-1-2eba2.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/tooltip/__tests__/Tooltip.screenshot.test.js b/packages/dnb-eufemia/src/components/tooltip/__tests__/Tooltip.screenshot.test.js deleted file mode 100644 index 44003259c98..00000000000 --- a/packages/dnb-eufemia/src/components/tooltip/__tests__/Tooltip.screenshot.test.js +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -describe('Tooltip', () => { - setupPageScreenshot({ - url: '/uilib/components/tooltip/demos', - }) - - it('have to match tooltip on button hover state', async () => { - const screenshot = await testPageScreenshot({ - style: { - height: '4rem', - 'padding-top': '2rem', - }, - selector: '[data-visual-test="tooltip-hover"]', - simulateSelector: '[data-visual-test="tooltip-hover"] button', - simulate: 'hover', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match tooltip in large size', async () => { - const screenshot = await testPageScreenshot({ - style: { - height: '5rem', - padding: '3rem 0 0 2rem', - }, - selector: '[data-visual-test="tooltip-large"]', - simulateSelector: - '[data-visual-test="tooltip-large"] .dnb-span:nth-of-type(1)', - simulate: 'hover', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/components/tooltip/__tests__/Tooltip.screenshot.test.ts b/packages/dnb-eufemia/src/components/tooltip/__tests__/Tooltip.screenshot.test.ts new file mode 100644 index 00000000000..d5c9eeed0ff --- /dev/null +++ b/packages/dnb-eufemia/src/components/tooltip/__tests__/Tooltip.screenshot.test.ts @@ -0,0 +1,42 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../../core/jest/jestSetupScreenshots' + +describe('Tooltip', () => { + setupPageScreenshot({ + url: '/uilib/components/tooltip/demos', + }) + + it('have to match tooltip on button hover state', async () => { + const screenshot = await makeScreenshot({ + style: { + height: '4rem', + 'padding-top': '2rem', + }, + selector: '[data-visual-test="tooltip-hover"]', + simulateSelector: '[data-visual-test="tooltip-hover"] button', + simulate: 'hover', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match tooltip in large size', async () => { + const screenshot = await makeScreenshot({ + style: { + height: '5rem', + padding: '3rem 0 0 2rem', + }, + selector: '[data-visual-test="tooltip-large"]', + simulateSelector: + '[data-visual-test="tooltip-large"] .dnb-span:nth-of-type(1)', + simulate: 'hover', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/components/tooltip/__tests__/__image_snapshots__/tooltip-have-to-match-tooltip-in-large-size.snap.png b/packages/dnb-eufemia/src/components/tooltip/__tests__/__image_snapshots__/tooltip-have-to-match-tooltip-in-large-size.snap.png new file mode 100644 index 00000000000..961b14bb968 Binary files /dev/null and b/packages/dnb-eufemia/src/components/tooltip/__tests__/__image_snapshots__/tooltip-have-to-match-tooltip-in-large-size.snap.png differ diff --git a/packages/dnb-eufemia/src/components/tooltip/__tests__/__image_snapshots__/tooltip-have-to-match-tooltip-on-button-hover-state.snap.png b/packages/dnb-eufemia/src/components/tooltip/__tests__/__image_snapshots__/tooltip-have-to-match-tooltip-on-button-hover-state.snap.png new file mode 100644 index 00000000000..3b93afc5d65 Binary files /dev/null and b/packages/dnb-eufemia/src/components/tooltip/__tests__/__image_snapshots__/tooltip-have-to-match-tooltip-on-button-hover-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/tooltip/__tests__/__snapshots__/tooltip-screenshot-test-js-tooltip-have-to-match-tooltip-in-large-size-1-8bb66.snap.png b/packages/dnb-eufemia/src/components/tooltip/__tests__/__snapshots__/tooltip-screenshot-test-js-tooltip-have-to-match-tooltip-in-large-size-1-8bb66.snap.png deleted file mode 100644 index e549804633d..00000000000 Binary files a/packages/dnb-eufemia/src/components/tooltip/__tests__/__snapshots__/tooltip-screenshot-test-js-tooltip-have-to-match-tooltip-in-large-size-1-8bb66.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/tooltip/__tests__/__snapshots__/tooltip-screenshot-test-js-tooltip-have-to-match-tooltip-on-button-hover-state-1-7d3aa.snap.png b/packages/dnb-eufemia/src/components/tooltip/__tests__/__snapshots__/tooltip-screenshot-test-js-tooltip-have-to-match-tooltip-on-button-hover-state-1-7d3aa.snap.png deleted file mode 100644 index 5ddff05b3c1..00000000000 Binary files a/packages/dnb-eufemia/src/components/tooltip/__tests__/__snapshots__/tooltip-screenshot-test-js-tooltip-have-to-match-tooltip-on-button-hover-state-1-7d3aa.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/upload/__tests__/Upload.screenshot.test.ts b/packages/dnb-eufemia/src/components/upload/__tests__/Upload.screenshot.test.ts new file mode 100644 index 00000000000..c7a71a9d6ce --- /dev/null +++ b/packages/dnb-eufemia/src/components/upload/__tests__/Upload.screenshot.test.ts @@ -0,0 +1,50 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../../core/jest/jestSetupScreenshots' + +describe('Upload', () => { + setupPageScreenshot({ url: '/uilib/components/upload/demos' }) + + it('have to match the default', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="upload-basic"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the loading state', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="upload-is-loading"] .dnb-upload', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match file list', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="upload-file-list"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) + +describe('Upload', () => { + setupPageScreenshot({ + url: '/uilib/components/upload/demos', + pageViewport: { + width: 480, // 30rem + }, + }) + + it('have to match small screens', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="upload-basic"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/components/upload/__tests__/Upload.screenshot.test.tsx b/packages/dnb-eufemia/src/components/upload/__tests__/Upload.screenshot.test.tsx deleted file mode 100644 index bd18d93da69..00000000000 --- a/packages/dnb-eufemia/src/components/upload/__tests__/Upload.screenshot.test.tsx +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -describe('Upload screenshot', () => { - setupPageScreenshot({ url: '/uilib/components/upload/demos' }) - - it('have to match the default', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="upload-basic"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the loading state', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="upload-is-loading"] .dnb-upload', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match file list', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="upload-file-list"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Upload screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/upload/demos', - pageViewport: { - width: 480, // 30rem - }, - }) - - it('have to match small screens', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="upload-basic"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/components/upload/__tests__/__image_snapshots__/upload-have-to-match-file-list.snap.png b/packages/dnb-eufemia/src/components/upload/__tests__/__image_snapshots__/upload-have-to-match-file-list.snap.png new file mode 100644 index 00000000000..f0289f24f54 Binary files /dev/null and b/packages/dnb-eufemia/src/components/upload/__tests__/__image_snapshots__/upload-have-to-match-file-list.snap.png differ diff --git a/packages/dnb-eufemia/src/components/upload/__tests__/__image_snapshots__/upload-have-to-match-small-screens.snap.png b/packages/dnb-eufemia/src/components/upload/__tests__/__image_snapshots__/upload-have-to-match-small-screens.snap.png new file mode 100644 index 00000000000..0619c6fe356 Binary files /dev/null and b/packages/dnb-eufemia/src/components/upload/__tests__/__image_snapshots__/upload-have-to-match-small-screens.snap.png differ diff --git a/packages/dnb-eufemia/src/components/upload/__tests__/__image_snapshots__/upload-have-to-match-the-default.snap.png b/packages/dnb-eufemia/src/components/upload/__tests__/__image_snapshots__/upload-have-to-match-the-default.snap.png new file mode 100644 index 00000000000..62f5b2109eb Binary files /dev/null and b/packages/dnb-eufemia/src/components/upload/__tests__/__image_snapshots__/upload-have-to-match-the-default.snap.png differ diff --git a/packages/dnb-eufemia/src/components/upload/__tests__/__image_snapshots__/upload-have-to-match-the-loading-state.snap.png b/packages/dnb-eufemia/src/components/upload/__tests__/__image_snapshots__/upload-have-to-match-the-loading-state.snap.png new file mode 100644 index 00000000000..13954e6b734 Binary files /dev/null and b/packages/dnb-eufemia/src/components/upload/__tests__/__image_snapshots__/upload-have-to-match-the-loading-state.snap.png differ diff --git a/packages/dnb-eufemia/src/components/upload/__tests__/__snapshots__/upload-screenshot-test-tsx-upload-screenshot-have-to-match-file-list-1-5a4ab.snap.png b/packages/dnb-eufemia/src/components/upload/__tests__/__snapshots__/upload-screenshot-test-tsx-upload-screenshot-have-to-match-file-list-1-5a4ab.snap.png deleted file mode 100644 index f423f7ba54e..00000000000 Binary files a/packages/dnb-eufemia/src/components/upload/__tests__/__snapshots__/upload-screenshot-test-tsx-upload-screenshot-have-to-match-file-list-1-5a4ab.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/upload/__tests__/__snapshots__/upload-screenshot-test-tsx-upload-screenshot-have-to-match-small-screens-1-667f0.snap.png b/packages/dnb-eufemia/src/components/upload/__tests__/__snapshots__/upload-screenshot-test-tsx-upload-screenshot-have-to-match-small-screens-1-667f0.snap.png deleted file mode 100644 index 5398382c43a..00000000000 Binary files a/packages/dnb-eufemia/src/components/upload/__tests__/__snapshots__/upload-screenshot-test-tsx-upload-screenshot-have-to-match-small-screens-1-667f0.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/upload/__tests__/__snapshots__/upload-screenshot-test-tsx-upload-screenshot-have-to-match-the-default-1-8151d.snap.png b/packages/dnb-eufemia/src/components/upload/__tests__/__snapshots__/upload-screenshot-test-tsx-upload-screenshot-have-to-match-the-default-1-8151d.snap.png deleted file mode 100644 index aec332047fe..00000000000 Binary files a/packages/dnb-eufemia/src/components/upload/__tests__/__snapshots__/upload-screenshot-test-tsx-upload-screenshot-have-to-match-the-default-1-8151d.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/upload/__tests__/__snapshots__/upload-screenshot-test-tsx-upload-screenshot-have-to-match-the-loading-state-1-a8c24.snap.png b/packages/dnb-eufemia/src/components/upload/__tests__/__snapshots__/upload-screenshot-test-tsx-upload-screenshot-have-to-match-the-loading-state-1-a8c24.snap.png deleted file mode 100644 index 43de516c255..00000000000 Binary files a/packages/dnb-eufemia/src/components/upload/__tests__/__snapshots__/upload-screenshot-test-tsx-upload-screenshot-have-to-match-the-loading-state-1-a8c24.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/visually-hidden/__tests__/VisuallyHidden.screenshot.test.ts b/packages/dnb-eufemia/src/components/visually-hidden/__tests__/VisuallyHidden.screenshot.test.ts new file mode 100644 index 00000000000..c123eef083b --- /dev/null +++ b/packages/dnb-eufemia/src/components/visually-hidden/__tests__/VisuallyHidden.screenshot.test.ts @@ -0,0 +1,44 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../../core/jest/jestSetupScreenshots' + +describe('VisuallyHidden', () => { + setupPageScreenshot({ url: '/uilib/components/visually-hidden/demos' }) + + it('have to match VisuallyHidden default', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="visually-hidden-default"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match VisuallyHidden use case', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="visually-hidden-use-case"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match VisuallyHidden element element', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="visually-hidden-element"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match VisuallyHidden focusable', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="visually-hidden-focusable"]', + simulateSelector: + '[data-visual-test="visually-hidden-focusable"] .dnb-visually-hidden', + simulate: 'focus', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/components/visually-hidden/__tests__/VisuallyHidden.screenshot.test.tsx b/packages/dnb-eufemia/src/components/visually-hidden/__tests__/VisuallyHidden.screenshot.test.tsx deleted file mode 100644 index c443b2cae4f..00000000000 --- a/packages/dnb-eufemia/src/components/visually-hidden/__tests__/VisuallyHidden.screenshot.test.tsx +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -describe('VisuallyHidden screenshot', () => { - setupPageScreenshot({ url: '/uilib/components/visually-hidden/demos' }) - - it('have to match VisuallyHidden default', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="visually-hidden-default"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match VisuallyHidden use case', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="visually-hidden-use-case"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match VisuallyHidden element element', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="visually-hidden-element"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match VisuallyHidden focusable', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="visually-hidden-focusable"]', - simulateSelector: - '[data-visual-test="visually-hidden-focusable"] .dnb-visually-hidden', - simulate: 'focus', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/components/visually-hidden/__tests__/__image_snapshots__/visuallyhidden-have-to-match-visuallyhidden-default.snap.png b/packages/dnb-eufemia/src/components/visually-hidden/__tests__/__image_snapshots__/visuallyhidden-have-to-match-visuallyhidden-default.snap.png new file mode 100644 index 00000000000..9305106e6bb Binary files /dev/null and b/packages/dnb-eufemia/src/components/visually-hidden/__tests__/__image_snapshots__/visuallyhidden-have-to-match-visuallyhidden-default.snap.png differ diff --git a/packages/dnb-eufemia/src/components/visually-hidden/__tests__/__snapshots__/visually-hidden-screenshot-test-tsx-visually-hidden-screenshot-have-to-match-visually-hidden-element-element-1-e298d.snap.png b/packages/dnb-eufemia/src/components/visually-hidden/__tests__/__image_snapshots__/visuallyhidden-have-to-match-visuallyhidden-element-element.snap.png similarity index 100% rename from packages/dnb-eufemia/src/components/visually-hidden/__tests__/__snapshots__/visually-hidden-screenshot-test-tsx-visually-hidden-screenshot-have-to-match-visually-hidden-element-element-1-e298d.snap.png rename to packages/dnb-eufemia/src/components/visually-hidden/__tests__/__image_snapshots__/visuallyhidden-have-to-match-visuallyhidden-element-element.snap.png diff --git a/packages/dnb-eufemia/src/components/visually-hidden/__tests__/__image_snapshots__/visuallyhidden-have-to-match-visuallyhidden-focusable.snap.png b/packages/dnb-eufemia/src/components/visually-hidden/__tests__/__image_snapshots__/visuallyhidden-have-to-match-visuallyhidden-focusable.snap.png new file mode 100644 index 00000000000..d2fe3adfc53 Binary files /dev/null and b/packages/dnb-eufemia/src/components/visually-hidden/__tests__/__image_snapshots__/visuallyhidden-have-to-match-visuallyhidden-focusable.snap.png differ diff --git a/packages/dnb-eufemia/src/components/visually-hidden/__tests__/__image_snapshots__/visuallyhidden-have-to-match-visuallyhidden-use-case.snap.png b/packages/dnb-eufemia/src/components/visually-hidden/__tests__/__image_snapshots__/visuallyhidden-have-to-match-visuallyhidden-use-case.snap.png new file mode 100644 index 00000000000..e8f0aa3a1c0 Binary files /dev/null and b/packages/dnb-eufemia/src/components/visually-hidden/__tests__/__image_snapshots__/visuallyhidden-have-to-match-visuallyhidden-use-case.snap.png differ diff --git a/packages/dnb-eufemia/src/components/visually-hidden/__tests__/__snapshots__/visually-hidden-screenshot-test-tsx-visually-hidden-screenshot-have-to-match-visually-hidden-default-1-539cd.snap.png b/packages/dnb-eufemia/src/components/visually-hidden/__tests__/__snapshots__/visually-hidden-screenshot-test-tsx-visually-hidden-screenshot-have-to-match-visually-hidden-default-1-539cd.snap.png deleted file mode 100644 index 45960043ba8..00000000000 Binary files a/packages/dnb-eufemia/src/components/visually-hidden/__tests__/__snapshots__/visually-hidden-screenshot-test-tsx-visually-hidden-screenshot-have-to-match-visually-hidden-default-1-539cd.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/visually-hidden/__tests__/__snapshots__/visually-hidden-screenshot-test-tsx-visually-hidden-screenshot-have-to-match-visually-hidden-focusable-1-42d0d.snap.png b/packages/dnb-eufemia/src/components/visually-hidden/__tests__/__snapshots__/visually-hidden-screenshot-test-tsx-visually-hidden-screenshot-have-to-match-visually-hidden-focusable-1-42d0d.snap.png deleted file mode 100644 index 7e085ef1f6f..00000000000 Binary files a/packages/dnb-eufemia/src/components/visually-hidden/__tests__/__snapshots__/visually-hidden-screenshot-test-tsx-visually-hidden-screenshot-have-to-match-visually-hidden-focusable-1-42d0d.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/components/visually-hidden/__tests__/__snapshots__/visually-hidden-screenshot-test-tsx-visually-hidden-screenshot-have-to-match-visually-hidden-use-case-1-86925.snap.png b/packages/dnb-eufemia/src/components/visually-hidden/__tests__/__snapshots__/visually-hidden-screenshot-test-tsx-visually-hidden-screenshot-have-to-match-visually-hidden-use-case-1-86925.snap.png deleted file mode 100644 index eafd0c673cb..00000000000 Binary files a/packages/dnb-eufemia/src/components/visually-hidden/__tests__/__snapshots__/visually-hidden-screenshot-test-tsx-visually-hidden-screenshot-have-to-match-visually-hidden-use-case-1-86925.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/core/jest/jestPuppeteerEnvironment.js b/packages/dnb-eufemia/src/core/jest/jestPuppeteerEnvironment.js index 2f88e8d56f1..92dc13ab281 100644 --- a/packages/dnb-eufemia/src/core/jest/jestPuppeteerEnvironment.js +++ b/packages/dnb-eufemia/src/core/jest/jestPuppeteerEnvironment.js @@ -3,42 +3,23 @@ * */ -const NodeEnvironment = require('jest-environment-node').default -const fs = require('fs-extra') -const path = require('path') +const PlaywrightEnvironment = + require('jest-playwright-preset/lib/PlaywrightEnvironment').default const chalk = require('chalk') -const puppeteer = require('puppeteer') -const packpath = require('packpath') const { config } = require('./jestSetupScreenshots') const { slugify } = require('../../shared/component-helper') -class PuppeteerEnvironment extends NodeEnvironment { - constructor({ globalConfig, projectConfig }, context) { - super({ globalConfig, projectConfig }, context) - - if (typeof global.__EVENT_FAILURE_CACHE__ === 'undefined') { - global.__EVENT_FAILURE_CACHE__ = {} - } +class JestEnvironment extends PlaywrightEnvironment { + constructor(config, context) { + super(config, context) } async setup() { await super.setup() + } - // get the wsEndpoint - const wsEndpoint = await fs.readFile( - path.join(config.DIR, 'wsEndpoint'), - 'utf8' - ) - if (!wsEndpoint) { - throw new Error('wsEndpoint not found') - } - - // connect to puppeteer - this.global.__BROWSER__ = await puppeteer.connect({ - browserWSEndpoint: wsEndpoint, - }) - - this.global.__PAGE__ = await this.global.__BROWSER__.newPage() + async teardown() { + await super.teardown() } getCurrentTestName(state) { @@ -46,43 +27,15 @@ class PuppeteerEnvironment extends NodeEnvironment { return `${currentlyRunningTest.parent.name} ${currentlyRunningTest.name}` } - async removeUnwantedSnapshots() { - const list = Object.values(global.__EVENT_FAILURE_CACHE__) - for await (const entry of list) { - const { currentTestName, failed } = entry - if (failed === false) { - await this.deleteSnapshots(currentTestName) - } - } - } - - async deleteSnapshots(currentTestName) { - const reportsPath = path.resolve( - packpath.self(), - './jest-screenshot-report/reports' - ) - - if (fs.existsSync(reportsPath)) { - const slug = slugify(currentTestName) - const dirs = await fs.readdir(reportsPath) - - for await (const dir of dirs) { - if (dir.includes(slug)) { - const dirPath = path.resolve(reportsPath, dir) - await fs.rm(dirPath, { recursive: true, force: true }) - } - } - } - } - async handleTestEvent(event, state) { if (config.retryTimes > 0) { if (event.name === 'test_fn_failure') { - this.global.__EVENT_FAILURE__ = true - const currentTestName = this.getCurrentTestName(state) const slug = slugify(currentTestName) + if (typeof global.__EVENT_FAILURE_CACHE__ === 'undefined') { + global.__EVENT_FAILURE_CACHE__ = {} + } global.__EVENT_FAILURE_CACHE__[slug] = { currentTestName, failed: true, @@ -106,19 +59,6 @@ class PuppeteerEnvironment extends NodeEnvironment { } } } - - async teardown() { - await this.global.__PAGE__.close() - this.global.__PAGE__ = null - - await this.removeUnwantedSnapshots() - - await super.teardown() - } - - runScript(script) { - return super.runScript(script) - } } -module.exports = PuppeteerEnvironment +module.exports = JestEnvironment diff --git a/packages/dnb-eufemia/src/core/jest/jestPuppeteerSetup.js b/packages/dnb-eufemia/src/core/jest/jestPuppeteerSetup.js deleted file mode 100644 index 0f666ef789e..00000000000 --- a/packages/dnb-eufemia/src/core/jest/jestPuppeteerSetup.js +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Jest Setup for Screenshot testing - * - */ - -const chalk = require('chalk') -const puppeteer = require('puppeteer') -const mkdirp = require('mkdirp') -const path = require('path') -const fs = require('fs-extra') -const { exec } = require('child_process') -const detectPort = require('detect-port') -const waitOn = require('wait-on') -const { - DIR, - headless, - defaultViewport, - testScreenshotOnHost, - testScreenshotOnPort, -} = require('./jestSetupScreenshots').config - -const startStaticServer = async () => { - try { - const portIsAvailable = await detectPort(testScreenshotOnPort) - if (testScreenshotOnPort === portIsAvailable) { - const publicDirExusts = fs.existsSync( - require.resolve('dnb-design-system-portal/public/index.html') - ) - - if (publicDirExusts) { - global.startedGatsbyServe = true - - // Do not wait for exec to end - const command = `yarn workspace dnb-design-system-portal gatsby serve -p ${testScreenshotOnPort}` - exec(command) - - await waitOn({ - resources: [ - `http://${testScreenshotOnHost}:${testScreenshotOnPort}`, - ], - }) - } else { - throw new Error( - 'No /public folder found. Make sure you run "yarn workspace dnb-design-system-portal build-visual-test" first!' - ) - } - } - } catch (e) { - throw new Error(e) - } -} - -module.exports = async function () { - console.log(chalk.green('Setup Puppeteer')) - - await startStaticServer() - - const browser = await puppeteer.launch({ - defaultViewport, - headless, - devtools: !headless, - // to get rid of the "libX11-xcb.so" missing problem, we set these flags - args: ['--no-sandbox', '--disable-setuid-sandbox'], - }) - - // use the file system to expose the wsEndpoint for TestEnvironments - mkdirp.sync(DIR) - await fs.writeFile(path.join(DIR, 'wsEndpoint'), browser.wsEndpoint()) - - // store the browser instance so we can teardown it later - // this global is only available in the teardown but not in TestEnvironments - global.__ENDPOINT__ = browser -} diff --git a/packages/dnb-eufemia/src/core/jest/jestPuppeteerTeardown.js b/packages/dnb-eufemia/src/core/jest/jestPuppeteerTeardown.js deleted file mode 100644 index ea2108e6a47..00000000000 --- a/packages/dnb-eufemia/src/core/jest/jestPuppeteerTeardown.js +++ /dev/null @@ -1,101 +0,0 @@ -/** - * Jest Setup for Screenshot testing - * - */ - -const fs = require('fs-extra') -const packpath = require('packpath') -const path = require('path') -const { create } = require('tar') -const chalk = require('chalk') -const { exec } = require('child_process') -const { isCI } = require('repo-utils') -import { - commitToBranch, - getCurrentBranchName, -} from '../../../scripts/prebuild/commitToBranch' -const { DIR, testScreenshotOnPort } = - require('./jestSetupScreenshots').config - -module.exports = async function () { - await global.__ENDPOINT__.close() - global.__ENDPOINT__ = null - - // Do not wait for exec to end - if (global.startedGatsbyServe) { - exec( - `lsof -t -i tcp:${testScreenshotOnPort} | xargs kill -9 `, - (error, stdout, stderr) => { - if (error) { - throw new Error(error) - } - if (stderr) { - throw new Error(stderr) - } - } - ) - } - - const countFailures = Object.values( - global.__EVENT_FAILURE_CACHE__ - ).filter(({ failed }) => failed).length - console.log( - chalk.green(`Jest screenshot tests had ${countFailures} failures`) - ) - - // commit a tar of the reports if we are on a CI - if (isCI && countFailures > 0) { - console.log( - chalk.yellow('Will commit "jest-screenshot-report" to git.') - ) - const reportPath = path.resolve( - packpath.self(), - './jest-screenshot-report' - ) - if (fs.existsSync(reportPath)) { - const branchName = await getCurrentBranchName() - const file = `${branchName.replace( - /\//g, - '-' - )}-jest-screenshot-report.tgz` - const filePath = path.resolve(packpath.self(), `./reports/${file}`) - await create( - { - gzip: true, - file: filePath, - }, - ['./jest-screenshot-report'] - ) - const newBranchName = `${branchName}--visual-reports` - await commitToBranch({ - force: true, - skipCI: true, - isFeature: false, - requiredBranch: branchName, - newBranch: newBranchName, - what: 'reports', - filePathsIncludelist: [file], - }) - - const reportUrl = `https://github.com/dnbexperience/eufemia/raw/${newBranchName}/packages/dnb-eufemia/reports/${file}` - console.log( - chalk.green( - ` -Download the Report: -${reportUrl} - -` - ) - ) - } else { - console.log( - chalk.yellow( - `Skipping commit phase. No reports found: ${reportPath}` - ) - ) - } - } - - // clean-up the wsEndpoint file - fs.emptyDir(DIR) -} diff --git a/packages/dnb-eufemia/src/core/jest/jestSetupScreenshots.css b/packages/dnb-eufemia/src/core/jest/jestSetupScreenshots.css index 5278add727c..adbdec24139 100644 --- a/packages/dnb-eufemia/src/core/jest/jestSetupScreenshots.css +++ b/packages/dnb-eufemia/src/core/jest/jestSetupScreenshots.css @@ -1,18 +1,19 @@ /* stop scrolling */ -html[data-visual-test] { +*, +html { scroll-behavior: auto !important; } -html[data-visual-test] .sticky-menu, -html[data-visual-test] #portal-sidebar-menu { +.sticky-menu, +#portal-sidebar-menu { display: none !important; } -html[data-visual-test] .dnb-live-editor, -html[data-visual-test] .dnb-live-toolbar { +.dnb-live-editor, +.dnb-live-toolbar { padding: 0 !important; } -html[data-visual-test] .dnb-app-content { +.dnb-app-content { margin-left: 0 !important; } diff --git a/packages/dnb-eufemia/src/core/jest/jestSetupScreenshots.js b/packages/dnb-eufemia/src/core/jest/jestSetupScreenshots.js index 72d4d415c97..5dcd9f5cc95 100644 --- a/packages/dnb-eufemia/src/core/jest/jestSetupScreenshots.js +++ b/packages/dnb-eufemia/src/core/jest/jestSetupScreenshots.js @@ -5,66 +5,52 @@ const fs = require('fs-extra') const path = require('path') -const { isCI } = require('repo-utils') const os = require('os') -const { setupJestScreenshot } = require('jest-screenshot') -const { makeUniqueId } = require('../../shared/component-helper') const ora = require('ora') +const { isCI } = require('repo-utils') +const { slugify } = require('../../../src/shared/component-helper') +const { makeUniqueId } = require('../../shared/component-helper') const log = ora() -// We may use one of these: load, domcontentloaded, networkidle2 -const waitUntil = isCI ? 'load' : 'load' - const config = { DIR: path.join(os.tmpdir(), 'jest_puppeteer_global_setup'), testScreenshotOnHost: 'localhost', testScreenshotOnPort: 8000, - headless: true, - delayDuringNonheadless: 0, retryTimes: isCI ? 5 : 0, timeout: 30e3, - blockFontRequest: false, - allowedFonts: [], // e.g. 'LiberationMono' pixelGrid: 8, - defaultViewport: {}, pageViewport: { width: 1280, height: 1024, - isMobile: false, - hasTouch: false, - isLandscape: false, - deviceScaleFactor: 1, }, - screenshotConfig: { - detectAntialiasing: true, - colorThreshold: 0.3, - // pixelThresholdAbsolute: 10,// when having this enabled, the Jest logs shows pixel values instead of % - - // If the CI is macOS, we can have a low threshold there as well - // Else we opt for a slightly difference in font-rendering form setup to setup - pixelThresholdRelative: 0, // isCI ? 0.01 : 0 + matchConfig: { + failureThreshold: 0.01, + failureThresholdType: 'percent', + comparisonMethod: 'pixelmatch', + customSnapshotIdentifier: ({ currentTestName }) => { + return slugify(currentTestName) + '.snap' + }, }, + // We may use one of these: load, domcontentloaded, networkidle2 + waitUntil: isCI ? 'load' : 'load', } module.exports.config = config module.exports.isCI = isCI -let currentScreenshotSetup = null -const setScreenshotSetup = (custom) => { - currentScreenshotSetup = { ...config.screenshotConfig, ...custom } - setupJestScreenshot(currentScreenshotSetup) -} - -module.exports.testPageScreenshot = async ({ +const makeScreenshot = async ({ + page = global.page, url = null, + pageViewport = null, + headers = null, reload = null, fullscreen = false, - page = global.__PAGE__, selector, style = null, rootClassName = null, addWrapper = true, executeBeforeSimulate = null, + executeBeforeScreenshot = null, simulate = null, waitBeforeFinish = null, waitBeforeSimulate = null, @@ -75,35 +61,27 @@ module.exports.testPageScreenshot = async ({ simulateSelector = null, wrapperStyle = null, measureElement = null, - screenshotConfig = null, } = {}) => { - if (!page) { - const pages = await global.__BROWSER__.pages() - if (pages[0]) { - page = pages[0] - } - } - - if (reload || global.__EVENT_FAILURE__) { - global.__EVENT_FAILURE__ = false - await page.reload({ waitUntil }) - } - - if (screenshotConfig) { - setScreenshotSetup(screenshotConfig) - } - await makePageReady({ page, url, + pageViewport, + headers, fullscreen, + }) + + if (reload) { + await page.reload() + } + + const element = await handleElement({ + page, selector, style, - rootClassName, styleSelector, + rootClassName, }) - const element = await page.$(selector) const screenshotElement = await handleWrapper({ page, selector, @@ -137,10 +115,15 @@ module.exports.testPageScreenshot = async ({ await page.mouse.move(0, 0) } - if (config.delayDuringNonheadless > 0) { - await page.waitForTimeout(config.delayDuringNonheadless) + if (executeBeforeScreenshot) { + await page.evaluate(executeBeforeScreenshot) } + // Only for dev + // if (!isCI) { + // await page.waitForTimeout(300000) + // } + const screenshot = await takeScreenshot({ page, screenshotElement, @@ -159,80 +142,90 @@ module.exports.testPageScreenshot = async ({ await page.waitForTimeout(waitBeforeFinish) } - if (screenshotConfig) { - setScreenshotSetup(currentScreenshotSetup) - } - return screenshot } +module.exports.makeScreenshot = makeScreenshot -const setupPageScreenshot = ({ +const setupPageScreenshot = async ({ + page = global.page, url, - fullscreen = false, pageViewport = null, - screenshotConfig = null, + headers = null, + fullscreen = false, + each = false, timeout = null, } = {}) => { - beforeAll(async () => { - if (screenshotConfig) { - setScreenshotSetup(screenshotConfig) - } + const before = async () => { + await makePageReady({ + page, + url, + pageViewport, + headers, + fullscreen, + }) + } + if (each) { + beforeEach(before, timeout) + } else { + beforeAll(before, timeout) + } +} +module.exports.setupPageScreenshot = setupPageScreenshot + +async function handleElement({ + page, + selector = null, + style = null, + rootClassName = null, + styleSelector = null, +}) { + if (selector) { + await page.waitForSelector(selector, { state: 'attached' }) // Dialog selector "div#dnb-modal-root" is not visible yet, and needs the state "attached" + } + if (style) { + await page.$eval( + styleSelector || selector, + (node, style) => { + node.setAttribute('style', style) + return node + }, + makeStyles(style) + ) + } + + if (rootClassName) { + await handleRootClassName({ page, rootClassName }) + } + + return await page.$(selector) +} + +async function makePageReady({ + page, + url = null, + pageViewport = null, + headers = null, + fullscreen = false, +}) { + if (url) { if (pageViewport || (pageViewport !== false && config.pageViewport)) { if (pageViewport && config.pageViewport) { pageViewport = { ...config.pageViewport, ...pageViewport } } else { pageViewport = config.pageViewport } - await global.__PAGE__.setViewport(pageViewport) - } - - if (config.blockFontRequest) { - await global.__PAGE__.setRequestInterception(true) // is needed in order to use on "request" - global.__PAGE__.on('request', (req) => { - const url = req.url() - - if ( - config.allowedFonts && - config.allowedFonts.some((f) => url.includes(f)) - ) { - return req.continue() - } - - const type = req.resourceType() - switch (type) { - case 'font': - req.abort() - break - - default: - req.continue() - } - }) + await page.setViewportSize(pageViewport) } - if (url) { - await global.__PAGE__.goto(createUrl(url, fullscreen), { waitUntil }) + if (headers) { + await page.setExtraHTTPHeaders(headers) } - }, timeout) - - afterAll(async () => { - setScreenshotSetup(config.screenshotConfig) - }) -} -module.exports.setupPageScreenshot = setupPageScreenshot -async function makePageReady({ - page, - url, - fullscreen, - selector, - style, - rootClassName, - styleSelector, -}) { - if (url) { - await page.goto(createUrl(url, fullscreen), { waitUntil }) + await page.goto(createUrl(url, fullscreen), { + waitUntil: config.waitUntil, + timeout: config.timeout, + }) } global.IS_TEST = true @@ -245,26 +238,11 @@ async function makePageReady({ } }) - await handleRootClassName({ page, rootClassName }) - // Keep in mind, we also import this file in dev/prod portal (gatsby-browser), // just because it makes local dev easier await page.addStyleTag({ path: path.resolve(__dirname, './jestSetupScreenshots.css'), }) - - await page.waitForSelector(selector) - - if (style) { - await page.$eval( - styleSelector || selector, - (node, style) => { - node.setAttribute('style', style) - return node - }, - makeStyles(style) - ) - } } async function handleRootClassName({ page, rootClassName }) { @@ -380,10 +358,14 @@ async function handleSimulation({ elementToSimulate = element } + /** + * Because our Slider uses an input element, we need to use "force" + */ + switch (simulate) { case 'hover': { await page.mouse.move(0, 0) - await elementToSimulate.hover() + await elementToSimulate.hover({ force: true }) break } @@ -415,7 +397,11 @@ async function handleSimulation({ } case 'active': { - await elementToSimulate.click() + delaySimulation = isCI ? 200 : 100 + await elementToSimulate.click({ + force: true, + delay: delaySimulation, // Slider needs a delay, in order to make "active" state work + }) const { pageXOffset, pageYOffset } = await page.evaluate(() => { const pageXOffset = window.pageXOffset @@ -536,7 +522,6 @@ async function handleWrapper({ return element } -module.exports.setupJestScreenshot = setupJestScreenshot module.exports.loadImage = async (imagePath) => await fs.readFile(path.resolve(imagePath)) diff --git a/packages/dnb-eufemia/src/core/jest/setupJestScreenshot.js b/packages/dnb-eufemia/src/core/jest/setupJestScreenshot.js index 648a95db924..f03d5ce5492 100644 --- a/packages/dnb-eufemia/src/core/jest/setupJestScreenshot.js +++ b/packages/dnb-eufemia/src/core/jest/setupJestScreenshot.js @@ -3,7 +3,7 @@ * */ -const { setupJestScreenshot } = require('jest-screenshot') +const { configureToMatchImageSnapshot } = require('jest-image-snapshot') const { config } = require('./jestSetupScreenshots') jest.retryTimes(config.retryTimes || 0) @@ -17,4 +17,8 @@ jest.setTimeout( : 30e3 ) -setupJestScreenshot(config.screenshotConfig) +const toMatchImageSnapshot = configureToMatchImageSnapshot( + config.matchConfig +) + +expect.extend({ toMatchImageSnapshot }) diff --git a/packages/dnb-eufemia/src/elements/__tests__/Anchor.screenshot.test.js b/packages/dnb-eufemia/src/elements/__tests__/Anchor.screenshot.test.js deleted file mode 100644 index 34d1b4d671b..00000000000 --- a/packages/dnb-eufemia/src/elements/__tests__/Anchor.screenshot.test.js +++ /dev/null @@ -1,154 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, - isCI, -} from '../../core/jest/jestSetupScreenshots' - -describe('Anchor screenshot', () => { - setupPageScreenshot({ - url: '/uilib/elements/anchor', - }) - - it('have to match the "default" state', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="anchor-default"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match breaking lines', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="anchor-newline"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match anchor with skeleton', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="anchor-skeleton"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match anchor with icon', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="anchor-icon"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match anchor with paragraph', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="anchor-paragraph"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match anchor in heading', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="anchor-heading"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the "hover" state', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="anchor-hover"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the "active" state', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="anchor-active"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the "focus" state', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="anchor-focus"]', - simulate: 'focus', // should be tested first - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the anchor-contrast "default" state', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="anchor-contrast"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the anchor-contrast "focus" state', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="anchor-contrast"]', - simulate: 'focus', // should be tested first - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the anchor-contrast "hover" state', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="anchor-contrast"]', - simulate: 'hover', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the dnb-anchor--no-underline', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="anchor-in-section"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - // "active" simulation is suddenly too unstable ā€“ no reason found - // it('have to match the anchor-contrast "active" state', async () => { - // const screenshot = await testPageScreenshot({ - // selector: '[data-visual-test="anchor-contrast"]', - // simulate: 'active', - // }) - // expect(screenshot).toMatchImageSnapshot() - // }) -}) - -describe('Anchor target blank screenshot', () => { - setupPageScreenshot({ - url: '/uilib/elements/anchor', - }) - - it('have to match blank target anchor in heading', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="anchor-heading-blank"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the target blank state', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="anchor-blank"] a', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - if (!isCI) { - it('have to match the target blank with tooltip', async () => { - const screenshot = await testPageScreenshot({ - style: { - 'padding-top': '2rem', - }, - waitBeforeSimulate: 200, - selector: '[data-visual-test="anchor-blank"]', - simulateSelector: '[data-visual-test="anchor-blank"] a.dnb-anchor', - simulate: 'hover', - }) - expect(screenshot).toMatchImageSnapshot() - }) - } -}) diff --git a/packages/dnb-eufemia/src/elements/__tests__/Anchor.screenshot.test.ts b/packages/dnb-eufemia/src/elements/__tests__/Anchor.screenshot.test.ts new file mode 100644 index 00000000000..666db9450fd --- /dev/null +++ b/packages/dnb-eufemia/src/elements/__tests__/Anchor.screenshot.test.ts @@ -0,0 +1,154 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + makeScreenshot, + setupPageScreenshot, + isCI, +} from '../../core/jest/jestSetupScreenshots' + +describe('Anchor', () => { + setupPageScreenshot({ + url: '/uilib/elements/anchor', + }) + + it('have to match the "default" state', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="anchor-default"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match breaking lines', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="anchor-newline"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match anchor with skeleton', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="anchor-skeleton"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match anchor with icon', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="anchor-icon"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match anchor with paragraph', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="anchor-paragraph"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match anchor in heading', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="anchor-heading"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the "hover" state', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="anchor-hover"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the "active" state', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="anchor-active"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the "focus" state', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="anchor-focus"]', + simulate: 'focus', // should be tested first + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the anchor-contrast "default" state', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="anchor-contrast"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the anchor-contrast "focus" state', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="anchor-contrast"]', + simulate: 'focus', // should be tested first + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the anchor-contrast "hover" state', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="anchor-contrast"]', + simulate: 'hover', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the dnb-anchor--no-underline', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="anchor-in-section"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + // "active" simulation is suddenly too unstable ā€“ no reason found + // it('have to match the anchor-contrast "active" state', async () => { + // const screenshot = await makeScreenshot({ + // selector: '[data-visual-test="anchor-contrast"]', + // simulate: 'active', + // }) + // expect(screenshot).toMatchImageSnapshot() + // }) +}) + +describe('Anchor target blank', () => { + setupPageScreenshot({ + url: '/uilib/elements/anchor', + }) + + it('have to match blank target anchor in heading', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="anchor-heading-blank"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the target blank state', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="anchor-blank"] a', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + if (!isCI) { + it('have to match the target blank with tooltip', async () => { + const screenshot = await makeScreenshot({ + style: { + 'padding-top': '2rem', + }, + waitBeforeSimulate: 200, + selector: '[data-visual-test="anchor-blank"]', + simulateSelector: '[data-visual-test="anchor-blank"] a.dnb-anchor', + simulate: 'hover', + }) + expect(screenshot).toMatchImageSnapshot() + }) + } +}) diff --git a/packages/dnb-eufemia/src/elements/__tests__/Blockquote.screenshot.test.js b/packages/dnb-eufemia/src/elements/__tests__/Blockquote.screenshot.test.js deleted file mode 100644 index 23eae0d7a9b..00000000000 --- a/packages/dnb-eufemia/src/elements/__tests__/Blockquote.screenshot.test.js +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../core/jest/jestSetupScreenshots' - -describe('Blockquote screenshot', () => { - setupPageScreenshot({ url: '/uilib/elements/blockquote' }) - const style = { - width: '30rem', // make sure our input gets an explicit width, because of mac/linux rendering differences - } - - it('have to match default "blockquote"', async () => { - const screenshot = await testPageScreenshot({ - style, - selector: '[data-visual-test="blockquote-default"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match "blockquote" with top aligned graphic', async () => { - const screenshot = await testPageScreenshot({ - style, - selector: '[data-visual-test="blockquote-top"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match "blockquote" with top aligned graphic and no background', async () => { - const screenshot = await testPageScreenshot({ - style, - selector: '[data-visual-test="blockquote-top-no-background"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match "blockquote" with no background', async () => { - const screenshot = await testPageScreenshot({ - style, - selector: '[data-visual-test="blockquote-no-background"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/elements/__tests__/Blockquote.screenshot.test.ts b/packages/dnb-eufemia/src/elements/__tests__/Blockquote.screenshot.test.ts new file mode 100644 index 00000000000..893301fdc13 --- /dev/null +++ b/packages/dnb-eufemia/src/elements/__tests__/Blockquote.screenshot.test.ts @@ -0,0 +1,48 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../core/jest/jestSetupScreenshots' + +describe('Blockquote', () => { + setupPageScreenshot({ url: '/uilib/elements/blockquote' }) + const style = { + width: '30rem', // make sure our input gets an explicit width, because of mac/linux rendering differences + } + + it('have to match default "blockquote"', async () => { + const screenshot = await makeScreenshot({ + style, + selector: '[data-visual-test="blockquote-default"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match "blockquote" with top aligned graphic', async () => { + const screenshot = await makeScreenshot({ + style, + selector: '[data-visual-test="blockquote-top"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match "blockquote" with top aligned graphic and no background', async () => { + const screenshot = await makeScreenshot({ + style, + selector: '[data-visual-test="blockquote-top-no-background"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match "blockquote" with no background', async () => { + const screenshot = await makeScreenshot({ + style, + selector: '[data-visual-test="blockquote-no-background"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/elements/__tests__/Heading.screenshot.test.js b/packages/dnb-eufemia/src/elements/__tests__/Heading.screenshot.test.js deleted file mode 100644 index e8b12d73934..00000000000 --- a/packages/dnb-eufemia/src/elements/__tests__/Heading.screenshot.test.js +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, - // isCI -} from '../../core/jest/jestSetupScreenshots' - -describe('Heading screenshot', () => { - setupPageScreenshot({ - url: '/uilib/elements/heading', - // screenshotConfig: { - // /* - // if we use Helvetica, we can go down to 6% - // style: { - // 'font-family': 'Helvetica, Arial, sans-serif' - // }, - // */ - // // use 10% on CI because of the font rendering differences - // pixelThresholdRelative: isCI ? 0.1 : 0, - // }, - }) - - it('have to match the default heading examples', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="heading-default"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the additional heading examples', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="heading-additional"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/elements/__tests__/Heading.screenshot.test.ts b/packages/dnb-eufemia/src/elements/__tests__/Heading.screenshot.test.ts new file mode 100644 index 00000000000..d2b3b7a7a6c --- /dev/null +++ b/packages/dnb-eufemia/src/elements/__tests__/Heading.screenshot.test.ts @@ -0,0 +1,29 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../core/jest/jestSetupScreenshots' + +describe('Heading', () => { + setupPageScreenshot({ + url: '/uilib/elements/heading', + }) + + it('have to match the default heading examples', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="heading-default"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the additional heading examples', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="heading-additional"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/elements/__tests__/Hr.screenshot.test.js b/packages/dnb-eufemia/src/elements/__tests__/Hr.screenshot.test.js deleted file mode 100644 index 182c5b8e0fa..00000000000 --- a/packages/dnb-eufemia/src/elements/__tests__/Hr.screenshot.test.js +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../core/jest/jestSetupScreenshots' - -describe('Horizontal rule screenshot', () => { - setupPageScreenshot({ - url: '/uilib/elements/horizontal-rule', - }) - - it('have to match default horizontal rule', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="hr-default"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match fullscreen horizontal rule', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="hr-fullscreen"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match thickness horizontal rule', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="hr-thickness"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/elements/__tests__/Hr.screenshot.test.ts b/packages/dnb-eufemia/src/elements/__tests__/Hr.screenshot.test.ts new file mode 100644 index 00000000000..586e1188c15 --- /dev/null +++ b/packages/dnb-eufemia/src/elements/__tests__/Hr.screenshot.test.ts @@ -0,0 +1,36 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../core/jest/jestSetupScreenshots' + +describe('Horizontal rule', () => { + setupPageScreenshot({ + url: '/uilib/elements/horizontal-rule', + }) + + it('have to match default horizontal rule', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="hr-default"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match fullscreen horizontal rule', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="hr-fullscreen"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match thickness horizontal rule', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="hr-thickness"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/elements/__tests__/Image.screenshot.test.js b/packages/dnb-eufemia/src/elements/__tests__/Image.screenshot.test.js deleted file mode 100644 index 50faade68ae..00000000000 --- a/packages/dnb-eufemia/src/elements/__tests__/Image.screenshot.test.js +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../core/jest/jestSetupScreenshots' - -describe('Image screenshot', () => { - setupPageScreenshot({ - url: '/uilib/elements/image', - }) - - it('have to match default image element', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="image-plain"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match image element with no source', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="image-no-source"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match image element with caption', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="image-caption"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match image element with skeleton', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="image-skeleton"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/elements/__tests__/Image.screenshot.test.ts b/packages/dnb-eufemia/src/elements/__tests__/Image.screenshot.test.ts new file mode 100644 index 00000000000..b5d511a178a --- /dev/null +++ b/packages/dnb-eufemia/src/elements/__tests__/Image.screenshot.test.ts @@ -0,0 +1,43 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../core/jest/jestSetupScreenshots' + +describe('Image', () => { + setupPageScreenshot({ + url: '/uilib/elements/image', + }) + + it('have to match default image element', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="image-plain"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match image element with no source', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="image-no-source"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match image element with caption', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="image-caption"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match image element with skeleton', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="image-skeleton"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/elements/__tests__/Lists.screenshot.test.js b/packages/dnb-eufemia/src/elements/__tests__/Lists.screenshot.test.js deleted file mode 100644 index c2ce1586be4..00000000000 --- a/packages/dnb-eufemia/src/elements/__tests__/Lists.screenshot.test.js +++ /dev/null @@ -1,107 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, - // isCI -} from '../../core/jest/jestSetupScreenshots' - -describe('List screenshot', () => { - setupPageScreenshot({ - url: '/uilib/elements/lists', - }) - - it('have to match ul list', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="lists-ul"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match ol list', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="lists-ol"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match outside ol list', async () => { - const screenshot = await testPageScreenshot({ - style: { width: '20rem', height: '20rem' }, - selector: '[data-visual-test="lists-ol-style-position"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match ol list with custom types', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="lists-ol-types"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match dl list', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="lists-dl"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match dl list', async () => { - const screenshot = await testPageScreenshot({ - style: { width: '35rem' }, - selector: '[data-visual-test="lists-dl-horizontal"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match lists reset', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="lists-reset"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) - -describe('Lists with skeleton screenshot', () => { - setupPageScreenshot({ url: '/uilib/elements/lists?skeleton' }) - - it('have to match ul list', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="lists-ul"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match ol list', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="lists-ol"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match outside ol list', async () => { - const screenshot = await testPageScreenshot({ - style: { width: '20rem', height: '20rem' }, - selector: '[data-visual-test="lists-ol-style-position"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match ol list with custom types', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="lists-ol-types"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match dl list', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="lists-dl"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/elements/__tests__/Lists.screenshot.test.ts b/packages/dnb-eufemia/src/elements/__tests__/Lists.screenshot.test.ts new file mode 100644 index 00000000000..4d198edcdd5 --- /dev/null +++ b/packages/dnb-eufemia/src/elements/__tests__/Lists.screenshot.test.ts @@ -0,0 +1,106 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../core/jest/jestSetupScreenshots' + +describe('List', () => { + setupPageScreenshot({ + url: '/uilib/elements/lists', + }) + + it('have to match ul list', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="lists-ul"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match ol list', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="lists-ol"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match outside ol list', async () => { + const screenshot = await makeScreenshot({ + style: { width: '20rem', height: '20rem' }, + selector: '[data-visual-test="lists-ol-style-position"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match ol list with custom types', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="lists-ol-types"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match dl list', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="lists-dl"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match dl horizontal list', async () => { + const screenshot = await makeScreenshot({ + style: { width: '35rem' }, + selector: '[data-visual-test="lists-dl-horizontal"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match lists reset', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="lists-reset"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) + +describe('Lists with skeleton', () => { + setupPageScreenshot({ url: '/uilib/elements/lists?skeleton' }) + + it('have to match ul list', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="lists-ul"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match ol list', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="lists-ol"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match outside ol list', async () => { + const screenshot = await makeScreenshot({ + style: { width: '20rem', height: '20rem' }, + selector: '[data-visual-test="lists-ol-style-position"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match ol list with custom types', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="lists-ol-types"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match dl list', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="lists-dl"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/elements/__tests__/Paragraph.screenshot.test.js b/packages/dnb-eufemia/src/elements/__tests__/Paragraph.screenshot.test.js deleted file mode 100644 index bb002ecb7c1..00000000000 --- a/packages/dnb-eufemia/src/elements/__tests__/Paragraph.screenshot.test.js +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, - // isCI -} from '../../core/jest/jestSetupScreenshots' -describe('Paragraph screenshot', () => { - setupPageScreenshot({ - url: '/uilib/elements/paragraph', - }) - - it('have to match the paragraph example', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="paragraph-default"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the paragraph with small text', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="paragraph-small"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the paragraph with modifiers', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="paragraph-modifiers"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match the paragraph with additional elements', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="paragraph-additional"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/elements/__tests__/Paragraph.screenshot.test.ts b/packages/dnb-eufemia/src/elements/__tests__/Paragraph.screenshot.test.ts new file mode 100644 index 00000000000..08b9f8da6d1 --- /dev/null +++ b/packages/dnb-eufemia/src/elements/__tests__/Paragraph.screenshot.test.ts @@ -0,0 +1,43 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../core/jest/jestSetupScreenshots' + +describe('Paragraph', () => { + setupPageScreenshot({ + url: '/uilib/elements/paragraph', + }) + + it('have to match the paragraph example', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="paragraph-default"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the paragraph with small text', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="paragraph-small"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the paragraph with modifiers', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="paragraph-modifiers"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match the paragraph with additional elements', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="paragraph-additional"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-have-to-match-anchor-in-heading.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-have-to-match-anchor-in-heading.snap.png new file mode 100644 index 00000000000..61c381ead1f Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-have-to-match-anchor-in-heading.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-have-to-match-anchor-with-icon.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-have-to-match-anchor-with-icon.snap.png new file mode 100644 index 00000000000..3ecc7dd6e18 Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-have-to-match-anchor-with-icon.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-have-to-match-anchor-with-paragraph.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-have-to-match-anchor-with-paragraph.snap.png new file mode 100644 index 00000000000..a1bd73bb63e Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-have-to-match-anchor-with-paragraph.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-have-to-match-anchor-with-skeleton.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-have-to-match-anchor-with-skeleton.snap.png new file mode 100644 index 00000000000..76409e80561 Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-have-to-match-anchor-with-skeleton.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-have-to-match-breaking-lines.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-have-to-match-breaking-lines.snap.png new file mode 100644 index 00000000000..a723a73e98f Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-have-to-match-breaking-lines.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-have-to-match-the-active-state.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-have-to-match-the-active-state.snap.png new file mode 100644 index 00000000000..78c4499cb19 Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-have-to-match-the-active-state.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-have-to-match-the-anchor-contrast-default-state.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-have-to-match-the-anchor-contrast-default-state.snap.png new file mode 100644 index 00000000000..1040ee6bc03 Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-have-to-match-the-anchor-contrast-default-state.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-have-to-match-the-anchor-contrast-focus-state.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-have-to-match-the-anchor-contrast-focus-state.snap.png new file mode 100644 index 00000000000..287374c002e Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-have-to-match-the-anchor-contrast-focus-state.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-have-to-match-the-anchor-contrast-hover-state.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-have-to-match-the-anchor-contrast-hover-state.snap.png new file mode 100644 index 00000000000..762ef024165 Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-have-to-match-the-anchor-contrast-hover-state.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-have-to-match-the-default-state.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-have-to-match-the-default-state.snap.png new file mode 100644 index 00000000000..e892331a3a7 Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-have-to-match-the-default-state.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-have-to-match-the-dnb-anchor-no-underline.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-have-to-match-the-dnb-anchor-no-underline.snap.png new file mode 100644 index 00000000000..bb7b9f9d68f Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-have-to-match-the-dnb-anchor-no-underline.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-have-to-match-the-focus-state.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-have-to-match-the-focus-state.snap.png new file mode 100644 index 00000000000..48f0d4ae585 Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-have-to-match-the-focus-state.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-have-to-match-the-hover-state.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-have-to-match-the-hover-state.snap.png new file mode 100644 index 00000000000..06739b45951 Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-have-to-match-the-hover-state.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-target-blank-have-to-match-blank-target-anchor-in-heading.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-target-blank-have-to-match-blank-target-anchor-in-heading.snap.png new file mode 100644 index 00000000000..2575caf99be Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-target-blank-have-to-match-blank-target-anchor-in-heading.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-target-blank-have-to-match-the-target-blank-state.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-target-blank-have-to-match-the-target-blank-state.snap.png new file mode 100644 index 00000000000..d562ea44aa7 Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-target-blank-have-to-match-the-target-blank-state.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-target-blank-have-to-match-the-target-blank-with-tooltip.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-target-blank-have-to-match-the-target-blank-with-tooltip.snap.png new file mode 100644 index 00000000000..8ce5ef8591d Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/anchor-target-blank-have-to-match-the-target-blank-with-tooltip.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/blockquote-have-to-match-blockquote-with-no-background.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/blockquote-have-to-match-blockquote-with-no-background.snap.png new file mode 100644 index 00000000000..ad7dcc9e79a Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/blockquote-have-to-match-blockquote-with-no-background.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/blockquote-have-to-match-blockquote-with-top-aligned-graphic-and-no-background.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/blockquote-have-to-match-blockquote-with-top-aligned-graphic-and-no-background.snap.png new file mode 100644 index 00000000000..7742d464c41 Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/blockquote-have-to-match-blockquote-with-top-aligned-graphic-and-no-background.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/blockquote-have-to-match-blockquote-with-top-aligned-graphic.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/blockquote-have-to-match-blockquote-with-top-aligned-graphic.snap.png new file mode 100644 index 00000000000..98b33107583 Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/blockquote-have-to-match-blockquote-with-top-aligned-graphic.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/blockquote-have-to-match-default-blockquote.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/blockquote-have-to-match-default-blockquote.snap.png new file mode 100644 index 00000000000..bfc013c8342 Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/blockquote-have-to-match-default-blockquote.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/heading-have-to-match-the-additional-heading-examples.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/heading-have-to-match-the-additional-heading-examples.snap.png new file mode 100644 index 00000000000..69250b24c42 Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/heading-have-to-match-the-additional-heading-examples.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/heading-have-to-match-the-default-heading-examples.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/heading-have-to-match-the-default-heading-examples.snap.png new file mode 100644 index 00000000000..0340b00ec23 Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/heading-have-to-match-the-default-heading-examples.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/horizontal-rule-have-to-match-default-horizontal-rule.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/horizontal-rule-have-to-match-default-horizontal-rule.snap.png new file mode 100644 index 00000000000..588496f97e4 Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/horizontal-rule-have-to-match-default-horizontal-rule.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/horizontal-rule-have-to-match-fullscreen-horizontal-rule.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/horizontal-rule-have-to-match-fullscreen-horizontal-rule.snap.png new file mode 100644 index 00000000000..4fe96dd8fb4 Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/horizontal-rule-have-to-match-fullscreen-horizontal-rule.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/horizontal-rule-have-to-match-thickness-horizontal-rule.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/horizontal-rule-have-to-match-thickness-horizontal-rule.snap.png new file mode 100644 index 00000000000..7d75b28bd5a Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/horizontal-rule-have-to-match-thickness-horizontal-rule.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/image-have-to-match-default-image-element.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/image-have-to-match-default-image-element.snap.png new file mode 100644 index 00000000000..8500afdf512 Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/image-have-to-match-default-image-element.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/image-have-to-match-image-element-with-caption.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/image-have-to-match-image-element-with-caption.snap.png new file mode 100644 index 00000000000..8bbd403b161 Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/image-have-to-match-image-element-with-caption.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/image-have-to-match-image-element-with-no-source.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/image-have-to-match-image-element-with-no-source.snap.png new file mode 100644 index 00000000000..fcebfd74fea Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/image-have-to-match-image-element-with-no-source.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/image-have-to-match-image-element-with-skeleton.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/image-have-to-match-image-element-with-skeleton.snap.png new file mode 100644 index 00000000000..4b3e5c10ecf Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/image-have-to-match-image-element-with-skeleton.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/list-have-to-match-dl-horizontal-list.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/list-have-to-match-dl-horizontal-list.snap.png new file mode 100644 index 00000000000..818359ee145 Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/list-have-to-match-dl-horizontal-list.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/list-have-to-match-dl-list.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/list-have-to-match-dl-list.snap.png new file mode 100644 index 00000000000..10b5cf3cfba Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/list-have-to-match-dl-list.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/list-have-to-match-lists-reset.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/list-have-to-match-lists-reset.snap.png new file mode 100644 index 00000000000..6e25b8a90c5 Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/list-have-to-match-lists-reset.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/list-have-to-match-ol-list-with-custom-types.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/list-have-to-match-ol-list-with-custom-types.snap.png new file mode 100644 index 00000000000..86c7ff785a5 Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/list-have-to-match-ol-list-with-custom-types.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/list-have-to-match-ol-list.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/list-have-to-match-ol-list.snap.png new file mode 100644 index 00000000000..5285b8e6216 Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/list-have-to-match-ol-list.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/list-have-to-match-outside-ol-list.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/list-have-to-match-outside-ol-list.snap.png new file mode 100644 index 00000000000..641fca97513 Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/list-have-to-match-outside-ol-list.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/list-have-to-match-ul-list.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/list-have-to-match-ul-list.snap.png new file mode 100644 index 00000000000..c86f681ed37 Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/list-have-to-match-ul-list.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/lists-with-skeleton-have-to-match-dl-list.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/lists-with-skeleton-have-to-match-dl-list.snap.png new file mode 100644 index 00000000000..13ce39f4fc9 Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/lists-with-skeleton-have-to-match-dl-list.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/lists-with-skeleton-have-to-match-ol-list-with-custom-types.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/lists-with-skeleton-have-to-match-ol-list-with-custom-types.snap.png new file mode 100644 index 00000000000..8904e90cd9e Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/lists-with-skeleton-have-to-match-ol-list-with-custom-types.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/lists-with-skeleton-have-to-match-ol-list.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/lists-with-skeleton-have-to-match-ol-list.snap.png new file mode 100644 index 00000000000..1a2562054d7 Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/lists-with-skeleton-have-to-match-ol-list.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/lists-with-skeleton-have-to-match-outside-ol-list.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/lists-with-skeleton-have-to-match-outside-ol-list.snap.png new file mode 100644 index 00000000000..a79301386bb Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/lists-with-skeleton-have-to-match-outside-ol-list.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/lists-with-skeleton-have-to-match-ul-list.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/lists-with-skeleton-have-to-match-ul-list.snap.png new file mode 100644 index 00000000000..a2e2be08dc9 Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/lists-with-skeleton-have-to-match-ul-list.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/paragraph-have-to-match-the-paragraph-example.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/paragraph-have-to-match-the-paragraph-example.snap.png new file mode 100644 index 00000000000..fe2e1a74a38 Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/paragraph-have-to-match-the-paragraph-example.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/paragraph-have-to-match-the-paragraph-with-additional-elements.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/paragraph-have-to-match-the-paragraph-with-additional-elements.snap.png new file mode 100644 index 00000000000..e3edc2ab5dd Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/paragraph-have-to-match-the-paragraph-with-additional-elements.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/paragraph-have-to-match-the-paragraph-with-modifiers.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/paragraph-have-to-match-the-paragraph-with-modifiers.snap.png new file mode 100644 index 00000000000..c8cdb10441a Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/paragraph-have-to-match-the-paragraph-with-modifiers.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/paragraph-have-to-match-the-paragraph-with-small-text.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/paragraph-have-to-match-the-paragraph-with-small-text.snap.png new file mode 100644 index 00000000000..b7fab347d61 Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/paragraph-have-to-match-the-paragraph-with-small-text.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/paragraphscreenshottestts-paragraph-screenshot-have-to-match-the-paragraph-example.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/paragraphscreenshottestts-paragraph-screenshot-have-to-match-the-paragraph-example.snap.png new file mode 100644 index 00000000000..ffb79da674c Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/paragraphscreenshottestts-paragraph-screenshot-have-to-match-the-paragraph-example.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/paragraphscreenshottestts-paragraph-screenshot-have-to-match-the-paragraph-with-additional-elements.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/paragraphscreenshottestts-paragraph-screenshot-have-to-match-the-paragraph-with-additional-elements.snap.png new file mode 100644 index 00000000000..522fd7448e9 Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/paragraphscreenshottestts-paragraph-screenshot-have-to-match-the-paragraph-with-additional-elements.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/paragraphscreenshottestts-paragraph-screenshot-have-to-match-the-paragraph-with-modifiers.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/paragraphscreenshottestts-paragraph-screenshot-have-to-match-the-paragraph-with-modifiers.snap.png new file mode 100644 index 00000000000..037116d483c Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/paragraphscreenshottestts-paragraph-screenshot-have-to-match-the-paragraph-with-modifiers.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/paragraphscreenshottestts-paragraph-screenshot-have-to-match-the-paragraph-with-small-text.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/paragraphscreenshottestts-paragraph-screenshot-have-to-match-the-paragraph-with-small-text.snap.png new file mode 100644 index 00000000000..7d64f49a6e9 Binary files /dev/null and b/packages/dnb-eufemia/src/elements/__tests__/__image_snapshots__/paragraphscreenshottestts-paragraph-screenshot-have-to-match-the-paragraph-with-small-text.snap.png differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-screenshot-have-to-match-anchor-in-heading-1-16ad2.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-screenshot-have-to-match-anchor-in-heading-1-16ad2.snap.png deleted file mode 100644 index a39607d3b05..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-screenshot-have-to-match-anchor-in-heading-1-16ad2.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-screenshot-have-to-match-anchor-with-icon-1-16af0.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-screenshot-have-to-match-anchor-with-icon-1-16af0.snap.png deleted file mode 100644 index 6664931f5d1..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-screenshot-have-to-match-anchor-with-icon-1-16af0.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-screenshot-have-to-match-anchor-with-paragraph-1-bfc56.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-screenshot-have-to-match-anchor-with-paragraph-1-bfc56.snap.png deleted file mode 100644 index 5fcc2d61a1b..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-screenshot-have-to-match-anchor-with-paragraph-1-bfc56.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-screenshot-have-to-match-anchor-with-skeleton-1-7bd3d.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-screenshot-have-to-match-anchor-with-skeleton-1-7bd3d.snap.png deleted file mode 100644 index ae09dad0805..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-screenshot-have-to-match-anchor-with-skeleton-1-7bd3d.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-screenshot-have-to-match-breaking-lines-1-24a96.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-screenshot-have-to-match-breaking-lines-1-24a96.snap.png deleted file mode 100644 index 4e6d61b6e1e..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-screenshot-have-to-match-breaking-lines-1-24a96.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-screenshot-have-to-match-the-active-state-1-6b889.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-screenshot-have-to-match-the-active-state-1-6b889.snap.png deleted file mode 100644 index 8714fde9b27..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-screenshot-have-to-match-the-active-state-1-6b889.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-screenshot-have-to-match-the-anchor-contrast-active-state-1-d53a2.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-screenshot-have-to-match-the-anchor-contrast-active-state-1-d53a2.snap.png deleted file mode 100644 index 78a51d17478..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-screenshot-have-to-match-the-anchor-contrast-active-state-1-d53a2.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-screenshot-have-to-match-the-anchor-contrast-default-state-1-5b28f.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-screenshot-have-to-match-the-anchor-contrast-default-state-1-5b28f.snap.png deleted file mode 100644 index 0f20796e52e..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-screenshot-have-to-match-the-anchor-contrast-default-state-1-5b28f.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-screenshot-have-to-match-the-anchor-contrast-focus-state-1-3d8e1.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-screenshot-have-to-match-the-anchor-contrast-focus-state-1-3d8e1.snap.png deleted file mode 100644 index ed11c8d5b45..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-screenshot-have-to-match-the-anchor-contrast-focus-state-1-3d8e1.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-screenshot-have-to-match-the-anchor-contrast-hover-state-1-4fc1e.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-screenshot-have-to-match-the-anchor-contrast-hover-state-1-4fc1e.snap.png deleted file mode 100644 index 78a51d17478..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-screenshot-have-to-match-the-anchor-contrast-hover-state-1-4fc1e.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-screenshot-have-to-match-the-default-state-1-facec.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-screenshot-have-to-match-the-default-state-1-facec.snap.png deleted file mode 100644 index 41ca2e2a720..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-screenshot-have-to-match-the-default-state-1-facec.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-screenshot-have-to-match-the-dnb-anchor-no-underline-1-6186b.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-screenshot-have-to-match-the-dnb-anchor-no-underline-1-6186b.snap.png deleted file mode 100644 index 091bc04f248..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-screenshot-have-to-match-the-dnb-anchor-no-underline-1-6186b.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-screenshot-have-to-match-the-focus-state-1-4a878.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-screenshot-have-to-match-the-focus-state-1-4a878.snap.png deleted file mode 100644 index ac65c668cef..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-screenshot-have-to-match-the-focus-state-1-4a878.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-screenshot-have-to-match-the-hover-state-1-5fc43.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-screenshot-have-to-match-the-hover-state-1-5fc43.snap.png deleted file mode 100644 index 25ee389025c..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-screenshot-have-to-match-the-hover-state-1-5fc43.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-target-blank-screenshot-have-to-match-blank-target-anchor-in-heading-1-6726d.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-target-blank-screenshot-have-to-match-blank-target-anchor-in-heading-1-6726d.snap.png deleted file mode 100644 index a06e4de7402..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-target-blank-screenshot-have-to-match-blank-target-anchor-in-heading-1-6726d.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-target-blank-screenshot-have-to-match-the-target-blank-state-1-97c72.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-target-blank-screenshot-have-to-match-the-target-blank-state-1-97c72.snap.png deleted file mode 100644 index 8dea734082a..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-target-blank-screenshot-have-to-match-the-target-blank-state-1-97c72.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-target-blank-screenshot-have-to-match-the-target-blank-with-tooltip-1-79cd3.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-target-blank-screenshot-have-to-match-the-target-blank-with-tooltip-1-79cd3.snap.png deleted file mode 100644 index 6570eab2542..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/anchor-screenshot-test-js-anchor-target-blank-screenshot-have-to-match-the-target-blank-with-tooltip-1-79cd3.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/blockquote-screenshot-test-js-blockquote-screenshot-have-to-match-blockquote-with-no-background-1-b9975.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/blockquote-screenshot-test-js-blockquote-screenshot-have-to-match-blockquote-with-no-background-1-b9975.snap.png deleted file mode 100644 index 54c2cca53d1..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/blockquote-screenshot-test-js-blockquote-screenshot-have-to-match-blockquote-with-no-background-1-b9975.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/blockquote-screenshot-test-js-blockquote-screenshot-have-to-match-blockquote-with-top-aligned-graphic-1-c67e6.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/blockquote-screenshot-test-js-blockquote-screenshot-have-to-match-blockquote-with-top-aligned-graphic-1-c67e6.snap.png deleted file mode 100644 index 08dac559688..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/blockquote-screenshot-test-js-blockquote-screenshot-have-to-match-blockquote-with-top-aligned-graphic-1-c67e6.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/blockquote-screenshot-test-js-blockquote-screenshot-have-to-match-blockquote-with-top-aligned-graphic-and-no-background-1-dc73f.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/blockquote-screenshot-test-js-blockquote-screenshot-have-to-match-blockquote-with-top-aligned-graphic-and-no-background-1-dc73f.snap.png deleted file mode 100644 index d114a44dedd..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/blockquote-screenshot-test-js-blockquote-screenshot-have-to-match-blockquote-with-top-aligned-graphic-and-no-background-1-dc73f.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/blockquote-screenshot-test-js-blockquote-screenshot-have-to-match-default-blockquote-1-a48bf.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/blockquote-screenshot-test-js-blockquote-screenshot-have-to-match-default-blockquote-1-a48bf.snap.png deleted file mode 100644 index fdb59c3b367..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/blockquote-screenshot-test-js-blockquote-screenshot-have-to-match-default-blockquote-1-a48bf.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/heading-screenshot-test-js-heading-screenshot-have-to-match-the-additional-heading-examples-1-c17ed.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/heading-screenshot-test-js-heading-screenshot-have-to-match-the-additional-heading-examples-1-c17ed.snap.png deleted file mode 100644 index a3e3e81756e..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/heading-screenshot-test-js-heading-screenshot-have-to-match-the-additional-heading-examples-1-c17ed.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/heading-screenshot-test-js-heading-screenshot-have-to-match-the-default-heading-examples-1-13d84.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/heading-screenshot-test-js-heading-screenshot-have-to-match-the-default-heading-examples-1-13d84.snap.png deleted file mode 100644 index 4e9cf2a469f..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/heading-screenshot-test-js-heading-screenshot-have-to-match-the-default-heading-examples-1-13d84.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/hr-screenshot-test-js-horizontal-rule-screenshot-have-to-match-default-horizontal-rule-1-8828a.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/hr-screenshot-test-js-horizontal-rule-screenshot-have-to-match-default-horizontal-rule-1-8828a.snap.png deleted file mode 100644 index f3a39e57149..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/hr-screenshot-test-js-horizontal-rule-screenshot-have-to-match-default-horizontal-rule-1-8828a.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/hr-screenshot-test-js-horizontal-rule-screenshot-have-to-match-fullscreen-horizontal-rule-1-c9424.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/hr-screenshot-test-js-horizontal-rule-screenshot-have-to-match-fullscreen-horizontal-rule-1-c9424.snap.png deleted file mode 100644 index da296957cc4..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/hr-screenshot-test-js-horizontal-rule-screenshot-have-to-match-fullscreen-horizontal-rule-1-c9424.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/hr-screenshot-test-js-horizontal-rule-screenshot-have-to-match-thickness-horizontal-rule-1-05bb4.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/hr-screenshot-test-js-horizontal-rule-screenshot-have-to-match-thickness-horizontal-rule-1-05bb4.snap.png deleted file mode 100644 index 9e837e9faf2..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/hr-screenshot-test-js-horizontal-rule-screenshot-have-to-match-thickness-horizontal-rule-1-05bb4.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/image-screenshot-test-js-image-screenshot-have-to-match-default-image-element-1-3cb2c.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/image-screenshot-test-js-image-screenshot-have-to-match-default-image-element-1-3cb2c.snap.png deleted file mode 100644 index 3908424d30b..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/image-screenshot-test-js-image-screenshot-have-to-match-default-image-element-1-3cb2c.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/image-screenshot-test-js-image-screenshot-have-to-match-image-element-with-caption-1-68635.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/image-screenshot-test-js-image-screenshot-have-to-match-image-element-with-caption-1-68635.snap.png deleted file mode 100644 index c716f8d304e..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/image-screenshot-test-js-image-screenshot-have-to-match-image-element-with-caption-1-68635.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/image-screenshot-test-js-image-screenshot-have-to-match-image-element-with-no-source-1-85928.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/image-screenshot-test-js-image-screenshot-have-to-match-image-element-with-no-source-1-85928.snap.png deleted file mode 100644 index 0a19836480e..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/image-screenshot-test-js-image-screenshot-have-to-match-image-element-with-no-source-1-85928.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/image-screenshot-test-js-image-screenshot-have-to-match-image-element-with-skeleton-1-f1750.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/image-screenshot-test-js-image-screenshot-have-to-match-image-element-with-skeleton-1-f1750.snap.png deleted file mode 100644 index c5c89b230b1..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/image-screenshot-test-js-image-screenshot-have-to-match-image-element-with-skeleton-1-f1750.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/lists-screenshot-test-js-list-screenshot-have-to-match-dl-list-1-7926e.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/lists-screenshot-test-js-list-screenshot-have-to-match-dl-list-1-7926e.snap.png deleted file mode 100644 index a4c2657d76d..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/lists-screenshot-test-js-list-screenshot-have-to-match-dl-list-1-7926e.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/lists-screenshot-test-js-list-screenshot-have-to-match-dl-list-2-6ae87.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/lists-screenshot-test-js-list-screenshot-have-to-match-dl-list-2-6ae87.snap.png deleted file mode 100644 index db506c0468d..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/lists-screenshot-test-js-list-screenshot-have-to-match-dl-list-2-6ae87.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/lists-screenshot-test-js-list-screenshot-have-to-match-lists-reset-1-00bf4.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/lists-screenshot-test-js-list-screenshot-have-to-match-lists-reset-1-00bf4.snap.png deleted file mode 100644 index 9dd55fe0a88..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/lists-screenshot-test-js-list-screenshot-have-to-match-lists-reset-1-00bf4.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/lists-screenshot-test-js-list-screenshot-have-to-match-ol-list-1-5994e.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/lists-screenshot-test-js-list-screenshot-have-to-match-ol-list-1-5994e.snap.png deleted file mode 100644 index cc0b82a0280..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/lists-screenshot-test-js-list-screenshot-have-to-match-ol-list-1-5994e.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/lists-screenshot-test-js-list-screenshot-have-to-match-ol-list-with-custom-types-1-4b08a.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/lists-screenshot-test-js-list-screenshot-have-to-match-ol-list-with-custom-types-1-4b08a.snap.png deleted file mode 100644 index 1f11f3d3542..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/lists-screenshot-test-js-list-screenshot-have-to-match-ol-list-with-custom-types-1-4b08a.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/lists-screenshot-test-js-list-screenshot-have-to-match-outside-ol-list-1-18bff.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/lists-screenshot-test-js-list-screenshot-have-to-match-outside-ol-list-1-18bff.snap.png deleted file mode 100644 index 00673bfecc0..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/lists-screenshot-test-js-list-screenshot-have-to-match-outside-ol-list-1-18bff.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/lists-screenshot-test-js-list-screenshot-have-to-match-ul-list-1-8a6f2.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/lists-screenshot-test-js-list-screenshot-have-to-match-ul-list-1-8a6f2.snap.png deleted file mode 100644 index b2a4389ee31..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/lists-screenshot-test-js-list-screenshot-have-to-match-ul-list-1-8a6f2.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/lists-screenshot-test-js-lists-with-skeleton-screenshot-have-to-match-dl-list-1-c5aae.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/lists-screenshot-test-js-lists-with-skeleton-screenshot-have-to-match-dl-list-1-c5aae.snap.png deleted file mode 100644 index 3f5f18c1cc7..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/lists-screenshot-test-js-lists-with-skeleton-screenshot-have-to-match-dl-list-1-c5aae.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/lists-screenshot-test-js-lists-with-skeleton-screenshot-have-to-match-ol-list-1-1653f.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/lists-screenshot-test-js-lists-with-skeleton-screenshot-have-to-match-ol-list-1-1653f.snap.png deleted file mode 100644 index 4c285752d38..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/lists-screenshot-test-js-lists-with-skeleton-screenshot-have-to-match-ol-list-1-1653f.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/lists-screenshot-test-js-lists-with-skeleton-screenshot-have-to-match-ol-list-with-custom-types-1-7494b.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/lists-screenshot-test-js-lists-with-skeleton-screenshot-have-to-match-ol-list-with-custom-types-1-7494b.snap.png deleted file mode 100644 index 3252216d594..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/lists-screenshot-test-js-lists-with-skeleton-screenshot-have-to-match-ol-list-with-custom-types-1-7494b.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/lists-screenshot-test-js-lists-with-skeleton-screenshot-have-to-match-outside-ol-list-1-57fcf.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/lists-screenshot-test-js-lists-with-skeleton-screenshot-have-to-match-outside-ol-list-1-57fcf.snap.png deleted file mode 100644 index 98a34ed7bd0..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/lists-screenshot-test-js-lists-with-skeleton-screenshot-have-to-match-outside-ol-list-1-57fcf.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/lists-screenshot-test-js-lists-with-skeleton-screenshot-have-to-match-ul-list-1-8b461.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/lists-screenshot-test-js-lists-with-skeleton-screenshot-have-to-match-ul-list-1-8b461.snap.png deleted file mode 100644 index e5f66e2505a..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/lists-screenshot-test-js-lists-with-skeleton-screenshot-have-to-match-ul-list-1-8b461.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/paragraph-screenshot-test-js-paragraph-screenshot-have-to-match-the-paragraph-example-1-b66c4.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/paragraph-screenshot-test-js-paragraph-screenshot-have-to-match-the-paragraph-example-1-b66c4.snap.png deleted file mode 100644 index fc574ad4419..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/paragraph-screenshot-test-js-paragraph-screenshot-have-to-match-the-paragraph-example-1-b66c4.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/paragraph-screenshot-test-js-paragraph-screenshot-have-to-match-the-paragraph-with-additional-elements-1-80b1c.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/paragraph-screenshot-test-js-paragraph-screenshot-have-to-match-the-paragraph-with-additional-elements-1-80b1c.snap.png deleted file mode 100644 index 495f14e1449..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/paragraph-screenshot-test-js-paragraph-screenshot-have-to-match-the-paragraph-with-additional-elements-1-80b1c.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/paragraph-screenshot-test-js-paragraph-screenshot-have-to-match-the-paragraph-with-modifiers-1-d2768.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/paragraph-screenshot-test-js-paragraph-screenshot-have-to-match-the-paragraph-with-modifiers-1-d2768.snap.png deleted file mode 100644 index b050815490b..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/paragraph-screenshot-test-js-paragraph-screenshot-have-to-match-the-paragraph-with-modifiers-1-d2768.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/paragraph-screenshot-test-js-paragraph-screenshot-have-to-match-the-paragraph-with-small-text-1-9cde2.snap.png b/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/paragraph-screenshot-test-js-paragraph-screenshot-have-to-match-the-paragraph-with-small-text-1-9cde2.snap.png deleted file mode 100644 index eb92d448552..00000000000 Binary files a/packages/dnb-eufemia/src/elements/__tests__/__snapshots__/paragraph-screenshot-test-js-paragraph-screenshot-have-to-match-the-paragraph-with-small-text-1-9cde2.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/extensions/payment-card/__tests__/PaymentCard.screenshot.test.js b/packages/dnb-eufemia/src/extensions/payment-card/__tests__/PaymentCard.screenshot.test.js deleted file mode 100644 index 2da8eebc9f3..00000000000 --- a/packages/dnb-eufemia/src/extensions/payment-card/__tests__/PaymentCard.screenshot.test.js +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - * - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -describe('PaymentCard screenshot', () => { - setupPageScreenshot({ url: '/uilib/extensions/payment-card/demos' }) - - it('have to match a basic card', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="payment-card-basic"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match a card with status', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="payment-card-status"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match a compact card variant', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="payment-card-compact"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match all cards', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="all-cards"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/extensions/payment-card/__tests__/PaymentCard.screenshot.test.ts b/packages/dnb-eufemia/src/extensions/payment-card/__tests__/PaymentCard.screenshot.test.ts new file mode 100644 index 00000000000..1da2aec2907 --- /dev/null +++ b/packages/dnb-eufemia/src/extensions/payment-card/__tests__/PaymentCard.screenshot.test.ts @@ -0,0 +1,42 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + * + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../../core/jest/jestSetupScreenshots' + +describe('PaymentCard', () => { + setupPageScreenshot({ url: '/uilib/extensions/payment-card/demos' }) + + it('have to match a basic card', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="payment-card-basic"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match a card with status', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="payment-card-status"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match a compact card variant', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="payment-card-compact"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match all cards', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="all-cards"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/extensions/payment-card/__tests__/__image_snapshots__/paymentcard-have-to-match-a-basic-card.snap.png b/packages/dnb-eufemia/src/extensions/payment-card/__tests__/__image_snapshots__/paymentcard-have-to-match-a-basic-card.snap.png new file mode 100644 index 00000000000..6d5929672a7 Binary files /dev/null and b/packages/dnb-eufemia/src/extensions/payment-card/__tests__/__image_snapshots__/paymentcard-have-to-match-a-basic-card.snap.png differ diff --git a/packages/dnb-eufemia/src/extensions/payment-card/__tests__/__image_snapshots__/paymentcard-have-to-match-a-card-with-status.snap.png b/packages/dnb-eufemia/src/extensions/payment-card/__tests__/__image_snapshots__/paymentcard-have-to-match-a-card-with-status.snap.png new file mode 100644 index 00000000000..33d29b3084a Binary files /dev/null and b/packages/dnb-eufemia/src/extensions/payment-card/__tests__/__image_snapshots__/paymentcard-have-to-match-a-card-with-status.snap.png differ diff --git a/packages/dnb-eufemia/src/extensions/payment-card/__tests__/__image_snapshots__/paymentcard-have-to-match-a-compact-card-variant.snap.png b/packages/dnb-eufemia/src/extensions/payment-card/__tests__/__image_snapshots__/paymentcard-have-to-match-a-compact-card-variant.snap.png new file mode 100644 index 00000000000..54bbea99c3e Binary files /dev/null and b/packages/dnb-eufemia/src/extensions/payment-card/__tests__/__image_snapshots__/paymentcard-have-to-match-a-compact-card-variant.snap.png differ diff --git a/packages/dnb-eufemia/src/extensions/payment-card/__tests__/__image_snapshots__/paymentcard-have-to-match-all-cards.snap.png b/packages/dnb-eufemia/src/extensions/payment-card/__tests__/__image_snapshots__/paymentcard-have-to-match-all-cards.snap.png new file mode 100644 index 00000000000..8d370328b52 Binary files /dev/null and b/packages/dnb-eufemia/src/extensions/payment-card/__tests__/__image_snapshots__/paymentcard-have-to-match-all-cards.snap.png differ diff --git a/packages/dnb-eufemia/src/extensions/payment-card/__tests__/__snapshots__/payment-card-screenshot-test-js-payment-card-screenshot-have-to-match-a-basic-card-1-4e7fd.snap.png b/packages/dnb-eufemia/src/extensions/payment-card/__tests__/__snapshots__/payment-card-screenshot-test-js-payment-card-screenshot-have-to-match-a-basic-card-1-4e7fd.snap.png deleted file mode 100644 index 889ee6eb0ea..00000000000 Binary files a/packages/dnb-eufemia/src/extensions/payment-card/__tests__/__snapshots__/payment-card-screenshot-test-js-payment-card-screenshot-have-to-match-a-basic-card-1-4e7fd.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/extensions/payment-card/__tests__/__snapshots__/payment-card-screenshot-test-js-payment-card-screenshot-have-to-match-a-card-with-status-1-fd78e.snap.png b/packages/dnb-eufemia/src/extensions/payment-card/__tests__/__snapshots__/payment-card-screenshot-test-js-payment-card-screenshot-have-to-match-a-card-with-status-1-fd78e.snap.png deleted file mode 100644 index e17181a9d8f..00000000000 Binary files a/packages/dnb-eufemia/src/extensions/payment-card/__tests__/__snapshots__/payment-card-screenshot-test-js-payment-card-screenshot-have-to-match-a-card-with-status-1-fd78e.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/extensions/payment-card/__tests__/__snapshots__/payment-card-screenshot-test-js-payment-card-screenshot-have-to-match-a-compact-card-variant-1-a3f44.snap.png b/packages/dnb-eufemia/src/extensions/payment-card/__tests__/__snapshots__/payment-card-screenshot-test-js-payment-card-screenshot-have-to-match-a-compact-card-variant-1-a3f44.snap.png deleted file mode 100644 index b000a1079b4..00000000000 Binary files a/packages/dnb-eufemia/src/extensions/payment-card/__tests__/__snapshots__/payment-card-screenshot-test-js-payment-card-screenshot-have-to-match-a-compact-card-variant-1-a3f44.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/extensions/payment-card/__tests__/__snapshots__/payment-card-screenshot-test-js-payment-card-screenshot-have-to-match-all-cards-1-670bf.snap.png b/packages/dnb-eufemia/src/extensions/payment-card/__tests__/__snapshots__/payment-card-screenshot-test-js-payment-card-screenshot-have-to-match-all-cards-1-670bf.snap.png deleted file mode 100644 index 3bda5cab3eb..00000000000 Binary files a/packages/dnb-eufemia/src/extensions/payment-card/__tests__/__snapshots__/payment-card-screenshot-test-js-payment-card-screenshot-have-to-match-all-cards-1-670bf.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/fragments/drawer-list/__tests__/DrawerList.screenshot.test.js b/packages/dnb-eufemia/src/fragments/drawer-list/__tests__/DrawerList.screenshot.test.js deleted file mode 100644 index 61b81a3cf98..00000000000 --- a/packages/dnb-eufemia/src/fragments/drawer-list/__tests__/DrawerList.screenshot.test.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../core/jest/jestSetupScreenshots' - -describe('DrawerList screenshot', () => { - setupPageScreenshot({ - url: '/uilib/components/fragments/drawer-list/demos', - }) - - it('have to match the default drawer-list', async () => { - const screenshot = await testPageScreenshot({ - style: { - width: '14rem', - }, - selector: '[data-visual-test="drawer-list"] .dnb-drawer-list__list', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/fragments/drawer-list/__tests__/DrawerList.screenshot.test.ts b/packages/dnb-eufemia/src/fragments/drawer-list/__tests__/DrawerList.screenshot.test.ts new file mode 100644 index 00000000000..6cd9eaa0494 --- /dev/null +++ b/packages/dnb-eufemia/src/fragments/drawer-list/__tests__/DrawerList.screenshot.test.ts @@ -0,0 +1,25 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../../core/jest/jestSetupScreenshots' + +describe('DrawerList', () => { + setupPageScreenshot({ + url: '/uilib/components/fragments/drawer-list/demos', + }) + + it('have to match the default drawer-list', async () => { + const screenshot = await makeScreenshot({ + style: { + width: '14rem', + }, + selector: '[data-visual-test="drawer-list"] .dnb-drawer-list__list', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/fragments/drawer-list/__tests__/__image_snapshots__/drawerlist-have-to-match-the-default-drawer-list.snap.png b/packages/dnb-eufemia/src/fragments/drawer-list/__tests__/__image_snapshots__/drawerlist-have-to-match-the-default-drawer-list.snap.png new file mode 100644 index 00000000000..bbdc5354bd2 Binary files /dev/null and b/packages/dnb-eufemia/src/fragments/drawer-list/__tests__/__image_snapshots__/drawerlist-have-to-match-the-default-drawer-list.snap.png differ diff --git a/packages/dnb-eufemia/src/fragments/drawer-list/__tests__/__snapshots__/DrawerList.test.js.snap b/packages/dnb-eufemia/src/fragments/drawer-list/__tests__/__snapshots__/DrawerList.test.js.snap index 0ae51cb9f33..296209da6e8 100644 --- a/packages/dnb-eufemia/src/fragments/drawer-list/__tests__/__snapshots__/DrawerList.test.js.snap +++ b/packages/dnb-eufemia/src/fragments/drawer-list/__tests__/__snapshots__/DrawerList.test.js.snap @@ -1104,6 +1104,9 @@ html[data-visual-test] .dnb-drawer-list__portal__style { -ms-overflow-style: auto; scrollbar-color: var(--color-sea-green) transparent; } +html:not([data-visual-test]) .dnb-drawer-list--scroll .dnb-drawer-list__options { + scroll-behavior: smooth; +} @supports not (scrollbar-color: auto) { .dnb-drawer-list--scroll .dnb-drawer-list__options::-webkit-scrollbar { background-color: var(--color-black-8); @@ -1122,12 +1125,6 @@ html[data-visual-test] .dnb-drawer-list__portal__style { background-color: var(--color-emerald-green); } } -html:not([data-visual-test]) .dnb-drawer-list--scroll .dnb-drawer-list__options { - scroll-behavior: smooth; -} -html[data-visual-test] .dnb-drawer-list--scroll .dnb-drawer-list__options { - scroll-behavior: auto !important; -} html[data-visual-test] .dnb-drawer-list--scroll .dnb-drawer-list__options, .dnb-drawer-list--scroll.dnb-drawer-list--no-animation .dnb-drawer-list__options { transition: none !important; } diff --git a/packages/dnb-eufemia/src/fragments/drawer-list/__tests__/__snapshots__/drawer-list-screenshot-test-js-drawer-list-screenshot-have-to-match-the-default-drawer-list-1-49db1.snap.png b/packages/dnb-eufemia/src/fragments/drawer-list/__tests__/__snapshots__/drawer-list-screenshot-test-js-drawer-list-screenshot-have-to-match-the-default-drawer-list-1-49db1.snap.png deleted file mode 100644 index a5a4efa14cc..00000000000 Binary files a/packages/dnb-eufemia/src/fragments/drawer-list/__tests__/__snapshots__/drawer-list-screenshot-test-js-drawer-list-screenshot-have-to-match-the-default-drawer-list-1-49db1.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/style/core/helper-classes/__tests__/HelperClasses.screenshot.test.js b/packages/dnb-eufemia/src/style/core/helper-classes/__tests__/HelperClasses.screenshot.test.js deleted file mode 100644 index 4a9ff981643..00000000000 --- a/packages/dnb-eufemia/src/style/core/helper-classes/__tests__/HelperClasses.screenshot.test.js +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../../core/jest/jestSetupScreenshots' - -describe('HelperClasses screenshot', () => { - setupPageScreenshot({ - url: '/uilib/helpers/classes/visual-tests', - }) - - it('have to match core-style', async () => { - const screenshot = await testPageScreenshot({ - addWrapper: false, - selector: '[data-visual-test="helper-core-style"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match tap-focus', async () => { - const screenshot = await testPageScreenshot({ - addWrapper: false, - selector: '[data-visual-test="helper-tap-focus"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match unstyled-list', async () => { - const screenshot = await testPageScreenshot({ - addWrapper: false, - selector: '[data-visual-test="helper-unstyled-list"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match sr-only', async () => { - const screenshot = await testPageScreenshot({ - addWrapper: false, - selector: '[data-visual-test="helper-sr-only"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) - - it('have to match selection', async () => { - const screenshot = await testPageScreenshot({ - addWrapper: false, - selector: '[data-visual-test="helper-selection"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/style/core/helper-classes/__tests__/HelperClasses.screenshot.test.ts b/packages/dnb-eufemia/src/style/core/helper-classes/__tests__/HelperClasses.screenshot.test.ts new file mode 100644 index 00000000000..15c2d2ae58c --- /dev/null +++ b/packages/dnb-eufemia/src/style/core/helper-classes/__tests__/HelperClasses.screenshot.test.ts @@ -0,0 +1,55 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../../../core/jest/jestSetupScreenshots' + +describe('HelperClasses', () => { + setupPageScreenshot({ + url: '/uilib/helpers/classes/visual-tests', + }) + + it('have to match core-style', async () => { + const screenshot = await makeScreenshot({ + addWrapper: false, + selector: '[data-visual-test="helper-core-style"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match tap-focus', async () => { + const screenshot = await makeScreenshot({ + addWrapper: false, + selector: '[data-visual-test="helper-tap-focus"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match unstyled-list', async () => { + const screenshot = await makeScreenshot({ + addWrapper: false, + selector: '[data-visual-test="helper-unstyled-list"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match sr-only', async () => { + const screenshot = await makeScreenshot({ + addWrapper: false, + selector: '[data-visual-test="helper-sr-only"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match selection', async () => { + const screenshot = await makeScreenshot({ + addWrapper: false, + selector: '[data-visual-test="helper-selection"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/style/core/helper-classes/__tests__/__image_snapshots__/helperclasses-have-to-match-core-style.snap.png b/packages/dnb-eufemia/src/style/core/helper-classes/__tests__/__image_snapshots__/helperclasses-have-to-match-core-style.snap.png new file mode 100644 index 00000000000..bd7b7e52009 Binary files /dev/null and b/packages/dnb-eufemia/src/style/core/helper-classes/__tests__/__image_snapshots__/helperclasses-have-to-match-core-style.snap.png differ diff --git a/packages/dnb-eufemia/src/style/core/helper-classes/__tests__/__image_snapshots__/helperclasses-have-to-match-selection.snap.png b/packages/dnb-eufemia/src/style/core/helper-classes/__tests__/__image_snapshots__/helperclasses-have-to-match-selection.snap.png new file mode 100644 index 00000000000..3883bc4968d Binary files /dev/null and b/packages/dnb-eufemia/src/style/core/helper-classes/__tests__/__image_snapshots__/helperclasses-have-to-match-selection.snap.png differ diff --git a/packages/dnb-eufemia/src/style/core/helper-classes/__tests__/__image_snapshots__/helperclasses-have-to-match-sr-only.snap.png b/packages/dnb-eufemia/src/style/core/helper-classes/__tests__/__image_snapshots__/helperclasses-have-to-match-sr-only.snap.png new file mode 100644 index 00000000000..5f7c58312b0 Binary files /dev/null and b/packages/dnb-eufemia/src/style/core/helper-classes/__tests__/__image_snapshots__/helperclasses-have-to-match-sr-only.snap.png differ diff --git a/packages/dnb-eufemia/src/style/core/helper-classes/__tests__/__image_snapshots__/helperclasses-have-to-match-tap-focus.snap.png b/packages/dnb-eufemia/src/style/core/helper-classes/__tests__/__image_snapshots__/helperclasses-have-to-match-tap-focus.snap.png new file mode 100644 index 00000000000..50ed7444a1f Binary files /dev/null and b/packages/dnb-eufemia/src/style/core/helper-classes/__tests__/__image_snapshots__/helperclasses-have-to-match-tap-focus.snap.png differ diff --git a/packages/dnb-eufemia/src/style/core/helper-classes/__tests__/__image_snapshots__/helperclasses-have-to-match-unstyled-list.snap.png b/packages/dnb-eufemia/src/style/core/helper-classes/__tests__/__image_snapshots__/helperclasses-have-to-match-unstyled-list.snap.png new file mode 100644 index 00000000000..1a0d1759688 Binary files /dev/null and b/packages/dnb-eufemia/src/style/core/helper-classes/__tests__/__image_snapshots__/helperclasses-have-to-match-unstyled-list.snap.png differ diff --git a/packages/dnb-eufemia/src/style/core/helper-classes/__tests__/__snapshots__/helper-classes-screenshot-test-js-helper-classes-screenshot-have-to-match-core-style-1-5bb35.snap.png b/packages/dnb-eufemia/src/style/core/helper-classes/__tests__/__snapshots__/helper-classes-screenshot-test-js-helper-classes-screenshot-have-to-match-core-style-1-5bb35.snap.png deleted file mode 100644 index 3442405e94c..00000000000 Binary files a/packages/dnb-eufemia/src/style/core/helper-classes/__tests__/__snapshots__/helper-classes-screenshot-test-js-helper-classes-screenshot-have-to-match-core-style-1-5bb35.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/style/core/helper-classes/__tests__/__snapshots__/helper-classes-screenshot-test-js-helper-classes-screenshot-have-to-match-selection-1-9eecf.snap.png b/packages/dnb-eufemia/src/style/core/helper-classes/__tests__/__snapshots__/helper-classes-screenshot-test-js-helper-classes-screenshot-have-to-match-selection-1-9eecf.snap.png deleted file mode 100644 index 74c2f062a11..00000000000 Binary files a/packages/dnb-eufemia/src/style/core/helper-classes/__tests__/__snapshots__/helper-classes-screenshot-test-js-helper-classes-screenshot-have-to-match-selection-1-9eecf.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/style/core/helper-classes/__tests__/__snapshots__/helper-classes-screenshot-test-js-helper-classes-screenshot-have-to-match-sr-only-1-041cb.snap.png b/packages/dnb-eufemia/src/style/core/helper-classes/__tests__/__snapshots__/helper-classes-screenshot-test-js-helper-classes-screenshot-have-to-match-sr-only-1-041cb.snap.png deleted file mode 100644 index 890a11319d7..00000000000 Binary files a/packages/dnb-eufemia/src/style/core/helper-classes/__tests__/__snapshots__/helper-classes-screenshot-test-js-helper-classes-screenshot-have-to-match-sr-only-1-041cb.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/style/core/helper-classes/__tests__/__snapshots__/helper-classes-screenshot-test-js-helper-classes-screenshot-have-to-match-tap-focus-1-e3776.snap.png b/packages/dnb-eufemia/src/style/core/helper-classes/__tests__/__snapshots__/helper-classes-screenshot-test-js-helper-classes-screenshot-have-to-match-tap-focus-1-e3776.snap.png deleted file mode 100644 index 1e9acafbe3f..00000000000 Binary files a/packages/dnb-eufemia/src/style/core/helper-classes/__tests__/__snapshots__/helper-classes-screenshot-test-js-helper-classes-screenshot-have-to-match-tap-focus-1-e3776.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/style/core/helper-classes/__tests__/__snapshots__/helper-classes-screenshot-test-js-helper-classes-screenshot-have-to-match-unstyled-list-1-cbc93.snap.png b/packages/dnb-eufemia/src/style/core/helper-classes/__tests__/__snapshots__/helper-classes-screenshot-test-js-helper-classes-screenshot-have-to-match-unstyled-list-1-cbc93.snap.png deleted file mode 100644 index d26837504c4..00000000000 Binary files a/packages/dnb-eufemia/src/style/core/helper-classes/__tests__/__snapshots__/helper-classes-screenshot-test-js-helper-classes-screenshot-have-to-match-unstyled-list-1-cbc93.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/style/core/scopes.scss b/packages/dnb-eufemia/src/style/core/scopes.scss index 574886656b9..dd26991ccad 100644 --- a/packages/dnb-eufemia/src/style/core/scopes.scss +++ b/packages/dnb-eufemia/src/style/core/scopes.scss @@ -47,7 +47,9 @@ @mixin htmlDefault() { html { - scroll-behavior: smooth; + html:not([data-visual-test]) & { + scroll-behavior: smooth; + } font-size: 100%; // IS_SAFARI_MOBILE diff --git a/packages/dnb-eufemia/src/style/core/utilities.scss b/packages/dnb-eufemia/src/style/core/utilities.scss index d39429b5059..fc585148726 100644 --- a/packages/dnb-eufemia/src/style/core/utilities.scss +++ b/packages/dnb-eufemia/src/style/core/utilities.scss @@ -186,28 +186,22 @@ $focusRingColor: var(--color-emerald-green); overflow-y: $mode; overscroll-behavior: contain; - @include scrollbarAppearance(); - html:not([data-visual-test]) & { scroll-behavior: smooth; } - html[data-visual-test] & { - scroll-behavior: auto !important; - } + + @include scrollbarAppearance(); } @mixin scrollX($mode: scroll) { overflow-x: $mode; overscroll-behavior: contain; - @include scrollbarAppearance(); - html:not([data-visual-test]) & { scroll-behavior: smooth; } - html[data-visual-test] & { - scroll-behavior: auto !important; - } + + @include scrollbarAppearance(); } @mixin hideScrollbar() { diff --git a/packages/dnb-eufemia/src/style/elements/__tests__/Typography.screenshot.test.js b/packages/dnb-eufemia/src/style/elements/__tests__/Typography.screenshot.test.js deleted file mode 100644 index f3222e6b277..00000000000 --- a/packages/dnb-eufemia/src/style/elements/__tests__/Typography.screenshot.test.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, - // isCI, -} from '../../../core/jest/jestSetupScreenshots' - -describe('Typography screenshot', () => { - setupPageScreenshot({ - url: '/uilib/typography', - }) - - it('have to match all the typography variants', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="typography-variants"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/style/elements/__tests__/Typography.screenshot.test.ts b/packages/dnb-eufemia/src/style/elements/__tests__/Typography.screenshot.test.ts new file mode 100644 index 00000000000..bb54698a199 --- /dev/null +++ b/packages/dnb-eufemia/src/style/elements/__tests__/Typography.screenshot.test.ts @@ -0,0 +1,22 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../../core/jest/jestSetupScreenshots' + +describe('Typography', () => { + setupPageScreenshot({ + url: '/uilib/typography', + }) + + it('have to match all the typography variants', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="typography-variants"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/style/elements/__tests__/__image_snapshots__/typography-have-to-match-all-the-typography-variants.snap.png b/packages/dnb-eufemia/src/style/elements/__tests__/__image_snapshots__/typography-have-to-match-all-the-typography-variants.snap.png new file mode 100644 index 00000000000..c7ad09feb64 Binary files /dev/null and b/packages/dnb-eufemia/src/style/elements/__tests__/__image_snapshots__/typography-have-to-match-all-the-typography-variants.snap.png differ diff --git a/packages/dnb-eufemia/src/style/elements/__tests__/__snapshots__/typography-screenshot-test-js-typography-screenshot-have-to-match-all-the-typography-variants-1-7ef4d.snap.png b/packages/dnb-eufemia/src/style/elements/__tests__/__snapshots__/typography-screenshot-test-js-typography-screenshot-have-to-match-all-the-typography-variants-1-7ef4d.snap.png deleted file mode 100644 index 721a5c7ba78..00000000000 Binary files a/packages/dnb-eufemia/src/style/elements/__tests__/__snapshots__/typography-screenshot-test-js-typography-screenshot-have-to-match-all-the-typography-variants-1-7ef4d.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/style/elements/__tests__/themes/Typography.eiendom.screenshot.test.js b/packages/dnb-eufemia/src/style/elements/__tests__/themes/Typography.eiendom.screenshot.test.js deleted file mode 100644 index 16ab144d73b..00000000000 --- a/packages/dnb-eufemia/src/style/elements/__tests__/themes/Typography.eiendom.screenshot.test.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Screenshot Test - * This file will not run on "test:staged" because we don't require any related files - */ - -import { - testPageScreenshot, - setupPageScreenshot, -} from '../../../../core/jest/jestSetupScreenshots' - -describe('Typography with eiendom theme', () => { - setupPageScreenshot({ - url: '/uilib/typography?dnb-theme=eiendom', - }) - - it('have to match the typography variants', async () => { - const screenshot = await testPageScreenshot({ - selector: '[data-visual-test="typography-variants"]', - }) - expect(screenshot).toMatchImageSnapshot() - }) -}) diff --git a/packages/dnb-eufemia/src/style/elements/__tests__/themes/Typography.eiendom.screenshot.test.ts b/packages/dnb-eufemia/src/style/elements/__tests__/themes/Typography.eiendom.screenshot.test.ts new file mode 100644 index 00000000000..1ffd4665ec1 --- /dev/null +++ b/packages/dnb-eufemia/src/style/elements/__tests__/themes/Typography.eiendom.screenshot.test.ts @@ -0,0 +1,22 @@ +/** + * Screenshot Test + * This file will not run on "test:staged" because we don't require any related files + */ + +import { + makeScreenshot, + setupPageScreenshot, +} from '../../../../core/jest/jestSetupScreenshots' + +describe('Typography with eiendom theme', () => { + setupPageScreenshot({ + url: '/uilib/typography?dnb-theme=eiendom', + }) + + it('have to match the typography variants', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="typography-variants"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/style/elements/__tests__/themes/__image_snapshots__/typography-with-eiendom-theme-have-to-match-the-typography-variants.snap.png b/packages/dnb-eufemia/src/style/elements/__tests__/themes/__image_snapshots__/typography-with-eiendom-theme-have-to-match-the-typography-variants.snap.png new file mode 100644 index 00000000000..9222c72219b Binary files /dev/null and b/packages/dnb-eufemia/src/style/elements/__tests__/themes/__image_snapshots__/typography-with-eiendom-theme-have-to-match-the-typography-variants.snap.png differ diff --git a/packages/dnb-eufemia/src/style/elements/__tests__/themes/__snapshots__/typography-eiendom-screenshot-test-js-typography-with-eiendom-theme-have-to-match-the-typography-variants-1-5fcb6.snap.png b/packages/dnb-eufemia/src/style/elements/__tests__/themes/__snapshots__/typography-eiendom-screenshot-test-js-typography-with-eiendom-theme-have-to-match-the-typography-variants-1-5fcb6.snap.png deleted file mode 100644 index 4fb15cd3629..00000000000 Binary files a/packages/dnb-eufemia/src/style/elements/__tests__/themes/__snapshots__/typography-eiendom-screenshot-test-js-typography-with-eiendom-theme-have-to-match-the-typography-variants-1-5fcb6.snap.png and /dev/null differ diff --git a/yarn.lock b/yarn.lock index ad00aa64291..09d09c1bc45 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3248,6 +3248,7 @@ __metadata: "@testing-library/user-event": 13.5.0 "@types/jest": 29.2.6 "@types/jest-axe": 3.5.5 + "@types/jest-image-snapshot": 6.1.0 "@typescript-eslint/eslint-plugin": 5.28.0 "@typescript-eslint/parser": 5.43.0 "@wojtekmaj/enzyme-adapter-react-17": 0.6.5 @@ -3294,10 +3295,10 @@ __metadata: jest: 29.3.1 jest-axe: 7.0.0 jest-environment-jsdom: 29.3.1 - jest-environment-node: 29.3.1 + jest-image-snapshot: 6.1.0 jest-matchmedia-mock: 1.1.0 + jest-playwright-preset: 3.0.1 jest-raw-loader: 1.0.1 - jest-screenshot: 0.3.5 jest-tobetype: 1.2.3 keycode: 2.2.1 lint-staged: 11.2.6 @@ -3311,6 +3312,7 @@ __metadata: opentype.js: 1.3.4 ora: 5.4.1 packpath: 0.1.0 + playwright-firefox: 1.30.0 postcss: 8.3.11 postcss-calc: 8.0.0 postcss-preset-env: 6.7.0 @@ -3318,7 +3320,6 @@ __metadata: prettier-package-json: 2.6.0 process: 0.11.10 prop-types: 15.7.2 - puppeteer: 8.0.0 react: 17.0.2 react-dom: 17.0.2 react-fake-props: 1.0.3 @@ -5787,6 +5788,15 @@ __metadata: languageName: node linkType: hard +"@sideway/address@npm:^4.1.3": + version: 4.1.4 + resolution: "@sideway/address@npm:4.1.4" + dependencies: + "@hapi/hoek": ^9.0.0 + checksum: b9fca2a93ac2c975ba12e0a6d97853832fb1f4fb02393015e012b47fa916a75ca95102d77214b2a29a2784740df2407951af8c5dde054824c65577fd293c4cdb + languageName: node + linkType: hard + "@sideway/formula@npm:^3.0.0": version: 3.0.0 resolution: "@sideway/formula@npm:3.0.0" @@ -7376,6 +7386,17 @@ __metadata: languageName: node linkType: hard +"@types/jest-image-snapshot@npm:6.1.0": + version: 6.1.0 + resolution: "@types/jest-image-snapshot@npm:6.1.0" + dependencies: + "@types/jest": "*" + "@types/pixelmatch": "*" + ssim.js: ^3.1.1 + checksum: dfa85ad0a07aa45161ab644443befa6f8e761ce7b2f3cd61c3f350ea1b82d6f4cfefc4ccddf0b8719053fe6f9800eb735e62219f34febd64b6f02efda8ce6010 + languageName: node + linkType: hard + "@types/jest@npm:*": version: 27.4.0 resolution: "@types/jest@npm:27.4.0" @@ -7556,6 +7577,15 @@ __metadata: languageName: node linkType: hard +"@types/pixelmatch@npm:*": + version: 5.2.4 + resolution: "@types/pixelmatch@npm:5.2.4" + dependencies: + "@types/node": "*" + checksum: 8920c3b7df22851ad69192fb7637206cb8f7dc73520f602202e36dd6f6b7701a4b56746175e7d7391ed9dc2c636d4d9bc5d7bd26fc3f1b11df1a63fb86418b91 + languageName: node + linkType: hard + "@types/prettier@npm:^2.1.5": version: 2.4.1 resolution: "@types/prettier@npm:2.4.1" @@ -7789,6 +7819,15 @@ __metadata: languageName: node linkType: hard +"@types/wait-on@npm:^5.2.0": + version: 5.3.1 + resolution: "@types/wait-on@npm:5.3.1" + dependencies: + "@types/node": "*" + checksum: 2a6e88a107930963ceea016dc733dc259dc52faf864933cd4d6f7fc6db7165254c10f8bfcb3b803237b2869674d988319ea4f958c0b6fd3763c5fcb9e489565a + languageName: node + linkType: hard + "@types/webpack-env@npm:^1.16.0": version: 1.16.3 resolution: "@types/webpack-env@npm:1.16.3" @@ -7864,15 +7903,6 @@ __metadata: languageName: node linkType: hard -"@types/yauzl@npm:^2.9.1": - version: 2.9.2 - resolution: "@types/yauzl@npm:2.9.2" - dependencies: - "@types/node": "*" - checksum: dfb49abe82605615712fc694eaa4f7068fe30aa03f38c085e2c2e74408beaad30471d36da9654a811482ece2ea4405575fd99b19c0aa327ed2a9736b554bbf43 - languageName: node - linkType: hard - "@types/yoga-layout@npm:1.9.2": version: 1.9.2 resolution: "@types/yoga-layout@npm:1.9.2" @@ -8811,7 +8841,7 @@ __metadata: languageName: node linkType: hard -"ajv@npm:^6.1.0, ajv@npm:^6.10.0, ajv@npm:^6.10.2, ajv@npm:^6.12.2, ajv@npm:^6.12.3, ajv@npm:^6.12.4, ajv@npm:^6.12.5": +"ajv@npm:^6.1.0, ajv@npm:^6.10.0, ajv@npm:^6.10.2, ajv@npm:^6.12.2, ajv@npm:^6.12.4, ajv@npm:^6.12.5": version: 6.12.6 resolution: "ajv@npm:6.12.6" dependencies: @@ -9556,22 +9586,6 @@ __metadata: languageName: node linkType: hard -"asn1@npm:~0.2.3": - version: 0.2.4 - resolution: "asn1@npm:0.2.4" - dependencies: - safer-buffer: ~2.1.0 - checksum: aa5d6f77b1e0597df53824c68cfe82d1d89ce41cb3520148611f025fbb3101b2d25dd6a40ad34e4fac10f6b19ed5e8628cd4b7d212261e80e83f02b39ee5663c - languageName: node - linkType: hard - -"assert-plus@npm:1.0.0, assert-plus@npm:^1.0.0": - version: 1.0.0 - resolution: "assert-plus@npm:1.0.0" - checksum: 19b4340cb8f0e6a981c07225eacac0e9d52c2644c080198765d63398f0075f83bbc0c8e95474d54224e297555ad0d631c1dcd058adb1ddc2437b41a6b424ac64 - languageName: node - linkType: hard - "assert@npm:^1.1.1": version: 1.5.0 resolution: "assert@npm:1.5.0" @@ -9781,20 +9795,6 @@ __metadata: languageName: node linkType: hard -"aws-sign2@npm:~0.7.0": - version: 0.7.0 - resolution: "aws-sign2@npm:0.7.0" - checksum: b148b0bb0778098ad8cf7e5fc619768bcb51236707ca1d3e5b49e41b171166d8be9fdc2ea2ae43d7decf02989d0aaa3a9c4caa6f320af95d684de9b548a71525 - languageName: node - linkType: hard - -"aws4@npm:^1.8.0": - version: 1.11.0 - resolution: "aws4@npm:1.11.0" - checksum: 5a00d045fd0385926d20ebebcfba5ec79d4482fe706f63c27b324d489a04c68edb0db99ed991e19eda09cb8c97dc2452059a34d97545cebf591d7a2b5a10999f - languageName: node - linkType: hard - "axe-core@npm:4.5.1": version: 4.5.1 resolution: "axe-core@npm:4.5.1" @@ -10399,15 +10399,6 @@ __metadata: languageName: node linkType: hard -"bcrypt-pbkdf@npm:^1.0.0": - version: 1.0.2 - resolution: "bcrypt-pbkdf@npm:1.0.2" - dependencies: - tweetnacl: ^0.14.3 - checksum: 4edfc9fe7d07019609ccf797a2af28351736e9d012c8402a07120c4453a3b789a15f2ee1530dc49eee8f7eb9379331a8dd4b3766042b9e502f74a68e7f662291 - languageName: node - linkType: hard - "beeper@npm:^1.0.0": version: 1.1.1 resolution: "beeper@npm:1.1.1" @@ -10860,7 +10851,7 @@ __metadata: languageName: node linkType: hard -"buffer@npm:^5.2.1, buffer@npm:^5.5.0": +"buffer@npm:^5.5.0": version: 5.7.1 resolution: "buffer@npm:5.7.1" dependencies: @@ -11281,13 +11272,6 @@ __metadata: languageName: node linkType: hard -"caseless@npm:~0.12.0": - version: 0.12.0 - resolution: "caseless@npm:0.12.0" - checksum: b43bd4c440aa1e8ee6baefee8063b4850fd0d7b378f6aabc796c9ec8cb26d27fb30b46885350777d9bd079c5256c0e1329ad0dc7c2817e0bb466810ebb353751 - languageName: node - linkType: hard - "ccount@npm:^1.0.0": version: 1.1.0 resolution: "ccount@npm:1.1.0" @@ -12155,7 +12139,7 @@ __metadata: languageName: node linkType: hard -"combined-stream@npm:^1.0.6, combined-stream@npm:^1.0.8, combined-stream@npm:~1.0.6": +"combined-stream@npm:^1.0.8": version: 1.0.8 resolution: "combined-stream@npm:1.0.8" dependencies: @@ -12199,6 +12183,13 @@ __metadata: languageName: node linkType: hard +"commander@npm:^3.0.2": + version: 3.0.2 + resolution: "commander@npm:3.0.2" + checksum: 6d14ad030d1904428139487ed31febcb04c1604db2b8d9fae711f60ee6718828dc0e11602249e91c8a97b0e721e9c6d53edbc166bad3cde1596851d59a8f824d + languageName: node + linkType: hard + "commander@npm:^4.0.0, commander@npm:^4.0.1, commander@npm:^4.1.1": version: 4.1.1 resolution: "commander@npm:4.1.1" @@ -12206,6 +12197,13 @@ __metadata: languageName: node linkType: hard +"commander@npm:^5.1.0": + version: 5.1.0 + resolution: "commander@npm:5.1.0" + checksum: 0b7fec1712fbcc6230fcb161d8d73b4730fa91a21dc089515489402ad78810547683f058e2a9835929c212fead1d6a6ade70db28bbb03edbc2829a9ab7d69447 + languageName: node + linkType: hard + "commander@npm:^6.2.1": version: 6.2.1 resolution: "commander@npm:6.2.1" @@ -12660,13 +12658,6 @@ __metadata: languageName: node linkType: hard -"core-util-is@npm:1.0.2": - version: 1.0.2 - resolution: "core-util-is@npm:1.0.2" - checksum: 7a4c925b497a2c91421e25bf76d6d8190f0b2359a9200dbeed136e63b2931d6294d3b1893eda378883ed363cd950f44a12a401384c609839ea616befb7927dab - languageName: node - linkType: hard - "core-util-is@npm:~1.0.0": version: 1.0.3 resolution: "core-util-is@npm:1.0.3" @@ -13387,6 +13378,16 @@ __metadata: languageName: node linkType: hard +"cwd@npm:^0.10.0": + version: 0.10.0 + resolution: "cwd@npm:0.10.0" + dependencies: + find-pkg: ^0.1.2 + fs-exists-sync: ^0.1.0 + checksum: 55ab180af86306fe7268c63dd87a737a12e1cb5146be6bcd7fe298df5f5c594cad85907a47fee02cee322d7dc98197a2b45e4d7ebfb0b2c93892bde7d787fe56 + languageName: node + linkType: hard + "cyclist@npm:^1.0.1": version: 1.0.1 resolution: "cyclist@npm:1.0.1" @@ -13432,15 +13433,6 @@ __metadata: languageName: node linkType: hard -"dashdash@npm:^1.12.0": - version: 1.14.1 - resolution: "dashdash@npm:1.14.1" - dependencies: - assert-plus: ^1.0.0 - checksum: 3634c249570f7f34e3d34f866c93f866c5b417f0dd616275decae08147dcdf8fccfaa5947380ccfb0473998ea3a8057c0b4cd90c875740ee685d0624b2983598 - languageName: node - linkType: hard - "data-urls@npm:^3.0.2": version: 3.0.2 resolution: "data-urls@npm:3.0.2" @@ -13976,13 +13968,6 @@ __metadata: languageName: node linkType: hard -"devtools-protocol@npm:0.0.854822": - version: 0.0.854822 - resolution: "devtools-protocol@npm:0.0.854822" - checksum: 6a49e631967da8f29e4e37c5002d2faf913884dd48b989b3e8ea34ab2ee51f441c5a644dc21a8dade5b388879cf073b7379c79a4b700109f51c58ea7c6abc01a - languageName: node - linkType: hard - "dezalgo@npm:^1.0.0": version: 1.0.3 resolution: "dezalgo@npm:1.0.3" @@ -14484,16 +14469,6 @@ __metadata: languageName: node linkType: hard -"ecc-jsbn@npm:~0.1.1": - version: 0.1.2 - resolution: "ecc-jsbn@npm:0.1.2" - dependencies: - jsbn: ~0.1.0 - safer-buffer: ^2.1.0 - checksum: 22fef4b6203e5f31d425f5b711eb389e4c6c2723402e389af394f8411b76a488fa414d309d866e2b577ce3e8462d344205545c88a8143cc21752a5172818888a - languageName: node - linkType: hard - "ee-first@npm:1.1.1": version: 1.1.1 resolution: "ee-first@npm:1.1.1" @@ -15972,6 +15947,15 @@ __metadata: languageName: node linkType: hard +"expand-tilde@npm:^1.2.2": + version: 1.2.2 + resolution: "expand-tilde@npm:1.2.2" + dependencies: + os-homedir: ^1.0.1 + checksum: 18051cd104977bc06e2bb1347db9959b90504437beea0de6fd287a3c8c58b41e2330337bd189cfca2ee4be6bda9bf045f8c07daf23e622f85eb6ee1c420619a0 + languageName: node + linkType: hard + "expand-tilde@npm:^2.0.0, expand-tilde@npm:^2.0.2": version: 2.0.2 resolution: "expand-tilde@npm:2.0.2" @@ -15981,6 +15965,13 @@ __metadata: languageName: node linkType: hard +"expect-playwright@npm:^0.8.0": + version: 0.8.0 + resolution: "expect-playwright@npm:0.8.0" + checksum: d9e8f0529527020524f2e27f454bdbee042df0c3b1e32f0902513d7c8cac927d87bd5b7cd835c8cc08776a4f61a8fd9adfde22a3390f253846a4c3422c415110 + languageName: node + linkType: hard + "expect@npm:^29.0.0": version: 29.2.1 resolution: "expect@npm:29.2.1" @@ -16107,7 +16098,7 @@ __metadata: languageName: node linkType: hard -"extend@npm:^3.0.0, extend@npm:~3.0.2": +"extend@npm:^3.0.0": version: 3.0.2 resolution: "extend@npm:3.0.2" checksum: a50a8309ca65ea5d426382ff09f33586527882cf532931cb08ca786ea3146c0553310bda688710ff61d7668eba9f96b923fe1420cdf56a2c3eaf30fcab87b515 @@ -16141,37 +16132,6 @@ __metadata: languageName: node linkType: hard -"extract-zip@npm:^2.0.0": - version: 2.0.1 - resolution: "extract-zip@npm:2.0.1" - dependencies: - "@types/yauzl": ^2.9.1 - debug: ^4.1.1 - get-stream: ^5.1.0 - yauzl: ^2.10.0 - dependenciesMeta: - "@types/yauzl": - optional: true - bin: - extract-zip: cli.js - checksum: 8cbda9debdd6d6980819cc69734d874ddd71051c9fe5bde1ef307ebcedfe949ba57b004894b585f758b7c9eeeea0e3d87f2dda89b7d25320459c2c9643ebb635 - languageName: node - linkType: hard - -"extsprintf@npm:1.3.0": - version: 1.3.0 - resolution: "extsprintf@npm:1.3.0" - checksum: cee7a4a1e34cffeeec18559109de92c27517e5641991ec6bab849aa64e3081022903dd53084f2080d0d2530803aa5ee84f1e9de642c365452f9e67be8f958ce2 - languageName: node - linkType: hard - -"extsprintf@npm:^1.2.0": - version: 1.4.0 - resolution: "extsprintf@npm:1.4.0" - checksum: 184dc8a413eb4b1ff16bdce797340e7ded4d28511d56a1c9afa5a95bcff6ace154063823eaf0206dbbb0d14059d74f382a15c34b7c0636fa74a7e681295eb67e - languageName: node - linkType: hard - "fancy-log@npm:^1.1.0, fancy-log@npm:^1.3.2": version: 1.3.3 resolution: "fancy-log@npm:1.3.3" @@ -16540,6 +16500,38 @@ __metadata: languageName: node linkType: hard +"find-file-up@npm:^0.1.2": + version: 0.1.3 + resolution: "find-file-up@npm:0.1.3" + dependencies: + fs-exists-sync: ^0.1.0 + resolve-dir: ^0.1.0 + checksum: 95475fee7b727266ec65312527c580eb4f01884592620296cf7859e72cce7f4f6a667c964ad6feeec53fb72a7c3991805532ed7a53d8224e9a1ccd88479cabce + languageName: node + linkType: hard + +"find-pkg@npm:^0.1.2": + version: 0.1.2 + resolution: "find-pkg@npm:0.1.2" + dependencies: + find-file-up: ^0.1.2 + checksum: cd797bfa7dd419849559312cdd3aec767c39939e552daa92e53ff6b61108f331eb2c800d20a5973631eb894ea36c13dded01a868b10f457a685e0ae87a1746e1 + languageName: node + linkType: hard + +"find-process@npm:^1.4.4": + version: 1.4.7 + resolution: "find-process@npm:1.4.7" + dependencies: + chalk: ^4.0.0 + commander: ^5.1.0 + debug: ^4.1.1 + bin: + find-process: bin/find-process.js + checksum: 1953e6a16af86ec033d613ddfcac24f68b7ca6cc7d7aadc037ede4ccad4f03c5571d3c95165842475bfa9432120be5c995cc234c9c02726fc886ac6cd85ece3b + languageName: node + linkType: hard + "find-root@npm:^1.1.0": version: 1.1.0 resolution: "find-root@npm:1.1.0" @@ -16761,13 +16753,6 @@ __metadata: languageName: node linkType: hard -"forever-agent@npm:~0.6.1": - version: 0.6.1 - resolution: "forever-agent@npm:0.6.1" - checksum: 766ae6e220f5fe23676bb4c6a99387cec5b7b62ceb99e10923376e27bfea72f3c3aeec2ba5f45f3f7ba65d6616965aa7c20b15002b6860833bb6e394dea546a8 - languageName: node - linkType: hard - "fork-ts-checker-webpack-plugin@npm:^4.1.6": version: 4.1.6 resolution: "fork-ts-checker-webpack-plugin@npm:4.1.6" @@ -16867,17 +16852,6 @@ __metadata: languageName: node linkType: hard -"form-data@npm:~2.3.2": - version: 2.3.3 - resolution: "form-data@npm:2.3.3" - dependencies: - asynckit: ^0.4.0 - combined-stream: ^1.0.6 - mime-types: ^2.1.12 - checksum: 10c1780fa13dbe1ff3100114c2ce1f9307f8be10b14bf16e103815356ff567b6be39d70fc4a40f8990b9660012dc24b0f5e1dde1b6426166eb23a445ba068ca3 - languageName: node - linkType: hard - "forwarded@npm:0.2.0": version: 0.2.0 resolution: "forwarded@npm:0.2.0" @@ -16955,6 +16929,13 @@ __metadata: languageName: node linkType: hard +"fs-exists-sync@npm:^0.1.0": + version: 0.1.0 + resolution: "fs-exists-sync@npm:0.1.0" + checksum: 850a0d6e4c03a7bd2fd25043f77cd9d6be9c3b48bb99308bcfe9c94f3f92f65f2cd3fa036e13a1b0ba7a46d2e58792f53e578f01d75fbdcd56baeb9eed63b705 + languageName: node + linkType: hard + "fs-extra@npm:10.0.0, fs-extra@npm:^10.0.0": version: 10.0.0 resolution: "fs-extra@npm:10.0.0" @@ -18041,6 +18022,13 @@ __metadata: languageName: node linkType: hard +"get-stdin@npm:^5.0.1": + version: 5.0.1 + resolution: "get-stdin@npm:5.0.1" + checksum: f9784638ad3e68a0a8bdc031aedf0fca749843cd134956fbd4f3bbac17c359e0fb9210343fcbed72ee79fb19d8e4c49b7a6e742cc5d44e94ac1405e9371d4b3e + languageName: node + linkType: hard + "get-stdin@npm:^9.0.0": version: 9.0.0 resolution: "get-stdin@npm:9.0.0" @@ -18097,15 +18085,6 @@ __metadata: languageName: node linkType: hard -"getpass@npm:^0.1.1": - version: 0.1.7 - resolution: "getpass@npm:0.1.7" - dependencies: - assert-plus: ^1.0.0 - checksum: ab18d55661db264e3eac6012c2d3daeafaab7a501c035ae0ccb193c3c23e9849c6e29b6ac762b9c2adae460266f925d55a3a2a3a3c8b94be2f222df94d70c046 - languageName: node - linkType: hard - "ggit@npm:2.4.12": version: 2.4.12 resolution: "ggit@npm:2.4.12" @@ -18339,6 +18318,16 @@ __metadata: languageName: node linkType: hard +"global-modules@npm:^0.2.3": + version: 0.2.3 + resolution: "global-modules@npm:0.2.3" + dependencies: + global-prefix: ^0.1.4 + is-windows: ^0.2.0 + checksum: 3801788df54897d994c9c8f3d09f253d1379cd879ae61fcddbcc3ecdfdf6fe23a1edb983e8d4dd24cebf7e49823752e1cd29a2d33bdb4de587de8b4a85b17e24 + languageName: node + linkType: hard + "global-modules@npm:^1.0.0": version: 1.0.0 resolution: "global-modules@npm:1.0.0" @@ -18359,6 +18348,18 @@ __metadata: languageName: node linkType: hard +"global-prefix@npm:^0.1.4": + version: 0.1.5 + resolution: "global-prefix@npm:0.1.5" + dependencies: + homedir-polyfill: ^1.0.0 + ini: ^1.3.4 + is-windows: ^0.2.0 + which: ^1.2.12 + checksum: ea1b818a1851655ebb2341cdd5446da81c25f31ca6f0ac358a234cbed5442edc1bfa5628771466988d67d9fcc6ad09ca0e68a8d3d7e3d92f7de3aec87020e183 + languageName: node + linkType: hard + "global-prefix@npm:^1.0.1": version: 1.0.2 resolution: "global-prefix@npm:1.0.2" @@ -18487,6 +18488,13 @@ __metadata: languageName: node linkType: hard +"glur@npm:^1.1.2": + version: 1.1.2 + resolution: "glur@npm:1.1.2" + checksum: d80a50fe7f713a564cf50a8e46e2385e5256233c1180b94c06dfdf038655c8b11aa648dd8516b66025abfe437f4201aa10c0e759b68b9a37241375707cf107ea + languageName: node + linkType: hard + "gonzales-pe@npm:^4.3.0": version: 4.3.0 resolution: "gonzales-pe@npm:4.3.0" @@ -18777,23 +18785,6 @@ __metadata: languageName: node linkType: hard -"har-schema@npm:^2.0.0": - version: 2.0.0 - resolution: "har-schema@npm:2.0.0" - checksum: d8946348f333fb09e2bf24cc4c67eabb47c8e1d1aa1c14184c7ffec1140a49ec8aa78aa93677ae452d71d5fc0fdeec20f0c8c1237291fc2bcb3f502a5d204f9b - languageName: node - linkType: hard - -"har-validator@npm:~5.1.3": - version: 5.1.5 - resolution: "har-validator@npm:5.1.5" - dependencies: - ajv: ^6.12.3 - har-schema: ^2.0.0 - checksum: b998a7269ca560d7f219eedc53e2c664cd87d487e428ae854a6af4573fc94f182fe9d2e3b92ab968249baec7ebaf9ead69cf975c931dc2ab282ec182ee988280 - languageName: node - linkType: hard - "hard-rejection@npm:^2.1.0": version: 2.1.0 resolution: "hard-rejection@npm:2.1.0" @@ -19133,7 +19124,7 @@ __metadata: languageName: node linkType: hard -"homedir-polyfill@npm:^1.0.1": +"homedir-polyfill@npm:^1.0.0, homedir-polyfill@npm:^1.0.1": version: 1.0.3 resolution: "homedir-polyfill@npm:1.0.3" dependencies: @@ -19414,17 +19405,6 @@ __metadata: languageName: node linkType: hard -"http-signature@npm:~1.2.0": - version: 1.2.0 - resolution: "http-signature@npm:1.2.0" - dependencies: - assert-plus: ^1.0.0 - jsprim: ^1.2.2 - sshpk: ^1.7.0 - checksum: 3324598712266a9683585bb84a75dec4fd550567d5e0dd4a0fff6ff3f74348793404d3eeac4918fa0902c810eeee1a86419e4a2e92a164132dfe6b26743fb47c - languageName: node - linkType: hard - "http2-wrapper@npm:^1.0.0-beta.5.2": version: 1.0.3 resolution: "http2-wrapper@npm:1.0.3" @@ -20689,7 +20669,7 @@ __metadata: languageName: node linkType: hard -"is-typedarray@npm:^1.0.0, is-typedarray@npm:~1.0.0": +"is-typedarray@npm:^1.0.0": version: 1.0.0 resolution: "is-typedarray@npm:1.0.0" checksum: 3508c6cd0a9ee2e0df2fa2e9baabcdc89e911c7bd5cf64604586697212feec525aa21050e48affb5ffc3df20f0f5d2e2cf79b08caa64e1ccc9578e251763aef7 @@ -20792,6 +20772,13 @@ __metadata: languageName: node linkType: hard +"is-windows@npm:^0.2.0": + version: 0.2.0 + resolution: "is-windows@npm:0.2.0" + checksum: 3df25afda2fd9f3926b08cebacf1fc0a1fe7805a2cb73ef0f1b911c949e4e7648c4623979d74b4502bdd9af69471101eb6051b751595f7f88569148186cf7a7a + languageName: node + linkType: hard + "is-windows@npm:^1.0.1, is-windows@npm:^1.0.2": version: 1.0.2 resolution: "is-windows@npm:1.0.2" @@ -20890,13 +20877,6 @@ __metadata: languageName: node linkType: hard -"isstream@npm:~0.1.2": - version: 0.1.2 - resolution: "isstream@npm:0.1.2" - checksum: 1eb2fe63a729f7bdd8a559ab552c69055f4f48eb5c2f03724430587c6f450783c8f1cd936c1c952d0a927925180fcc892ebd5b174236cf1065d4bd5bdb37e963 - languageName: node - linkType: hard - "issue-parser@npm:^6.0.0": version: 6.0.0 resolution: "issue-parser@npm:6.0.0" @@ -21249,7 +21229,7 @@ __metadata: languageName: node linkType: hard -"jest-environment-node@npm:29.3.1, jest-environment-node@npm:^29.3.1": +"jest-environment-node@npm:^29.3.1": version: 29.3.1 resolution: "jest-environment-node@npm:29.3.1" dependencies: @@ -21314,6 +21294,25 @@ __metadata: languageName: node linkType: hard +"jest-image-snapshot@npm:6.1.0": + version: 6.1.0 + resolution: "jest-image-snapshot@npm:6.1.0" + dependencies: + chalk: ^4.0.0 + get-stdin: ^5.0.1 + glur: ^1.1.2 + lodash: ^4.17.4 + mkdirp: ^0.5.1 + pixelmatch: ^5.1.0 + pngjs: ^3.4.0 + rimraf: ^2.6.2 + ssim.js: ^3.1.1 + peerDependencies: + jest: ">=20 <=29" + checksum: e04eb48947ce5184aa19afdd41fd2e809542fbf4e335d6302efe15cb04e8df46df40fc86c81b0dd4ef0dd2a35879c92160a7d507c7888ef477e799cbcc4255ae + languageName: node + linkType: hard + "jest-leak-detector@npm:^29.3.1": version: 29.3.1 resolution: "jest-leak-detector@npm:29.3.1" @@ -21426,6 +21425,25 @@ __metadata: languageName: node linkType: hard +"jest-playwright-preset@npm:3.0.1": + version: 3.0.1 + resolution: "jest-playwright-preset@npm:3.0.1" + dependencies: + expect-playwright: ^0.8.0 + jest-process-manager: ^0.3.1 + nyc: ^15.1.0 + playwright-core: ">=1.2.0" + rimraf: ^3.0.2 + uuid: ^8.3.2 + peerDependencies: + jest: ^29.3.1 + jest-circus: ^29.3.1 + jest-environment-node: ^29.3.1 + jest-runner: ^29.3.1 + checksum: 2ee504fce5b72fef847c3bbfc74627c602fa07257828cc2572c19a172409d2d1ef6a2a02f08f107f5ac298e420f689371b0b0d939629ca9ee34ccb45557befd1 + languageName: node + linkType: hard + "jest-pnp-resolver@npm:^1.2.2": version: 1.2.2 resolution: "jest-pnp-resolver@npm:1.2.2" @@ -21438,6 +21456,24 @@ __metadata: languageName: node linkType: hard +"jest-process-manager@npm:^0.3.1": + version: 0.3.1 + resolution: "jest-process-manager@npm:0.3.1" + dependencies: + "@types/wait-on": ^5.2.0 + chalk: ^4.1.0 + cwd: ^0.10.0 + exit: ^0.1.2 + find-process: ^1.4.4 + prompts: ^2.4.1 + signal-exit: ^3.0.3 + spawnd: ^5.0.0 + tree-kill: ^1.2.2 + wait-on: ^5.3.0 + checksum: b71a0412c747d75341672a3ac42bb529232011039562b839cc73704debccf5aaf0e8a4db3a91ad05a819247f3191de905d2e7a1df7299eb895a28733a041f9d7 + languageName: node + linkType: hard + "jest-raw-loader@npm:1.0.1": version: 1.0.1 resolution: "jest-raw-loader@npm:1.0.1" @@ -21538,19 +21574,6 @@ __metadata: languageName: node linkType: hard -"jest-screenshot@npm:0.3.5": - version: 0.3.5 - resolution: "jest-screenshot@npm:0.3.5" - dependencies: - chalk: ^3.0.0 - lodash.kebabcase: ^4.1.1 - mkdirp: ^1.0.4 - native-image-diff: ^0.1.14 - node-libpng: ^0.2.20 - checksum: 7c24510c45f25bcfe0080be0e6464d0bd58b658f37875225819dddcca5128706ef59aa35393f17379041d66acb14d263bb3fe0901fceec3a911bd94e0cb5fef1 - languageName: node - linkType: hard - "jest-snapshot@npm:^29.3.1": version: 29.3.1 resolution: "jest-snapshot@npm:29.3.1" @@ -21729,6 +21752,19 @@ __metadata: languageName: node linkType: hard +"joi@npm:^17.3.0": + version: 17.7.0 + resolution: "joi@npm:17.7.0" + dependencies: + "@hapi/hoek": ^9.0.0 + "@hapi/topo": ^5.0.0 + "@sideway/address": ^4.1.3 + "@sideway/formula": ^3.0.0 + "@sideway/pinpoint": ^2.0.0 + checksum: 767a847936cb66787256c4351ff86e1b9e8d7383cbe81a5c827064032c2a8e8b6e938baef5ad32c4035fe4c56e537bd90aa2a952be8a0658601c920cdeb4fb3c + languageName: node + linkType: hard + "joi@npm:^17.4.0, joi@npm:^17.4.2": version: 17.4.2 resolution: "joi@npm:17.4.2" @@ -21779,13 +21815,6 @@ __metadata: languageName: node linkType: hard -"jsbn@npm:~0.1.0": - version: 0.1.1 - resolution: "jsbn@npm:0.1.1" - checksum: e5ff29c1b8d965017ef3f9c219dacd6e40ad355c664e277d31246c90545a02e6047018c16c60a00f36d561b3647215c41894f5d869ada6908a2e0ce4200c88f2 - languageName: node - linkType: hard - "jsdom@npm:^20.0.0": version: 20.0.1 resolution: "jsdom@npm:20.0.1" @@ -21901,13 +21930,6 @@ __metadata: languageName: node linkType: hard -"json-schema@npm:0.2.3": - version: 0.2.3 - resolution: "json-schema@npm:0.2.3" - checksum: bbc2070988fb5f2a2266a31b956f1b5660e03ea7eaa95b33402901274f625feb586ae0c485e1df854fde40a7f0dc679f3b3ca8e5b8d31f8ea07a0d834de785c7 - languageName: node - linkType: hard - "json-stable-stringify-without-jsonify@npm:^1.0.1": version: 1.0.1 resolution: "json-stable-stringify-without-jsonify@npm:1.0.1" @@ -21922,7 +21944,7 @@ __metadata: languageName: node linkType: hard -"json-stringify-safe@npm:^5.0.1, json-stringify-safe@npm:~5.0.1": +"json-stringify-safe@npm:^5.0.1": version: 5.0.1 resolution: "json-stringify-safe@npm:5.0.1" checksum: 48ec0adad5280b8a96bb93f4563aa1667fd7a36334f79149abd42446d0989f2ddc58274b479f4819f1f00617957e6344c886c55d05a4e15ebb4ab931e4a6a8ee @@ -22013,18 +22035,6 @@ __metadata: languageName: node linkType: hard -"jsprim@npm:^1.2.2": - version: 1.4.1 - resolution: "jsprim@npm:1.4.1" - dependencies: - assert-plus: 1.0.0 - extsprintf: 1.3.0 - json-schema: 0.2.3 - verror: 1.10.0 - checksum: 6bcb20ec265ae18bb48e540a6da2c65f9c844f7522712d6dfcb01039527a49414816f4869000493363f1e1ea96cbad00e46188d5ecc78257a19f152467587373 - languageName: node - linkType: hard - "jsx-ast-utils@npm:^2.4.1 || ^3.0.0, jsx-ast-utils@npm:^3.2.1": version: 3.2.1 resolution: "jsx-ast-utils@npm:3.2.1" @@ -24281,7 +24291,7 @@ __metadata: languageName: node linkType: hard -"mime-types@npm:^2.1.12, mime-types@npm:^2.1.27, mime-types@npm:^2.1.30, mime-types@npm:~2.1.19, mime-types@npm:~2.1.24": +"mime-types@npm:^2.1.12, mime-types@npm:^2.1.27, mime-types@npm:^2.1.30, mime-types@npm:~2.1.24": version: 2.1.33 resolution: "mime-types@npm:2.1.33" dependencies: @@ -24894,16 +24904,6 @@ __metadata: languageName: node linkType: hard -"native-image-diff@npm:^0.1.14": - version: 0.1.14 - resolution: "native-image-diff@npm:0.1.14" - dependencies: - node-gyp: latest - request: ^2.88.2 - checksum: d927ff08f089ffa8f74d44fa2d528388d087f4787e28d026900b09843b50ecd5cd8db766b4176d162c777539c9993e69e917aa0cd93e6fc458a968b527978070 - languageName: node - linkType: hard - "natural-compare@npm:^1.4.0": version: 1.4.0 resolution: "natural-compare@npm:1.4.0" @@ -25240,16 +25240,6 @@ __metadata: languageName: node linkType: hard -"node-libpng@npm:^0.2.20": - version: 0.2.20 - resolution: "node-libpng@npm:0.2.20" - dependencies: - node-gyp: latest - request: ^2.88.2 - checksum: 21857adc28953f338d08d6ea3b2dd2b112b286147cd122fb7ce6eec043d2406f84f16a56f5335625bcc4fba33005b3777ac15b1828b30b67217bca6f505d3fee - languageName: node - linkType: hard - "node-libs-browser@npm:^2.2.1": version: 2.2.1 resolution: "node-libs-browser@npm:2.2.1" @@ -25821,13 +25811,6 @@ __metadata: languageName: node linkType: hard -"oauth-sign@npm:~0.9.0": - version: 0.9.0 - resolution: "oauth-sign@npm:0.9.0" - checksum: 8f5497a127967866a3c67094c21efd295e46013a94e6e828573c62220e9af568cc1d2d04b16865ba583e430510fa168baf821ea78f355146d8ed7e350fc44c64 - languageName: node - linkType: hard - "object-assign@npm:^3.0.0": version: 3.0.0 resolution: "object-assign@npm:3.0.0" @@ -26203,7 +26186,7 @@ __metadata: languageName: node linkType: hard -"os-homedir@npm:^1.0.0": +"os-homedir@npm:^1.0.0, os-homedir@npm:^1.0.1": version: 1.0.2 resolution: "os-homedir@npm:1.0.2" checksum: af609f5a7ab72de2f6ca9be6d6b91a599777afc122ac5cad47e126c1f67c176fe9b52516b9eeca1ff6ca0ab8587fe66208bc85e40a3940125f03cdb91408e9d2 @@ -27120,6 +27103,17 @@ __metadata: languageName: node linkType: hard +"pixelmatch@npm:^5.1.0": + version: 5.3.0 + resolution: "pixelmatch@npm:5.3.0" + dependencies: + pngjs: ^6.0.0 + bin: + pixelmatch: bin/pixelmatch + checksum: f542713d89536551181ad9ddb666a1792ba00a8632d831093232a075cb3ccac05856e7a453ed7d0a41aaef64dcb5962e8ae5cbe646dd2761790d8ee51b0a0743 + languageName: node + linkType: hard + "pkg-conf@npm:^2.1.0": version: 2.1.0 resolution: "pkg-conf@npm:2.1.0" @@ -27173,6 +27167,35 @@ __metadata: languageName: node linkType: hard +"playwright-core@npm:1.30.0": + version: 1.30.0 + resolution: "playwright-core@npm:1.30.0" + bin: + playwright: cli.js + checksum: 4c5693f27245a1168f94708ecd8e1eb0d200de435b25cc07cfa25b97a094633818954dc00baf24e0ff551825f672050b83d1309362c1f97213fe8ebd2a147ed9 + languageName: node + linkType: hard + +"playwright-core@npm:>=1.2.0": + version: 1.29.2 + resolution: "playwright-core@npm:1.29.2" + bin: + playwright: cli.js + checksum: 19e00e162a24eb99878408518930346c1d2c8ce83bb02993e3dd890c99df4530240cfebe4ec4e5aca01656462695b6328fb8f913cf2e229c2c73941623ac524e + languageName: node + linkType: hard + +"playwright-firefox@npm:1.30.0": + version: 1.30.0 + resolution: "playwright-firefox@npm:1.30.0" + dependencies: + playwright-core: 1.30.0 + bin: + playwright: cli.js + checksum: 0e51465a51f6ce80c876aa7aa64c43d6a8785868a86a709438dbeb66599bfef9f6c377024c9dd6aed455dd2842f137147a0462b363896751b7625d18c09ee606 + languageName: node + linkType: hard + "please-upgrade-node@npm:^3.2.0": version: 3.2.0 resolution: "please-upgrade-node@npm:3.2.0" @@ -27202,6 +27225,20 @@ __metadata: languageName: node linkType: hard +"pngjs@npm:^3.4.0": + version: 3.4.0 + resolution: "pngjs@npm:3.4.0" + checksum: 8bd40bd698abd16b72c97b85cb858c80894fbedc76277ce72a784aa441e14795d45d9856e97333ca469b34b67528860ffc8a7317ca6beea349b645366df00bcd + languageName: node + linkType: hard + +"pngjs@npm:^6.0.0": + version: 6.0.0 + resolution: "pngjs@npm:6.0.0" + checksum: ab6c285086060087097eab9fe6b5a528a24f9e79c03dea2b4fd6264ed4fdb5beff4a3257eeeaf2a9dc18249b539609c2a4e4013c567164a1f6b5ba2c974d5ecb + languageName: node + linkType: hard + "pnp-webpack-plugin@npm:1.6.4": version: 1.6.4 resolution: "pnp-webpack-plugin@npm:1.6.4" @@ -28472,7 +28509,7 @@ __metadata: languageName: node linkType: hard -"progress@npm:^2.0.0, progress@npm:^2.0.1, progress@npm:^2.0.3": +"progress@npm:^2.0.0, progress@npm:^2.0.3": version: 2.0.3 resolution: "progress@npm:2.0.3" checksum: f67403fe7b34912148d9252cb7481266a354bd99ce82c835f79070643bb3c6583d10dbcfda4d41e04bbc1d8437e9af0fb1e1f2135727878f5308682a579429b7 @@ -28544,7 +28581,7 @@ __metadata: languageName: node linkType: hard -"prompts@npm:^2.0.1, prompts@npm:^2.4.0, prompts@npm:^2.4.2": +"prompts@npm:^2.0.1, prompts@npm:^2.4.0, prompts@npm:^2.4.1, prompts@npm:^2.4.2": version: 2.4.2 resolution: "prompts@npm:2.4.2" dependencies: @@ -28629,13 +28666,6 @@ __metadata: languageName: node linkType: hard -"proxy-from-env@npm:^1.1.0": - version: 1.1.0 - resolution: "proxy-from-env@npm:1.1.0" - checksum: ed7fcc2ba0a33404958e34d95d18638249a68c430e30fcb6c478497d72739ba64ce9810a24f53a7d921d0c065e5b78e3822759800698167256b04659366ca4d4 - languageName: node - linkType: hard - "prr@npm:~1.0.1": version: 1.0.1 resolution: "prr@npm:1.0.1" @@ -28661,7 +28691,7 @@ __metadata: languageName: node linkType: hard -"psl@npm:^1.1.28, psl@npm:^1.1.33": +"psl@npm:^1.1.33": version: 1.8.0 resolution: "psl@npm:1.8.0" checksum: 6150048ed2da3f919478bee8a82f3828303bc0fc730fb015a48f83c9977682c7b28c60ab01425a72d82a2891a1681627aa530a991d50c086b48a3be27744bde7 @@ -28750,26 +28780,6 @@ __metadata: languageName: node linkType: hard -"puppeteer@npm:8.0.0": - version: 8.0.0 - resolution: "puppeteer@npm:8.0.0" - dependencies: - debug: ^4.1.0 - devtools-protocol: 0.0.854822 - extract-zip: ^2.0.0 - https-proxy-agent: ^5.0.0 - node-fetch: ^2.6.1 - pkg-dir: ^4.2.0 - progress: ^2.0.1 - proxy-from-env: ^1.1.0 - rimraf: ^3.0.2 - tar-fs: ^2.0.0 - unbzip2-stream: ^1.3.3 - ws: ^7.2.3 - checksum: ee5fb8269dab61abc4f7cccd5d1eb283534f279be27c12825678170aa2effcb93263b11f8432ad08c034d29424ca0b71af3d6cf60ebce3b38b110ab722f11ecb - languageName: node - linkType: hard - "q@npm:2.0.3": version: 2.0.3 resolution: "q@npm:2.0.3" @@ -28813,13 +28823,6 @@ __metadata: languageName: node linkType: hard -"qs@npm:~6.5.2": - version: 6.5.2 - resolution: "qs@npm:6.5.2" - checksum: 24af7b9928ba2141233fba2912876ff100403dba1b08b20c3b490da9ea6c636760445ea2211a079e7dfa882a5cf8f738337b3748c8bdd0f93358fa8881d2db8f - languageName: node - linkType: hard - "query-string@npm:^6.14.1": version: 6.14.1 resolution: "query-string@npm:6.14.1" @@ -30057,34 +30060,6 @@ __metadata: languageName: unknown linkType: soft -"request@npm:^2.88.2": - version: 2.88.2 - resolution: "request@npm:2.88.2" - dependencies: - aws-sign2: ~0.7.0 - aws4: ^1.8.0 - caseless: ~0.12.0 - combined-stream: ~1.0.6 - extend: ~3.0.2 - forever-agent: ~0.6.1 - form-data: ~2.3.2 - har-validator: ~5.1.3 - http-signature: ~1.2.0 - is-typedarray: ~1.0.0 - isstream: ~0.1.2 - json-stringify-safe: ~5.0.1 - mime-types: ~2.1.19 - oauth-sign: ~0.9.0 - performance-now: ^2.1.0 - qs: ~6.5.2 - safe-buffer: ^5.1.2 - tough-cookie: ~2.5.0 - tunnel-agent: ^0.6.0 - uuid: ^3.3.2 - checksum: 4e112c087f6eabe7327869da2417e9d28fcd0910419edd2eb17b6acfc4bfa1dad61954525949c228705805882d8a98a86a0ea12d7f739c01ee92af7062996983 - languageName: node - linkType: hard - "require-directory@npm:^2.1.1": version: 2.1.1 resolution: "require-directory@npm:2.1.1" @@ -30150,6 +30125,16 @@ __metadata: languageName: node linkType: hard +"resolve-dir@npm:^0.1.0": + version: 0.1.1 + resolution: "resolve-dir@npm:0.1.1" + dependencies: + expand-tilde: ^1.2.2 + global-modules: ^0.2.3 + checksum: cc3e1885938f8fe9656a6faa651e21730d369260e907b8dd7c847a4aa18db348ac08ee0dbf2d6f87e2ba08715fb109432ec773bbb31698381bd2a48c0ea66072 + languageName: node + linkType: hard + "resolve-dir@npm:^1.0.0, resolve-dir@npm:^1.0.1": version: 1.0.1 resolution: "resolve-dir@npm:1.0.1" @@ -30374,25 +30359,25 @@ __metadata: languageName: node linkType: hard -"rimraf@npm:*, rimraf@npm:^3.0.0, rimraf@npm:^3.0.2": - version: 3.0.2 - resolution: "rimraf@npm:3.0.2" +"rimraf@npm:^2.2.8, rimraf@npm:^2.5.4, rimraf@npm:^2.6.2, rimraf@npm:^2.6.3": + version: 2.7.1 + resolution: "rimraf@npm:2.7.1" dependencies: glob: ^7.1.3 bin: - rimraf: bin.js - checksum: 87f4164e396f0171b0a3386cc1877a817f572148ee13a7e113b238e48e8a9f2f31d009a92ec38a591ff1567d9662c6b67fd8818a2dbbaed74bc26a87a2a4a9a0 + rimraf: ./bin.js + checksum: cdc7f6eacb17927f2a075117a823e1c5951792c6498ebcce81ca8203454a811d4cf8900314154d3259bb8f0b42ab17f67396a8694a54cae3283326e57ad250cd languageName: node linkType: hard -"rimraf@npm:^2.2.8, rimraf@npm:^2.5.4, rimraf@npm:^2.6.2, rimraf@npm:^2.6.3": - version: 2.7.1 - resolution: "rimraf@npm:2.7.1" +"rimraf@npm:^3.0.0, rimraf@npm:^3.0.2": + version: 3.0.2 + resolution: "rimraf@npm:3.0.2" dependencies: glob: ^7.1.3 bin: - rimraf: ./bin.js - checksum: cdc7f6eacb17927f2a075117a823e1c5951792c6498ebcce81ca8203454a811d4cf8900314154d3259bb8f0b42ab17f67396a8694a54cae3283326e57ad250cd + rimraf: bin.js + checksum: 87f4164e396f0171b0a3386cc1877a817f572148ee13a7e113b238e48e8a9f2f31d009a92ec38a591ff1567d9662c6b67fd8818a2dbbaed74bc26a87a2a4a9a0 languageName: node linkType: hard @@ -30518,7 +30503,7 @@ __metadata: languageName: node linkType: hard -"rxjs@npm:^6.4.0, rxjs@npm:^6.6.0": +"rxjs@npm:^6.4.0, rxjs@npm:^6.6.0, rxjs@npm:^6.6.3": version: 6.6.7 resolution: "rxjs@npm:6.6.7" dependencies: @@ -30584,7 +30569,7 @@ __metadata: languageName: node linkType: hard -"safer-buffer@npm:>= 2.1.2 < 3, safer-buffer@npm:>= 2.1.2 < 3.0.0, safer-buffer@npm:^2.0.2, safer-buffer@npm:^2.1.0, safer-buffer@npm:~2.1.0": +"safer-buffer@npm:>= 2.1.2 < 3, safer-buffer@npm:>= 2.1.2 < 3.0.0, safer-buffer@npm:^2.1.0": version: 2.1.2 resolution: "safer-buffer@npm:2.1.2" checksum: cab8f25ae6f1434abee8d80023d7e72b598cf1327164ddab31003c51215526801e40b66c5e65d658a0af1e9d6478cadcb4c745f4bd6751f97d8644786c0978b0 @@ -31588,6 +31573,18 @@ __metadata: languageName: node linkType: hard +"spawnd@npm:^5.0.0": + version: 5.0.0 + resolution: "spawnd@npm:5.0.0" + dependencies: + exit: ^0.1.2 + signal-exit: ^3.0.3 + tree-kill: ^1.2.2 + wait-port: ^0.2.9 + checksum: 6a14b8b3c5f398c645e8dce46fe8f02eb2db3c31a43e9e978e904d46bddcfc723cc0c171d7f745d6b899dbe745c1a29ec035b1db0283993116ac6795d2eb0dea + languageName: node + linkType: hard + "spdx-correct@npm:^3.0.0": version: 3.1.1 resolution: "spdx-correct@npm:3.1.1" @@ -31706,24 +31703,10 @@ __metadata: languageName: node linkType: hard -"sshpk@npm:^1.7.0": - version: 1.16.1 - resolution: "sshpk@npm:1.16.1" - dependencies: - asn1: ~0.2.3 - assert-plus: ^1.0.0 - bcrypt-pbkdf: ^1.0.0 - dashdash: ^1.12.0 - ecc-jsbn: ~0.1.1 - getpass: ^0.1.1 - jsbn: ~0.1.0 - safer-buffer: ^2.0.2 - tweetnacl: ~0.14.0 - bin: - sshpk-conv: bin/sshpk-conv - sshpk-sign: bin/sshpk-sign - sshpk-verify: bin/sshpk-verify - checksum: 5e76afd1cedc780256f688b7c09327a8a650902d18e284dfeac97489a735299b03c3e72c6e8d22af03dbbe4d6f123fdfd5f3c4ed6bedbec72b9529a55051b857 +"ssim.js@npm:^3.1.1": + version: 3.5.0 + resolution: "ssim.js@npm:3.5.0" + checksum: 3f3a63ac8bec9c45e9f72252b786dcb4c91d7a74316b49c20e7935fd6e3869541e9324233b00eb0ab6bd15701016becd62740a5fb8c98f7b5115a9237efb2d4a languageName: node linkType: hard @@ -33487,16 +33470,6 @@ __metadata: languageName: node linkType: hard -"tough-cookie@npm:~2.5.0": - version: 2.5.0 - resolution: "tough-cookie@npm:2.5.0" - dependencies: - psl: ^1.1.28 - punycode: ^2.1.1 - checksum: 16a8cd090224dd176eee23837cbe7573ca0fa297d7e468ab5e1c02d49a4e9a97bb05fef11320605eac516f91d54c57838a25864e8680e27b069a5231d8264977 - languageName: node - linkType: hard - "tr46@npm:^3.0.0": version: 3.0.0 resolution: "tr46@npm:3.0.0" @@ -33520,6 +33493,15 @@ __metadata: languageName: node linkType: hard +"tree-kill@npm:^1.2.2": + version: 1.2.2 + resolution: "tree-kill@npm:1.2.2" + bin: + tree-kill: cli.js + checksum: 49117f5f410d19c84b0464d29afb9642c863bc5ba40fcb9a245d474c6d5cc64d1b177a6e6713129eb346b40aebb9d4631d967517f9fbe8251c35b21b13cd96c7 + languageName: node + linkType: hard + "treeverse@npm:^2.0.0": version: 2.0.0 resolution: "treeverse@npm:2.0.0" @@ -33704,13 +33686,6 @@ __metadata: languageName: node linkType: hard -"tweetnacl@npm:^0.14.3, tweetnacl@npm:~0.14.0": - version: 0.14.5 - resolution: "tweetnacl@npm:0.14.5" - checksum: 6061daba1724f59473d99a7bb82e13f211cdf6e31315510ae9656fefd4779851cb927adad90f3b488c8ed77c106adc0421ea8055f6f976ff21b27c5c4e918487 - languageName: node - linkType: hard - "type-check@npm:^0.4.0, type-check@npm:~0.4.0": version: 0.4.0 resolution: "type-check@npm:0.4.0" @@ -33892,16 +33867,6 @@ __metadata: languageName: node linkType: hard -"unbzip2-stream@npm:^1.3.3": - version: 1.4.3 - resolution: "unbzip2-stream@npm:1.4.3" - dependencies: - buffer: ^5.2.1 - through: ^2.3.8 - checksum: 0e67c4a91f4fa0fc7b4045f8b914d3498c2fc2e8c39c359977708ec85ac6d6029840e97f508675fdbdf21fcb8d276ca502043406f3682b70f075e69aae626d1d - languageName: node - linkType: hard - "unc-path-regex@npm:^0.1.2": version: 0.1.2 resolution: "unc-path-regex@npm:0.1.2" @@ -34808,17 +34773,6 @@ __metadata: languageName: node linkType: hard -"verror@npm:1.10.0": - version: 1.10.0 - resolution: "verror@npm:1.10.0" - dependencies: - assert-plus: ^1.0.0 - core-util-is: 1.0.2 - extsprintf: ^1.2.0 - checksum: c431df0bedf2088b227a4e051e0ff4ca54df2c114096b0c01e1cbaadb021c30a04d7dd5b41ab277bcd51246ca135bf931d4c4c796ecae7a4fef6d744ecef36ea - languageName: node - linkType: hard - "vfile-location@npm:^2.0.0": version: 2.0.6 resolution: "vfile-location@npm:2.0.6" @@ -35012,6 +34966,34 @@ __metadata: languageName: node linkType: hard +"wait-on@npm:^5.3.0": + version: 5.3.0 + resolution: "wait-on@npm:5.3.0" + dependencies: + axios: ^0.21.1 + joi: ^17.3.0 + lodash: ^4.17.21 + minimist: ^1.2.5 + rxjs: ^6.6.3 + bin: + wait-on: bin/wait-on + checksum: b7099104b7900ff6349f1196edff759076ab557a2053c017a587819f7a59f146ec9e35c99579acd31dcda371bfa72241ef28b8ccda902f0bf3fbf2d780a00ebf + languageName: node + linkType: hard + +"wait-port@npm:^0.2.9": + version: 0.2.14 + resolution: "wait-port@npm:0.2.14" + dependencies: + chalk: ^2.4.2 + commander: ^3.0.2 + debug: ^4.1.1 + bin: + wait-port: bin/wait-port.js + checksum: 3a3d6c4b3d45fff2e284d314166cff17101ca6ffbfe9bb7c30c0602d89c2585ec82e37e7b07910a679dc1bde7e2cf8b1881fcd38ba9336a60b45bfe83adf8855 + languageName: node + linkType: hard + "walk-up-path@npm:^1.0.0": version: 1.0.0 resolution: "walk-up-path@npm:1.0.0" @@ -35483,7 +35465,7 @@ __metadata: languageName: node linkType: hard -"which@npm:^1.2.14, which@npm:^1.2.9, which@npm:^1.3.1": +"which@npm:^1.2.12, which@npm:^1.2.14, which@npm:^1.2.9, which@npm:^1.3.1": version: 1.3.1 resolution: "which@npm:1.3.1" dependencies: @@ -35786,21 +35768,6 @@ __metadata: languageName: node linkType: hard -"ws@npm:^7.2.3": - version: 7.5.5 - resolution: "ws@npm:7.5.5" - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: ^5.0.2 - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - checksum: bd2b437256012af526c69c03d6670a132e7ab0fe5853f3b7092826acea4203fad4ee2a8d0d9bd44834b2b968e747bf34f753ab535f4a3edf40d262da4b1d0805 - languageName: node - linkType: hard - "ws@npm:^8.2.3": version: 8.5.0 resolution: "ws@npm:8.5.0"