Skip to content

Commit 04e2842

Browse files
committed
wip
1 parent 8bc2a07 commit 04e2842

17 files changed

+66
-2
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@
7676
"playwright:install": "playwright install --with-deps",
7777
"playwright": "playwright test --config=playwright/playwright.config.ts",
7878
"playwright:update": "npm run playwright -- -u",
79-
"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'",
80-
"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'"
79+
"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'",
80+
"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'"
8181
},
8282
"dependencies": {
8383
"@bem-react/classname": "^1.6.0",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
import React from 'react';
2+
3+
import {expect} from '@playwright/experimental-ct-react';
4+
5+
import {Icon, Image, ImageFallback, Showcase, Text, TextInitials, WithBorder} from './stories';
6+
7+
import {test} from '~playwright/core';
8+
9+
test.describe('Avatar', () => {
10+
test('render story: <Image>', async ({mount}) => {
11+
const component = await mount(<Image />);
12+
13+
await expect(component).toHaveScreenshot();
14+
});
15+
16+
test('render story: <ImageFallback>', async ({mount}) => {
17+
const component = await mount(<ImageFallback />);
18+
19+
await expect(component).toHaveScreenshot();
20+
});
21+
22+
test('render story: <Icon>', async ({mount}) => {
23+
const component = await mount(<Icon />);
24+
25+
await expect(component).toHaveScreenshot();
26+
});
27+
28+
test('render story: <Text>', async ({mount}) => {
29+
const component = await mount(<Text />);
30+
31+
await expect(component).toHaveScreenshot();
32+
});
33+
34+
test('render story: <TextInitials>', async ({mount}) => {
35+
const component = await mount(<TextInitials />);
36+
37+
await expect(component).toHaveScreenshot();
38+
});
39+
40+
test('render story: <WithBorder>', async ({mount}) => {
41+
const component = await mount(<WithBorder />);
42+
43+
await expect(component).toHaveScreenshot();
44+
});
45+
46+
test('render story: <Showcase>', async ({mount}) => {
47+
const component = await mount(<Showcase />);
48+
49+
await expect(component).toHaveScreenshot();
50+
});
51+
});
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import {composeStories} from '@storybook/react';
2+
3+
import * as Stories from '../__stories__/Avatar.stories';
4+
5+
export const {
6+
Image,
7+
ImageFallback,
8+
Icon,
9+
Text,
10+
TextInitials,
11+
WithBorder,
12+
AvatarShowcase: Showcase,
13+
} = composeStories(Stories);

0 commit comments

Comments
 (0)