Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
436 changes: 263 additions & 173 deletions src/blocks/Map/__stories__/Map.stories.tsx

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion src/blocks/Map/__tests__/Map.visual.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {test} from '../../../../playwright/core/index';

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

const DEFAULT_MAP_DELAY = 10 * 1000;

Expand All @@ -11,6 +11,12 @@ test.describe('Map', () => {
await expectScreenshot({skipTheme: 'dark', mask: [page.locator('.pc-map')]});
});

test('render stories <WithControls>', async ({mount, expectScreenshot, delay, page}) => {
await mount(<WithControls />);
await delay(DEFAULT_MAP_DELAY);
await expectScreenshot({skipTheme: 'dark', mask: [page.locator('.pc-map')]});
});

test('render stories <Size>', async ({mount, expectScreenshot, delay, page}) => {
await mount(<Size />);
await delay(DEFAULT_MAP_DELAY);
Expand Down
2 changes: 1 addition & 1 deletion src/blocks/Map/__tests__/helpers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ import {composeStories} from '@storybook/react';

import * as MapStories from '../__stories__/Map.stories';

export const {Default, Size, Direction, MapsTypes} = composeStories(MapStories);
export const {Default, WithControls, Size, Direction, MapsTypes} = composeStories(MapStories);