Skip to content

Commit 9d05fae

Browse files
committed
fixup! fixup! fixup! fixup! Transform Layouts jest tests into playwright (#594)
1 parent 74da6b5 commit 9d05fae

11 files changed

+29
-37
lines changed

src/components/FormLayout/__tests__/FormLayout.spec.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,18 @@ import {
1010
} from './FormLayout.story';
1111
import { labelWidthPropTest } from './_propTests/labelWidthPropTest';
1212
import { fieldLayoutPropTest } from './_propTests/fieldLayoutPropTest';
13-
import { autoWidthPropTest } from './_propTests/autoWidthPropTest';
1413

1514
test.describe('FormLayout', () => {
1615
test.describe('base', () => {
16+
/**
17+
* `autoWidth` is not tested because subgrid is already supported in all browsers
18+
* we aim to support within RUI. The issue this property was intended to solve has
19+
* either already been resolved or cannot be reproduced with the tools
20+
* currently available to us.
21+
*/
1722
test.describe('visual', () => {
1823
[
1924
...propTests.defaultComponentPropTest,
20-
...autoWidthPropTest,
2125
...labelWidthPropTest,
2226
...fieldLayoutPropTest,
2327
].forEach(({

src/components/FormLayout/__tests__/_propTests/autoWidthPropTest.ts

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/components/InputGroup/__tests__/InputGroup.spec.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
InputGroupWithoutChildrenForTest,
1111
} from './InputGroup.story';
1212
import { validationTextsPropTest } from './_propTests/validationTextsPropTest';
13+
import { validationStatePropTest } from './_propTests/validationStatePropTest';
1314

1415
test.describe('InputGroup', () => {
1516
test.describe('base', () => {
@@ -22,6 +23,7 @@ test.describe('InputGroup', () => {
2223
...propTests.requiredPropTest,
2324
...propTests.sizePropTest,
2425
...validationTextsPropTest,
26+
...validationStatePropTest,
2527
].forEach(({
2628
name,
2729
onBeforeTest,
Loading

src/components/InputGroup/__tests__/_propTests/types.ts

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { validationStatePropTest as generaValidationPropTest } from '../../../../../tests/playwright/propTests/validationStatePropTest';
2+
import type { PropTests } from '../../../../../tests/playwright/types';
3+
4+
export const validationStatePropTest: PropTests = generaValidationPropTest
5+
.map(({
6+
name,
7+
props,
8+
}) => ({
9+
name,
10+
props: {
11+
inputProps: {
12+
validationState: props.validationState as string,
13+
},
14+
validationTexts: ['Validation text.'],
15+
},
16+
}));

0 commit comments

Comments
 (0)