diff --git a/package.json b/package.json index bd58240697..bbcaf6fe2a 100644 --- a/package.json +++ b/package.json @@ -76,8 +76,8 @@ "playwright:install": "playwright install --with-deps", "playwright": "playwright test --config=playwright/playwright.config.ts", "playwright:update": "npm run playwright -- -u", - "playwright:docker": "docker run --rm --network host -v $(pwd):/work/ -w /work/ -it mcr.microsoft.com/playwright:v1.39.0-jammy /bin/bash -c 'npm ci && npx playwright install && npm run playwright'", - "playwright:docker:update": " docker run --rm --network host -v $(pwd):/work/ -w /work/ -it mcr.microsoft.com/playwright:v1.39.0-jammy /bin/bash -c 'npm ci && npx playwright install && npm run playwright:update'" + "playwright:docker": "docker run --rm --network host -v $(pwd):/work/ -w /work/ -it mcr.microsoft.com/playwright:v1.39.0-jammy /bin/bash -c 'npm ci && npx playwright install && npm run playwright'", + "playwright:docker:update": "docker run --rm --network host -v $(pwd):/work/ -w /work/ -it mcr.microsoft.com/playwright:v1.39.0-jammy /bin/bash -c 'npm ci && npx playwright install && npm run playwright:update'" }, "dependencies": { "@bem-react/classname": "^1.6.0", diff --git a/playwright/playwright.config.ts b/playwright/playwright.config.ts index d5ef44783e..b4c78d242b 100644 --- a/playwright/playwright.config.ts +++ b/playwright/playwright.config.ts @@ -64,7 +64,12 @@ const config: PlaywrightTestConfig = { }, { name: 'webkit', - use: {...devices['Desktop Safari']}, + use: { + ...devices['Desktop Safari'], + launchOptions: { + args: ['--font-render-hinting=none'], + }, + }, }, ], }; diff --git a/src/components/Avatar/__snapshots__/Avatar.visual.test.tsx-snapshots/Avatar-render-story-Icon-1-chromium-linux.png b/src/components/Avatar/__snapshots__/Avatar.visual.test.tsx-snapshots/Avatar-render-story-Icon-1-chromium-linux.png new file mode 100644 index 0000000000..d849f90c6b Binary files /dev/null and b/src/components/Avatar/__snapshots__/Avatar.visual.test.tsx-snapshots/Avatar-render-story-Icon-1-chromium-linux.png differ diff --git a/src/components/Avatar/__snapshots__/Avatar.visual.test.tsx-snapshots/Avatar-render-story-Icon-1-webkit-linux.png b/src/components/Avatar/__snapshots__/Avatar.visual.test.tsx-snapshots/Avatar-render-story-Icon-1-webkit-linux.png new file mode 100644 index 0000000000..0c343c9af8 Binary files /dev/null and b/src/components/Avatar/__snapshots__/Avatar.visual.test.tsx-snapshots/Avatar-render-story-Icon-1-webkit-linux.png differ diff --git a/src/components/Avatar/__snapshots__/Avatar.visual.test.tsx-snapshots/Avatar-render-story-Image-1-chromium-linux.png b/src/components/Avatar/__snapshots__/Avatar.visual.test.tsx-snapshots/Avatar-render-story-Image-1-chromium-linux.png new file mode 100644 index 0000000000..ba6a0d9e63 Binary files /dev/null and b/src/components/Avatar/__snapshots__/Avatar.visual.test.tsx-snapshots/Avatar-render-story-Image-1-chromium-linux.png differ diff --git a/src/components/Avatar/__snapshots__/Avatar.visual.test.tsx-snapshots/Avatar-render-story-Image-1-webkit-linux.png b/src/components/Avatar/__snapshots__/Avatar.visual.test.tsx-snapshots/Avatar-render-story-Image-1-webkit-linux.png new file mode 100644 index 0000000000..28b35af27e Binary files /dev/null and b/src/components/Avatar/__snapshots__/Avatar.visual.test.tsx-snapshots/Avatar-render-story-Image-1-webkit-linux.png differ diff --git a/src/components/Avatar/__snapshots__/Avatar.visual.test.tsx-snapshots/Avatar-render-story-ImageFallback-1-chromium-linux.png b/src/components/Avatar/__snapshots__/Avatar.visual.test.tsx-snapshots/Avatar-render-story-ImageFallback-1-chromium-linux.png new file mode 100644 index 0000000000..ba6a0d9e63 Binary files /dev/null and b/src/components/Avatar/__snapshots__/Avatar.visual.test.tsx-snapshots/Avatar-render-story-ImageFallback-1-chromium-linux.png differ diff --git a/src/components/Avatar/__snapshots__/Avatar.visual.test.tsx-snapshots/Avatar-render-story-ImageFallback-1-webkit-linux.png b/src/components/Avatar/__snapshots__/Avatar.visual.test.tsx-snapshots/Avatar-render-story-ImageFallback-1-webkit-linux.png new file mode 100644 index 0000000000..28b35af27e Binary files /dev/null and b/src/components/Avatar/__snapshots__/Avatar.visual.test.tsx-snapshots/Avatar-render-story-ImageFallback-1-webkit-linux.png differ diff --git a/src/components/Avatar/__snapshots__/Avatar.visual.test.tsx-snapshots/Avatar-render-story-Showcase-1-chromium-linux.png b/src/components/Avatar/__snapshots__/Avatar.visual.test.tsx-snapshots/Avatar-render-story-Showcase-1-chromium-linux.png new file mode 100644 index 0000000000..4c503be6e4 Binary files /dev/null and b/src/components/Avatar/__snapshots__/Avatar.visual.test.tsx-snapshots/Avatar-render-story-Showcase-1-chromium-linux.png differ diff --git a/src/components/Avatar/__snapshots__/Avatar.visual.test.tsx-snapshots/Avatar-render-story-Showcase-1-webkit-linux.png b/src/components/Avatar/__snapshots__/Avatar.visual.test.tsx-snapshots/Avatar-render-story-Showcase-1-webkit-linux.png new file mode 100644 index 0000000000..0870c4aaca Binary files /dev/null and b/src/components/Avatar/__snapshots__/Avatar.visual.test.tsx-snapshots/Avatar-render-story-Showcase-1-webkit-linux.png differ diff --git a/src/components/Avatar/__snapshots__/Avatar.visual.test.tsx-snapshots/Avatar-render-story-Text-1-chromium-linux.png b/src/components/Avatar/__snapshots__/Avatar.visual.test.tsx-snapshots/Avatar-render-story-Text-1-chromium-linux.png new file mode 100644 index 0000000000..e662f2dc70 Binary files /dev/null and b/src/components/Avatar/__snapshots__/Avatar.visual.test.tsx-snapshots/Avatar-render-story-Text-1-chromium-linux.png differ diff --git a/src/components/Avatar/__snapshots__/Avatar.visual.test.tsx-snapshots/Avatar-render-story-Text-1-webkit-linux.png b/src/components/Avatar/__snapshots__/Avatar.visual.test.tsx-snapshots/Avatar-render-story-Text-1-webkit-linux.png new file mode 100644 index 0000000000..c3efa8189a Binary files /dev/null and b/src/components/Avatar/__snapshots__/Avatar.visual.test.tsx-snapshots/Avatar-render-story-Text-1-webkit-linux.png differ diff --git a/src/components/Avatar/__snapshots__/Avatar.visual.test.tsx-snapshots/Avatar-render-story-TextInitials-1-chromium-linux.png b/src/components/Avatar/__snapshots__/Avatar.visual.test.tsx-snapshots/Avatar-render-story-TextInitials-1-chromium-linux.png new file mode 100644 index 0000000000..85aaad554b Binary files /dev/null and b/src/components/Avatar/__snapshots__/Avatar.visual.test.tsx-snapshots/Avatar-render-story-TextInitials-1-chromium-linux.png differ diff --git a/src/components/Avatar/__snapshots__/Avatar.visual.test.tsx-snapshots/Avatar-render-story-TextInitials-1-webkit-linux.png b/src/components/Avatar/__snapshots__/Avatar.visual.test.tsx-snapshots/Avatar-render-story-TextInitials-1-webkit-linux.png new file mode 100644 index 0000000000..e331b04340 Binary files /dev/null and b/src/components/Avatar/__snapshots__/Avatar.visual.test.tsx-snapshots/Avatar-render-story-TextInitials-1-webkit-linux.png differ diff --git a/src/components/Avatar/__snapshots__/Avatar.visual.test.tsx-snapshots/Avatar-render-story-WithBorder-1-chromium-linux.png b/src/components/Avatar/__snapshots__/Avatar.visual.test.tsx-snapshots/Avatar-render-story-WithBorder-1-chromium-linux.png new file mode 100644 index 0000000000..9bbfade920 Binary files /dev/null and b/src/components/Avatar/__snapshots__/Avatar.visual.test.tsx-snapshots/Avatar-render-story-WithBorder-1-chromium-linux.png differ diff --git a/src/components/Avatar/__snapshots__/Avatar.visual.test.tsx-snapshots/Avatar-render-story-WithBorder-1-webkit-linux.png b/src/components/Avatar/__snapshots__/Avatar.visual.test.tsx-snapshots/Avatar-render-story-WithBorder-1-webkit-linux.png new file mode 100644 index 0000000000..9fe65440b8 Binary files /dev/null and b/src/components/Avatar/__snapshots__/Avatar.visual.test.tsx-snapshots/Avatar-render-story-WithBorder-1-webkit-linux.png differ diff --git a/src/components/Avatar/__tests__/Avatar.visual.test.tsx b/src/components/Avatar/__tests__/Avatar.visual.test.tsx new file mode 100644 index 0000000000..5af6bce702 --- /dev/null +++ b/src/components/Avatar/__tests__/Avatar.visual.test.tsx @@ -0,0 +1,51 @@ +import React from 'react'; + +import {expect} from '@playwright/experimental-ct-react'; + +import {Icon, Image, ImageFallback, Showcase, Text, TextInitials, WithBorder} from './stories'; + +import {test} from '~playwright/core'; + +test.describe('Avatar', () => { + test('render story: ', async ({mount}) => { + const component = await mount(); + + await expect(component).toHaveScreenshot(); + }); + + test('render story: ', async ({mount}) => { + const component = await mount(); + + await expect(component).toHaveScreenshot(); + }); + + test('render story: ', async ({mount}) => { + const component = await mount(); + + await expect(component).toHaveScreenshot(); + }); + + test('render story: ', async ({mount}) => { + const component = await mount(); + + await expect(component).toHaveScreenshot(); + }); + + test('render story: ', async ({mount}) => { + const component = await mount(); + + await expect(component).toHaveScreenshot(); + }); + + test('render story: ', async ({mount}) => { + const component = await mount(); + + await expect(component).toHaveScreenshot(); + }); + + test('render story: ', async ({mount}) => { + const component = await mount(); + + await expect(component).toHaveScreenshot(); + }); +}); diff --git a/src/components/Avatar/__tests__/stories.ts b/src/components/Avatar/__tests__/stories.ts new file mode 100644 index 0000000000..7e5705170d --- /dev/null +++ b/src/components/Avatar/__tests__/stories.ts @@ -0,0 +1,13 @@ +import {composeStories} from '@storybook/react'; + +import * as Stories from '../__stories__/Avatar.stories'; + +export const { + Image, + ImageFallback, + Icon, + Text, + TextInitials, + WithBorder, + AvatarShowcase: Showcase, +} = composeStories(Stories); diff --git a/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-story-Default-1-webkit-linux.png b/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-story-Default-1-webkit-linux.png index 6abf0fde41..0e7121209b 100644 Binary files a/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-story-Default-1-webkit-linux.png and b/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-story-Default-1-webkit-linux.png differ diff --git a/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-story-Disabled-1-webkit-linux.png b/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-story-Disabled-1-webkit-linux.png index 73abc1a790..1eecb21b7c 100644 Binary files a/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-story-Disabled-1-webkit-linux.png and b/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-story-Disabled-1-webkit-linux.png differ diff --git a/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-story-Icon-1-webkit-linux.png b/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-story-Icon-1-webkit-linux.png index 223ce17728..f4add69fda 100644 Binary files a/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-story-Icon-1-webkit-linux.png and b/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-story-Icon-1-webkit-linux.png differ diff --git a/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-story-Link-1-webkit-linux.png b/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-story-Link-1-webkit-linux.png index 9a621a67be..3ec6919731 100644 Binary files a/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-story-Link-1-webkit-linux.png and b/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-story-Link-1-webkit-linux.png differ diff --git a/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-story-Loading-1-webkit-linux.png b/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-story-Loading-1-webkit-linux.png index 97c90d89f9..9e8053d499 100644 Binary files a/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-story-Loading-1-webkit-linux.png and b/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-story-Loading-1-webkit-linux.png differ diff --git a/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-story-Pin-1-webkit-linux.png b/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-story-Pin-1-webkit-linux.png index 60b5e11034..a7404df66d 100644 Binary files a/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-story-Pin-1-webkit-linux.png and b/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-story-Pin-1-webkit-linux.png differ diff --git a/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-story-Selected-1-webkit-linux.png b/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-story-Selected-1-webkit-linux.png index 49232fa8f8..9a88ed2990 100644 Binary files a/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-story-Selected-1-webkit-linux.png and b/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-story-Selected-1-webkit-linux.png differ diff --git a/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-story-Size-1-webkit-linux.png b/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-story-Size-1-webkit-linux.png index 81528258c1..b411481921 100644 Binary files a/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-story-Size-1-webkit-linux.png and b/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-story-Size-1-webkit-linux.png differ diff --git a/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-story-View-1-webkit-linux.png b/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-story-View-1-webkit-linux.png index 69770515aa..456511db67 100644 Binary files a/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-story-View-1-webkit-linux.png and b/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-story-View-1-webkit-linux.png differ diff --git a/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-story-Width-1-webkit-linux.png b/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-story-Width-1-webkit-linux.png index d6efdaa248..79da0bb420 100644 Binary files a/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-story-Width-1-webkit-linux.png and b/src/components/Button/__snapshots__/Button.visual.test.tsx-snapshots/Button-render-story-Width-1-webkit-linux.png differ diff --git a/src/components/Label/__snapshots__/Label.visual.test.tsx-snapshots/Label-render-story-Close-1-webkit-linux.png b/src/components/Label/__snapshots__/Label.visual.test.tsx-snapshots/Label-render-story-Close-1-webkit-linux.png index 39bc9fdbb9..8f97b63731 100644 Binary files a/src/components/Label/__snapshots__/Label.visual.test.tsx-snapshots/Label-render-story-Close-1-webkit-linux.png and b/src/components/Label/__snapshots__/Label.visual.test.tsx-snapshots/Label-render-story-Close-1-webkit-linux.png differ diff --git a/src/components/Label/__snapshots__/Label.visual.test.tsx-snapshots/Label-render-story-Copy-1-webkit-linux.png b/src/components/Label/__snapshots__/Label.visual.test.tsx-snapshots/Label-render-story-Copy-1-webkit-linux.png index 284517e5bd..a174b9c423 100644 Binary files a/src/components/Label/__snapshots__/Label.visual.test.tsx-snapshots/Label-render-story-Copy-1-webkit-linux.png and b/src/components/Label/__snapshots__/Label.visual.test.tsx-snapshots/Label-render-story-Copy-1-webkit-linux.png differ diff --git a/src/components/Label/__snapshots__/Label.visual.test.tsx-snapshots/Label-render-story-Default-1-webkit-linux.png b/src/components/Label/__snapshots__/Label.visual.test.tsx-snapshots/Label-render-story-Default-1-webkit-linux.png index f446bc3f56..b6a307dcb9 100644 Binary files a/src/components/Label/__snapshots__/Label.visual.test.tsx-snapshots/Label-render-story-Default-1-webkit-linux.png and b/src/components/Label/__snapshots__/Label.visual.test.tsx-snapshots/Label-render-story-Default-1-webkit-linux.png differ diff --git a/src/components/Label/__snapshots__/Label.visual.test.tsx-snapshots/Label-render-story-Icon-1-webkit-linux.png b/src/components/Label/__snapshots__/Label.visual.test.tsx-snapshots/Label-render-story-Icon-1-webkit-linux.png index 4b118648c0..d2337cbab7 100644 Binary files a/src/components/Label/__snapshots__/Label.visual.test.tsx-snapshots/Label-render-story-Icon-1-webkit-linux.png and b/src/components/Label/__snapshots__/Label.visual.test.tsx-snapshots/Label-render-story-Icon-1-webkit-linux.png differ diff --git a/src/components/Label/__snapshots__/Label.visual.test.tsx-snapshots/Label-render-story-Interactive-1-webkit-linux.png b/src/components/Label/__snapshots__/Label.visual.test.tsx-snapshots/Label-render-story-Interactive-1-webkit-linux.png index 57ef6ade21..407fd4f7e8 100644 Binary files a/src/components/Label/__snapshots__/Label.visual.test.tsx-snapshots/Label-render-story-Interactive-1-webkit-linux.png and b/src/components/Label/__snapshots__/Label.visual.test.tsx-snapshots/Label-render-story-Interactive-1-webkit-linux.png differ diff --git a/src/components/Label/__snapshots__/Label.visual.test.tsx-snapshots/Label-render-story-LinkWrapper-1-webkit-linux.png b/src/components/Label/__snapshots__/Label.visual.test.tsx-snapshots/Label-render-story-LinkWrapper-1-webkit-linux.png index f446bc3f56..b6a307dcb9 100644 Binary files a/src/components/Label/__snapshots__/Label.visual.test.tsx-snapshots/Label-render-story-LinkWrapper-1-webkit-linux.png and b/src/components/Label/__snapshots__/Label.visual.test.tsx-snapshots/Label-render-story-LinkWrapper-1-webkit-linux.png differ diff --git a/src/components/Label/__snapshots__/Label.visual.test.tsx-snapshots/Label-render-story-ShowcaseStory-1-webkit-linux.png b/src/components/Label/__snapshots__/Label.visual.test.tsx-snapshots/Label-render-story-ShowcaseStory-1-webkit-linux.png index 937a8ebf6e..29f3ae00d4 100644 Binary files a/src/components/Label/__snapshots__/Label.visual.test.tsx-snapshots/Label-render-story-ShowcaseStory-1-webkit-linux.png and b/src/components/Label/__snapshots__/Label.visual.test.tsx-snapshots/Label-render-story-ShowcaseStory-1-webkit-linux.png differ diff --git a/src/components/Label/__snapshots__/Label.visual.test.tsx-snapshots/Label-render-story-Size-1-webkit-linux.png b/src/components/Label/__snapshots__/Label.visual.test.tsx-snapshots/Label-render-story-Size-1-webkit-linux.png index 708ec80f68..b002f6fe90 100644 Binary files a/src/components/Label/__snapshots__/Label.visual.test.tsx-snapshots/Label-render-story-Size-1-webkit-linux.png and b/src/components/Label/__snapshots__/Label.visual.test.tsx-snapshots/Label-render-story-Size-1-webkit-linux.png differ diff --git a/src/components/Label/__snapshots__/Label.visual.test.tsx-snapshots/Label-render-story-Theme-1-webkit-linux.png b/src/components/Label/__snapshots__/Label.visual.test.tsx-snapshots/Label-render-story-Theme-1-webkit-linux.png index 82a2bd35d8..48e0ea46de 100644 Binary files a/src/components/Label/__snapshots__/Label.visual.test.tsx-snapshots/Label-render-story-Theme-1-webkit-linux.png and b/src/components/Label/__snapshots__/Label.visual.test.tsx-snapshots/Label-render-story-Theme-1-webkit-linux.png differ diff --git a/src/components/Label/__snapshots__/Label.visual.test.tsx-snapshots/Label-render-story-Value-1-webkit-linux.png b/src/components/Label/__snapshots__/Label.visual.test.tsx-snapshots/Label-render-story-Value-1-webkit-linux.png index 7f2058443a..2865fd4bca 100644 Binary files a/src/components/Label/__snapshots__/Label.visual.test.tsx-snapshots/Label-render-story-Value-1-webkit-linux.png and b/src/components/Label/__snapshots__/Label.visual.test.tsx-snapshots/Label-render-story-Value-1-webkit-linux.png differ