Skip to content

Commit 0d1c727

Browse files
committed
fixup! Transform Layouts jest tests into playwright (#594)
1 parent 6944c3b commit 0d1c727

File tree

85 files changed

+290
-309
lines changed

Some content is hidden

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

85 files changed

+290
-309
lines changed

src/components/ButtonGroup/__tests__/ButtonGroup.spec.tsx

Lines changed: 1 addition & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ import {
1010
import {
1111
ButtonGroupForTest,
1212
SelectedButtonGroupForTest,
13-
ButtonGroupWithFeedbackIconForTest,
14-
ButtonGroupWithLabelForTest,
1513
} from './ButtonGroup.story';
1614

1715
test.describe('ButtonGroup', () => {
@@ -21,9 +19,9 @@ test.describe('ButtonGroup', () => {
2119
...propTests.defaultComponentPropTest,
2220
...propTests.blockPropTest,
2321
...propTests.disabledPropTest,
22+
...propTests.sizePropTest,
2423
...mixPropTests([
2524
propTests.priorityPropTest,
26-
propTests.sizePropTest,
2725
propTests.disabledPropTest,
2826
]),
2927
].forEach(({
@@ -82,67 +80,6 @@ test.describe('ButtonGroup', () => {
8280
});
8381
});
8482
});
85-
86-
test.describe('buttonWithFeedbackIcon', () => {
87-
[
88-
...mixPropTests([
89-
propTests.priorityPropTest,
90-
propTests.disabledPropTest,
91-
]),
92-
].forEach(({
93-
name,
94-
onBeforeTest,
95-
onBeforeSnapshot,
96-
props,
97-
}) => {
98-
test(name, async ({
99-
mount,
100-
page,
101-
}) => {
102-
if (onBeforeTest) {
103-
await onBeforeTest(page);
104-
}
105-
106-
const component = await mount(<ButtonGroupWithFeedbackIconForTest {...props} />);
107-
108-
if (onBeforeSnapshot) {
109-
await onBeforeSnapshot(page, component);
110-
}
111-
112-
const screenshot = await component.screenshot();
113-
expect(screenshot).toMatchSnapshot();
114-
});
115-
});
116-
});
117-
118-
test.describe('groupLabel', () => {
119-
[
120-
...propTests.defaultComponentPropTest,
121-
].forEach(({
122-
name,
123-
onBeforeTest,
124-
onBeforeSnapshot,
125-
props,
126-
}) => {
127-
test(name, async ({
128-
mount,
129-
page,
130-
}) => {
131-
if (onBeforeTest) {
132-
await onBeforeTest(page);
133-
}
134-
135-
const component = await mount(<ButtonGroupWithLabelForTest {...props} />);
136-
137-
if (onBeforeSnapshot) {
138-
await onBeforeSnapshot(page, component);
139-
}
140-
141-
const screenshot = await component.screenshot();
142-
expect(screenshot).toMatchSnapshot();
143-
});
144-
});
145-
});
14683
});
14784
});
14885
});

0 commit comments

Comments
 (0)