-
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.
docs(ClipboardButton): add visual tests
- Loading branch information
1 parent
7880ac2
commit 12e003c
Showing
18 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
Binary file added
BIN
+1.07 KB
...napshots/ClipboardButton-render-story-CustomTooltipText-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
+1.06 KB
...-snapshots/ClipboardButton-render-story-CustomTooltipText-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
+1.02 KB
...apshots/ClipboardButton-render-story-CustomTooltipText-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
+921 Bytes
...snapshots/ClipboardButton-render-story-CustomTooltipText-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
+1.07 KB
...test.tsx-snapshots/ClipboardButton-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
+1.06 KB
...l.test.tsx-snapshots/ClipboardButton-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
+1.02 KB
...est.tsx-snapshots/ClipboardButton-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
+921 Bytes
....test.tsx-snapshots/ClipboardButton-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
+13.7 KB
...al.test.tsx-snapshots/ClipboardButton-render-story-Size-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
+7.12 KB
...sual.test.tsx-snapshots/ClipboardButton-render-story-Size-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
+13.2 KB
...l.test.tsx-snapshots/ClipboardButton-render-story-Size-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
+7.05 KB
...ual.test.tsx-snapshots/ClipboardButton-render-story-Size-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
+95.7 KB
...al.test.tsx-snapshots/ClipboardButton-render-story-View-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
+57.7 KB
...sual.test.tsx-snapshots/ClipboardButton-render-story-View-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
+88.9 KB
...l.test.tsx-snapshots/ClipboardButton-render-story-View-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
+53.1 KB
...ual.test.tsx-snapshots/ClipboardButton-render-story-View-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.
33 changes: 33 additions & 0 deletions
33
src/components/ClipboardButton/__tests__/ClipboardButton.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 {test} from '~playwright/core'; | ||
|
||
import {ClipboardButtonStories} from './helpersPlaywright'; | ||
|
||
const mountOptions = {}; | ||
|
||
test.describe('ClipboardButton', () => { | ||
test('render story: <Default>', async ({mount, expectScreenshot}) => { | ||
await mount(<ClipboardButtonStories.Default />, mountOptions); | ||
|
||
await expectScreenshot(); | ||
}); | ||
|
||
test('render story: <CustomTooltipText>', async ({mount, expectScreenshot}) => { | ||
await mount(<ClipboardButtonStories.CustomTooltipText />, mountOptions); | ||
|
||
await expectScreenshot(); | ||
}); | ||
|
||
test('render story: <View>', async ({mount, expectScreenshot}) => { | ||
await mount(<ClipboardButtonStories.View />, mountOptions); | ||
|
||
await expectScreenshot(); | ||
}); | ||
|
||
test('render story: <Size>', async ({mount, expectScreenshot}) => { | ||
await mount(<ClipboardButtonStories.Size />, mountOptions); | ||
|
||
await expectScreenshot(); | ||
}); | ||
}); |
5 changes: 5 additions & 0 deletions
5
src/components/ClipboardButton/__tests__/helpersPlaywright.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,5 @@ | ||
import {composeStories} from '@storybook/react'; | ||
|
||
import * as DefaultClipboardButtonStories from '../__stories__/ClipboardButton.stories'; | ||
|
||
export const ClipboardButtonStories = composeStories(DefaultClipboardButtonStories); |