-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(Sheet): add visual test for Default showcase (#1703)
- Loading branch information
1 parent
862f4fb
commit 83e94b3
Showing
8 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
Binary file added
BIN
+48 KB
...et.visual.test.tsx-snapshots/Sheet-render-story-Default-dark-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+37.5 KB
...heet.visual.test.tsx-snapshots/Sheet-render-story-Default-dark-webkit-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+49.3 KB
...t.visual.test.tsx-snapshots/Sheet-render-story-Default-light-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+37.9 KB
...eet.visual.test.tsx-snapshots/Sheet-render-story-Default-light-webkit-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const DEFAULT_SHEET_QA = 'default-sheet-qa'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import React from 'react'; | ||
|
||
import {expect} from '@playwright/test'; | ||
|
||
import {test} from '~playwright/core'; | ||
|
||
import {DEFAULT_SHEET_QA} from '../__stories__/constants'; | ||
|
||
import {SheetStories} from './helpersPlaywright'; | ||
|
||
test.describe('Sheet', () => { | ||
test('render story: <Default>', async ({page, mount, expectScreenshot}) => { | ||
await mount(<SheetStories.Default />); | ||
|
||
await page.getByRole('button').click(); | ||
|
||
const sheetLocator = page.locator(`[data-qa=${DEFAULT_SHEET_QA}]`); | ||
|
||
await expect(sheetLocator).toBeVisible(); | ||
|
||
await expectScreenshot({ | ||
animations: 'disabled', | ||
component: sheetLocator, | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import {composeStories} from '@storybook/react'; | ||
|
||
import * as stories from '../__stories__/DefaultShowcase/DefaultShowcase.stories'; | ||
|
||
export const SheetStories = composeStories(stories); |