-
-
Notifications
You must be signed in to change notification settings - Fork 208
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
27 lines (25 loc) · 972 Bytes
/
playwright.config.ts
File metadata and controls
27 lines (25 loc) · 972 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { expect } from '@playwright/test';
import { matchers, createConfig } from '@stencil/playwright';
// Add custom Stencil matchers to Playwright assertions
expect.extend(matchers);
export default createConfig({
// Run playwright tests from the 'e2e' directory
testDir: 'e2e',
// Run both repo-style e2e files and standard Playwright spec files
testMatch: ['**/*.e2e.ts', '**/*.spec.ts'],
// Use localhost explicitly to avoid Chrome's Private Network Access CORS
// policy blocking requests to 0.0.0.0 (non-secure loopback context).
use: {
baseURL: 'http://localhost:3333',
},
// On CI: inline annotations in the Actions log + HTML report artifact.
// Locally: default list output.
reporter: process.env.CI
? [['github'], ['html', { open: 'never' }]]
: [['list']],
webServer: {
command: 'stencil build --dev --watch --serve --no-open',
url: 'http://localhost:3333/ping',
reuseExistingServer: !process.env.CI,
},
});