Skip to content

Commit

Permalink
fix: add delay to Map visual tests
Browse files Browse the repository at this point in the history
  • Loading branch information
qradle-yndx committed Dec 26, 2024
1 parent d0519cd commit 72bb781
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/blocks/Map/__tests__/Map.visual.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,30 @@ import {test} from '../../../../playwright/core/index';

import {Default, Direction, MapsTypes, Size} from './helpers';

const DEFAULT_MAP_DELAY = 10 * 1000;

test.describe('Map', () => {
test('render stories <Default>', async ({mount, expectScreenshot, page}) => {
test('render stories <Default>', async ({mount, expectScreenshot, delay, page}) => {
await mount(<Default />);

await delay(DEFAULT_MAP_DELAY);
await expectScreenshot({skipTheme: 'dark', mask: [page.locator('.pc-map')]});
});

test('render stories <Size>', async ({mount, expectScreenshot, page}) => {
test('render stories <Size>', async ({mount, expectScreenshot, delay, page}) => {
await mount(<Size />);

await delay(DEFAULT_MAP_DELAY);
await expectScreenshot({skipTheme: 'dark', mask: [page.locator('.pc-map')]});
});

test('render stories <Direction>', async ({mount, expectScreenshot, page}) => {
test('render stories <Direction>', async ({mount, expectScreenshot, delay, page}) => {
await mount(<Direction />);

await delay(DEFAULT_MAP_DELAY);
await expectScreenshot({skipTheme: 'dark', mask: [page.locator('.pc-map')]});
});

test('render stories <MapsTypes>', async ({mount, expectScreenshot, page}) => {
test('render stories <MapsTypes>', async ({mount, expectScreenshot, delay, page}) => {
await mount(<MapsTypes />);

await delay(DEFAULT_MAP_DELAY);
await expectScreenshot({skipTheme: 'dark', mask: [page.locator('.pc-map')]});
});
});

0 comments on commit 72bb781

Please sign in to comment.