Skip to content

Commit 450abff

Browse files
[test optimization] Fix playwright e2e tests flakiness (#5438)
1 parent 3b0fe08 commit 450abff

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

integration-tests/playwright/playwright.spec.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,14 @@ versions.forEach((version) => {
4747
let sandbox, cwd, receiver, childProcess, webAppPort
4848

4949
before(async function () {
50-
// bump from 30 to 60 seconds because playwright dependencies are heavy
51-
this.timeout(60000)
50+
// bump from 60 to 90 seconds because we also need to install dependencies and download chromium
51+
this.timeout(90000)
5252
sandbox = await createSandbox([`@playwright/test@${version}`, 'typescript'], true)
5353
cwd = sandbox.folder
54-
// install necessary browser
5554
const { NODE_OPTIONS, ...restOfEnv } = process.env
55+
// Install system dependencies
56+
execSync('npx playwright install-deps', { cwd, env: restOfEnv })
57+
// Install chromium (configured in integration-tests/playwright.config.js)
5658
execSync('npx playwright install', { cwd, env: restOfEnv })
5759
webAppPort = await getPort()
5860
webAppServer.listen(webAppPort)

0 commit comments

Comments
 (0)