|
| 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 | +}); |
0 commit comments