Skip to content

Commit

Permalink
chore: rename tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ogonkov committed Jul 12, 2024
1 parent cf305b8 commit c0e0c55
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions src/components/AvatarStack/__tests__/AvatarStack.visual.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,21 @@ import {test} from '~playwright/core';
import {AvatarStackStories} from './stories';

test.describe('AvatarStack', () => {
test('single avatar', async ({mount, expectScreenshot}) => {
test('render story <SingleItem>', async ({mount, expectScreenshot}) => {
await mount(<AvatarStackStories.SingleItem randomAvatar={false} />);

await expectScreenshot();
});

test('default more component', async ({mount, expectScreenshot}) => {
test('render story <MoreButton>', async ({mount, expectScreenshot}) => {
await mount(<AvatarStackStories.MoreButton randomAvatar={false} />);

await expectScreenshot();
});

test('edge case with more button omit', async ({mount, expectScreenshot}) => {
test('render story <MoreButtonOmit>', async ({mount, expectScreenshot}) => {
await mount(<AvatarStackStories.MoreButtonOmit randomAvatar={false} />);

await expectScreenshot();
});

test('custom more button', async ({page, mount, expectScreenshot}) => {
const component = await mount(<AvatarStackStories.CustomMoreButton randomAvatar={false} />);

await component.getByRole('button', {name: 'Rest of the users'}).hover();
await page.getByText('Somehow display list of all other items').waitFor();

await expectScreenshot();
});
});

0 comments on commit c0e0c55

Please sign in to comment.