Skip to content

Commit

Permalink
chore: more robust playwright setup
Browse files Browse the repository at this point in the history
It should allow turborepo to cache more.
  • Loading branch information
Leksat committed Sep 25, 2024
1 parent 9f89eef commit 3ca588b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
17 changes: 8 additions & 9 deletions tests/e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,15 @@
"license": "ISC",
"type": "module",
"scripts": {
"prep": "playwright install chromium",
"test:static": "tsc --noEmit && eslint '**/*.{ts,tsx,js,jsx}' --ignore-path='./.gitignore'",
"test:integration:drupal": "playwright test --config playwright.config.drupal.ts",
"test:integration:decap": "playwright test --config playwright.config.decap.ts",
"test:headed:drupal": "playwright test --headed --config playwright.config.drupal.ts",
"test:headed:decap": "playwright test --headed --config playwright.config.decap.ts",
"dev:decap": "playwright test --ui --config playwright.config.decap.ts",
"dev:drupal": "playwright test --ui --config playwright.config.drupal.ts",
"webform-snapshots": "playwright test --config playwright.config.webforms.ts",
"webform-snapshots:headed": "playwright test --config playwright.config.webforms.ts --headed"
"test:integration:drupal": "playwright install chromium && playwright test --config playwright.config.drupal.ts",
"test:integration:decap": "playwright install chromium && playwright test --config playwright.config.decap.ts",
"test:headed:drupal": "playwright install chromium && playwright test --headed --config playwright.config.drupal.ts",
"test:headed:decap": "playwright install chromium && playwright test --headed --config playwright.config.decap.ts",
"dev:decap": "playwright install chromium && playwright test --ui --config playwright.config.decap.ts",
"dev:drupal": "playwright install chromium && playwright test --ui --config playwright.config.drupal.ts",
"webform-snapshots": "playwright install chromium && playwright test --config playwright.config.webforms.ts",
"webform-snapshots:headed": "playwright install chromium && playwright test --config playwright.config.webforms.ts --headed"
},
"devDependencies": {
"@amazeelabs/save-webpage": "^1.1.1",
Expand Down
9 changes: 3 additions & 6 deletions tests/e2e/turbo.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
{
"extends": ["//"],
"tasks": {
"prep": {
"cache": false
},
"webform-snapshots": {
"cache": false,
"dependsOn": ["@custom/cms#prep:database", "prep"]
"dependsOn": ["@custom/cms#prep:database"]
},
"test:integration:decap": {
"dependsOn": ["@custom/website#build", "prep"],
"dependsOn": ["@custom/website#build"],
"env": ["PLAYWRIGHT_WEBSITE_URL"],
"inputs": ["specs/decap/**", "playwright.config.decap.ts"]
},
"test:integration:drupal": {
"dependsOn": ["@custom/website#build", "prep"],
"dependsOn": ["@custom/website#build"],
"env": ["PLAYWRIGHT_WEBSITE_URL", "PLAYWRIGHT_CMS_URL"],
"inputs": ["specs/drupal/**", "playwright.config.drupal.ts"]
}
Expand Down

0 comments on commit 3ca588b

Please sign in to comment.