Skip to content

Commit 0c50c5b

Browse files
committed
Build client before running e2e test
Move the test command into e2e/package.json from the playwright config. Clean up client/package.json.
1 parent d237ea8 commit 0c50c5b

3 files changed

Lines changed: 3 additions & 6 deletions

File tree

client/package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,9 @@
3636
"scripts": {
3737
"start": "vite serve",
3838
"build": "vite build",
39-
"old-start": "react-scripts --openssl-legacy-provider start",
40-
"old-build": "react-scripts --openssl-legacy-provider build && yarn sass --no-source-map && yarn postcss --no-map",
4139
"sass": "sass --load-path=../node_modules/uswds/dist/scss --style=compressed src/theme/styles.scss build/libraries/uswds/theme/styles_pre.css",
4240
"postcss": "postcss --verbose build/libraries/uswds/theme/styles_pre.css --use autoprefixer -o build/libraries/uswds/theme/styles.css",
43-
"test": "react-scripts test",
44-
"eject": "react-scripts eject"
41+
"test": "echo \"No client tests\" && exit 1"
4542
},
4643
"browserslist": {
4744
"production": [

e2e/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"@playwright/test": "^1.30.0"
88
},
99
"scripts": {
10-
"test": "DEBUG=pw:webserver playwright test",
10+
"test": "yarn workspace client build && yarn workspace server start:prod && DEBUG=pw:webserver playwright test",
1111
"install-chromium": "playwright install --with-deps chromium"
1212
}
1313
}

e2e/playwright.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ const config = {
9999

100100
/* Run your local dev server before starting the tests */
101101
webServer: {
102-
command: 'cd ../client && yarn build && cd ../server && yarn start:prod',
102+
// command: 'cd ../client && yarn build && cd ../server && yarn start:prod',
103103
port: 3000,
104104
reuseExistingServer: !process.env.CI,
105105
},

0 commit comments

Comments
 (0)