From ed8aa418e6102e65b7332045f7e1faa9727cb7ae Mon Sep 17 00:00:00 2001 From: Philip Langer Date: Wed, 30 Mar 2022 09:15:11 +0200 Subject: [PATCH] [playwright] Start theia with THEIA_CONFIG_DIR (#10925) This change modifies the scripts so that theia as a system under test is started with a dedicated temporary THEIA_CONFIG_DIR for running the playwright tests. Fixes https://github.com/eclipse-theia/theia/issues/10800 Change-Id: I27b3ee6d908101f7c619a42d7c552a4bf07ca9ac --- examples/playwright/.gitignore | 1 + examples/playwright/package.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/playwright/.gitignore b/examples/playwright/.gitignore index 465efbb8aedc8..86ac98af48d1c 100644 --- a/examples/playwright/.gitignore +++ b/examples/playwright/.gitignore @@ -1,2 +1,3 @@ allure-results test-results +.tmp.cfg diff --git a/examples/playwright/package.json b/examples/playwright/package.json index e6c7502e24bb4..9ba1345617a9b 100644 --- a/examples/playwright/package.json +++ b/examples/playwright/package.json @@ -15,7 +15,7 @@ "prepare": "yarn clean && yarn build", "clean": "rimraf lib", "build": "tsc --incremental && yarn lint && npx playwright install chromium", - "theia:start": "yarn --cwd ../browser start", + "theia:start": "rimraf .tmp.cfg && THEIA_CONFIG_DIR=$PWD/.tmp.cfg yarn --cwd ../browser start", "lint": "eslint -c ./.eslintrc.js --ext .ts ./src ./tests", "lint:fix": "eslint -c ./.eslintrc.js --ext .ts ./src ./tests --fix", "ui-tests": "yarn && playwright test --config=./configs/playwright.config.ts", diff --git a/package.json b/package.json index 3c65d76595a46..52350494e2f90 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,7 @@ "rebuild:clean": "rimraf .browser_modules", "test": "yarn -s test:theia && yarn -s electron test && yarn -s browser test", "test:theia": "lerna run --scope \"@theia/!(example-)*\" test --stream --concurrency=1", - "test:playwright": "concurrently --success first -c gray,blue -k -n theia,playwright \"yarn browser start\" \"yarn -s --cwd examples/playwright ui-tests-ci\"", + "test:playwright": "concurrently --success first -c gray,blue -k -n theia,playwright \"yarn -s --cwd examples/playwright theia:start\" \"yarn -s --cwd examples/playwright ui-tests-ci\"", "watch": "concurrently --kill-others -n tsc,browser,electron -c red,yellow,blue \"tsc -b -w --preserveWatchOutput\" \"yarn -s --cwd examples/browser watch:bundle\" \"yarn -s --cwd examples/electron watch:bundle\"", "watch:compile": "concurrently --kill-others -n cleanup,tsc -c magenta,red \"ts-clean dev-packages/* packages/* -w\" \"tsc -b -w --preserveWatchOutput\"", "performance:startup": "yarn -s performance:startup:browser && yarn -s performance:startup:electron",