-
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.
test(Table): visual tests for
withTableSelection
hoc (#1406)
Co-authored-by: German Vorotnikov <[email protected]>
- Loading branch information
Showing
17 changed files
with
56 additions
and
9 deletions.
There are no files selected for viewing
Binary file added
BIN
+98.2 KB
...snapshots/Table-withTableSelection-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
+63.2 KB
...x-snapshots/Table-withTableSelection-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
+95.5 KB
...napshots/Table-withTableSelection-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
+60.9 KB
...-snapshots/Table-withTableSelection-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.
Binary file added
BIN
+101 KB
...able-withTableSelection-render-story-With-selection-all-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
+65.4 KB
.../Table-withTableSelection-render-story-With-selection-all-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
+101 KB
...ble-withTableSelection-render-story-With-selection-all-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
+64.5 KB
...Table-withTableSelection-render-story-With-selection-all-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.
Binary file added
BIN
+98.8 KB
...ts/Table-withTableSelection-render-story-With-selection-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
+63.6 KB
...hots/Table-withTableSelection-render-story-With-selection-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
+96.7 KB
...s/Table-withTableSelection-render-story-With-selection-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
+61.6 KB
...ots/Table-withTableSelection-render-story-With-selection-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
33 changes: 33 additions & 0 deletions
33
src/components/Table/__tests__/Table.withTableSelection.visual.test.tsx
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,33 @@ | ||
import React from 'react'; | ||
|
||
import {withTableSelection} from '../hoc'; | ||
|
||
import {HOCWithTableSelection} from './helpersPlaywright'; | ||
|
||
import {test} from '~playwright/core'; | ||
|
||
test.describe('Table.withTableSelection', () => { | ||
test('render story: <Default>', async ({mount, expectScreenshot}) => { | ||
await mount(<HOCWithTableSelection />); | ||
|
||
await expectScreenshot(); | ||
}); | ||
|
||
test('render story: <With selection>', async ({mount, expectScreenshot}) => { | ||
const root = await mount(<HOCWithTableSelection />); | ||
const fisrtRowCheckbox = root.getByTestId(withTableSelection.getCheckboxQa('0')); | ||
|
||
await fisrtRowCheckbox.click(); | ||
|
||
await expectScreenshot(); | ||
}); | ||
|
||
test('render story: <With selection all>', async ({mount, expectScreenshot}) => { | ||
const root = await mount(<HOCWithTableSelection />); | ||
const fisrtRowCheckbox = root.getByTestId(withTableSelection.headerCheckboxQa); | ||
|
||
await fisrtRowCheckbox.click(); | ||
|
||
await expectScreenshot(); | ||
}); | ||
}); |
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 TableStories from '../__stories__/Table.stories'; | ||
|
||
export const {HOCWithTableSelection} = composeStories(TableStories); |
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