Skip to content

Commit

Permalink
chore(console): stop running playwright tests during build (#3722)
Browse files Browse the repository at this point in the history
Renames the `@wingconsole/app#test` script to `@wingconsole/app#test:playwright`, so it doesn't run with the root scripts `build` or `test`. The problem is that in order to run Playwright tests, users need to run `playwright install` or `playwright install --with-deps` first, and may require sudo permissions.

Additionally, moves the playwright tests from `tests/` to `test/`, which is the standard directory for both playwright and our turbo configuration.

Supersedes #3721.
  • Loading branch information
skyrpex authored Aug 7, 2023
1 parent fea885a commit ae438f1
Show file tree
Hide file tree
Showing 24 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/wing-console/console/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"dev": "tsx watch scripts/dev.mjs",
"compile": "tsup",
"eslint": "eslint --ext .js,.cjs,.ts,.cts,.mts,.tsx --no-error-on-unmatched-pattern . --fix",
"test": "playwright test --update-snapshots",
"test:playwright": "playwright test --update-snapshots",
"package": "bump-pack -b"
},
"dependencies": {
Expand Down
1 change: 0 additions & 1 deletion apps/wing-console/console/app/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { defineConfig, devices } from "@playwright/test";
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
testDir: "./tests",
/* Run tests in files in parallel */
fullyParallel: true,
/* Fail the build on CI if you accidentally left test.only in the source code. */
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"test": "turbo lint eslint test",
"package": "turbo package",
"package:ci": "turbo package --color",
"test:ci": "turbo default --color --concurrency 1 && turbo compile post-compile lint eslint test --color --filter=!hangar",
"test:ci": "turbo default --color --concurrency 1 && turbo compile post-compile lint eslint test test:playwright --color --filter=!hangar",
"docs": "./scripts/docsite.sh",
"changelog": "bump-pack",
"install": "bash scripts/setup_wasi.sh",
Expand Down
13 changes: 13 additions & 0 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,19 @@
"test/**"
]
},
"test:playwright": {
"dependsOn": ["compile"],
"inputs": [
"*.ts",
"*.js",
"*.cjs",
"*.json",
"*.toml",
"*.lock",
"src/**",
"test/**"
]
},
"post-compile": {
"dependsOn": ["compile"]
},
Expand Down

0 comments on commit ae438f1

Please sign in to comment.