Skip to content

Commit 650cbb6

Browse files
committed
fix(a11y-testing-spike): resolve file name conflict
1 parent b75ef86 commit 650cbb6

File tree

3 files changed

+75
-6
lines changed

3 files changed

+75
-6
lines changed

1st-gen/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@
6262
"storybook:quick": "run-p build:watch storybook:run",
6363
"storybook:run": "web-dev-server --config wds-storybook.config.js",
6464
"test": "yarn test:focus unit",
65-
"test:a11y": "playwright test",
66-
"test:a11y:ui": "playwright test --ui",
67-
"test:a11y:1st": "playwright test --project=1st-gen",
68-
"test:a11y:2nd": "playwright test --project=2nd-gen",
65+
"test:a11y": "playwright test --config=playwright.a11y.config.ts",
66+
"test:a11y:ui": "playwright test --config=playwright.a11y.config.ts --ui",
67+
"test:a11y:1st": "playwright test --config=playwright.a11y.config.ts --project=1st-gen",
68+
"test:a11y:2nd": "playwright test --config=playwright.a11y.config.ts --project=2nd-gen",
6969
"test:bench": "yarn build:tests && node test/benchmark/cli.js",
7070
"test:changed": "node ./scripts/test-changes.js",
7171
"test:ci": "yarn test:start",

1st-gen/playwright.a11y.config.ts

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
/**
2+
* Copyright 2025 Adobe. All rights reserved.
3+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
4+
* you may not use this file except in compliance with the License. You may obtain a copy
5+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
6+
*
7+
* Unless required by applicable law or agreed to in writing, software distributed under
8+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9+
* OF ANY KIND, either express or implied. See the License for the specific language
10+
* governing permissions and limitations under the License.
11+
*/
12+
13+
import type { PlaywrightTestConfig } from '@playwright/test';
14+
import { devices } from '@playwright/test';
15+
16+
const config: PlaywrightTestConfig = {
17+
timeout: 30 * 1000,
18+
fullyParallel: true,
19+
forbidOnly: !!process.env.CI,
20+
retries: process.env.CI ? 2 : 0,
21+
reporter: [
22+
['html', { outputFolder: 'test/playwright-a11y/report' }],
23+
['list'],
24+
],
25+
26+
use: {
27+
trace: 'on-first-retry',
28+
screenshot: 'only-on-failure',
29+
reducedMotion: 'reduce',
30+
},
31+
32+
projects: [
33+
{
34+
name: '1st-gen',
35+
testDir: './',
36+
testMatch: '**/packages/*/test/**/*.a11y.spec.ts',
37+
use: {
38+
...devices['Desktop Chrome'],
39+
baseURL: 'http://localhost:8080',
40+
},
41+
},
42+
{
43+
name: '2nd-gen',
44+
testDir: '../second-gen/',
45+
testMatch: '**/packages/swc/components/*/test/**/*.a11y.spec.ts',
46+
use: {
47+
...devices['Desktop Chrome'],
48+
baseURL: 'http://localhost:6006',
49+
},
50+
},
51+
],
52+
53+
webServer: [
54+
{
55+
command: 'yarn storybook',
56+
port: 8080,
57+
reuseExistingServer: !process.env.CI,
58+
timeout: 120 * 1000,
59+
},
60+
{
61+
command: 'cd ../second-gen/packages/swc && yarn storybook',
62+
port: 6006,
63+
reuseExistingServer: !process.env.CI,
64+
timeout: 120 * 1000,
65+
},
66+
],
67+
};
68+
69+
export default config;

ACCESSIBILITY_TESTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ Received: [
326326
327327
### Playwright config
328328
329-
`first-gen/playwright.config.ts` defines two projects:
329+
`first-gen/playwright.a11y.config.ts` defines two projects:
330330
331331
```typescript
332332
projects: [
@@ -370,7 +370,7 @@ webServer: [
370370
spectrum-web-components/
371371
├── ACCESSIBILITY_TESTING.md # This guide
372372
├── first-gen/
373-
│ ├── playwright.config.ts # Playwright config (both gens)
373+
│ ├── playwright.a11y.config.ts # Playwright config (both gens)
374374
│ ├── package.json # Test scripts
375375
│ ├── test/
376376
│ │ └── a11y-helpers.ts # Shared helpers (both gens)

0 commit comments

Comments
 (0)