| 1 |
import { defineConfig, devices } from '@playwright/test'; |
| 2 |
import { resolve } from "node:path"; |
| 3 |
|
| 4 |
const port = process.env.PORT ?? "8787"; |
| 5 |
const crossBuildDir = resolve("../../../", process.env.CROSS_BUILD_DIR ?? "cross-build"); |
| 6 |
|
| 7 |
export default defineConfig({ |
| 8 |
testDir: '.', |
| 9 |
forbidOnly: true, |
| 10 |
retries: 2, |
| 11 |
reporter: process.env.CI ? 'dot' : 'html', |
| 12 |
use: { |
| 13 |
baseURL: `http://localhost:${port}`, |
| 14 |
trace: 'on-first-retry', |
| 15 |
}, |
| 16 |
projects: [ |
| 17 |
{ |
| 18 |
name: 'chromium', |
| 19 |
use: { ...devices['Desktop Chrome'] }, |
| 20 |
}, |
| 21 |
], |
| 22 |
webServer: { |
| 23 |
command: `npx http-server ${crossBuildDir}/wasm32-emscripten/build/python/web_example_pyrepl_jspi/ -p ${port}`, |
| 24 |
url: `http://localhost:${port}`, |
| 25 |
}, |
| 26 |
}); |