forked from QwikDev/qwik
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
33 lines (29 loc) · 791 Bytes
/
playwright.config.ts
File metadata and controls
33 lines (29 loc) · 791 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
28
29
30
31
32
33
import { expect } from '@playwright/test';
import type { Locator, PlaywrightTestConfig } from '@playwright/test';
expect.extend({
async hasAttribute(recieved: Locator, attribute: string) {
const pass = await recieved.evaluate((node, attribute) => {
return node.getAttribute(attribute);
}, attribute);
return {
message: () => `expected ${recieved} to have attribute \`${attribute}\` (${pass})`,
pass: pass !== null,
};
},
});
const config: PlaywrightTestConfig = {
use: {
viewport: {
width: 520,
height: 600,
},
},
testIgnore: /.*example.spec.tsx?$/,
retries: 3,
webServer: {
command: 'pnpm tsm ./starters/dev-server.ts 3301',
port: 3301,
reuseExistingServer: !process.env.CI,
},
};
export default config;