Skip to content

Commit

Permalink
[playwright] Start theia with THEIA_CONFIG_DIR (#10925)
Browse files Browse the repository at this point in the history
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 #10800

Change-Id: I27b3ee6d908101f7c619a42d7c552a4bf07ca9ac
  • Loading branch information
planger authored Mar 30, 2022
1 parent 31793be commit ed8aa41
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions examples/playwright/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
allure-results
test-results
.tmp.cfg
2 changes: 1 addition & 1 deletion examples/playwright/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit ed8aa41

Please sign in to comment.