Update playwright-setup.md

This commit is contained in:
Sander Hautvast 2024-02-02 11:18:50 +01:00 committed by GitHub
parent b3d1d46915
commit 838879352b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,6 +1,12 @@
pretty standard setup that you get from `npm i playwright` pretty standard setup that you get from `npm i playwright`
WIP. Let's see if I can get wds to run from within this setup ```json
{
"scripts": {
"playwright": "DEBUG=pw:webserver npx playwright test flow/open-account-regular ",
}
}
```
```typescript ```typescript
import { defineConfig, devices } from '@playwright/test'; import { defineConfig, devices } from '@playwright/test';
@ -26,7 +32,6 @@ export default defineConfig({
workers: process.env.CI ? 1 : undefined, workers: process.env.CI ? 1 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */ /* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: 'html', reporter: 'html',
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: { use: {
// baseURL: '', // baseURL: '',
@ -41,11 +46,10 @@ export default defineConfig({
}, },
], ],
// webServer: { webServer: {
// command: 'wds', command: 'wds -c web-demo-server.config.mjs',
// url: 'http://127.0.0.1:8000', url: 'http://127.0.0.1:8000/demo',
// reuseExistingServer: !process.env.CI, reuseExistingServer: false,
// }, },
}); });
``` ```