Skip to content

Commit 44ef448

Browse files
lukasbrizabedrich-schindler
authored andcommitted
Transform Action jest tests into playwright (#592)
1 parent 97c9b16 commit 44ef448

File tree

514 files changed

+2101
-678
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

514 files changed

+2101
-678
lines changed

src/components/Alert/__tests__/Alert.spec.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { AlertForTest } from './Alert.story';
99
test.describe('Alert', () => {
1010
test.describe('visual', () => {
1111
[
12+
...propTests.defaultComponentPropTest,
1213
...propTests.feedbackColorPropTest,
1314
...propTests.neutralColorPropTest,
1415
...propTests.iconPropTest,
@@ -19,6 +20,7 @@ test.describe('Alert', () => {
1920
].forEach(({
2021
name,
2122
onBeforeTest,
23+
onBeforeSnapshot,
2224
props,
2325
}) => {
2426
test(name, async ({
@@ -35,6 +37,10 @@ test.describe('Alert', () => {
3537
/>,
3638
);
3739

40+
if (onBeforeSnapshot) {
41+
await onBeforeSnapshot(page, component);
42+
}
43+
3844
const screenshot = await component.screenshot();
3945
expect(screenshot).toMatchSnapshot();
4046
});

0 commit comments

Comments
 (0)