Skip to content

Commit

Permalink
Build client before running e2e test
Browse files Browse the repository at this point in the history
Move the test command into e2e/package.json from the playwright config.
Clean up client/package.json.
Seriously, go away prettier.
  • Loading branch information
fwextensions committed Mar 23, 2023
1 parent d237ea8 commit d39320e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
4 changes: 3 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Ignore artifacts:
client/build
client/dist
user-guides/guides
user-guides/build

# tell prettier to keep its hands off the bloody config file
# tell prettier to keep its hands off the bloody config files
client/vite.config.js
e2e/playwright.config.js
5 changes: 1 addition & 4 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,9 @@
"scripts": {
"start": "vite serve",
"build": "vite build",
"old-start": "react-scripts --openssl-legacy-provider start",
"old-build": "react-scripts --openssl-legacy-provider build && yarn sass --no-source-map && yarn postcss --no-map",
"sass": "sass --load-path=../node_modules/uswds/dist/scss --style=compressed src/theme/styles.scss build/libraries/uswds/theme/styles_pre.css",
"postcss": "postcss --verbose build/libraries/uswds/theme/styles_pre.css --use autoprefixer -o build/libraries/uswds/theme/styles.css",
"test": "react-scripts test",
"eject": "react-scripts eject"
"test": "echo \"No client tests\" && exit 1"
},
"browserslist": {
"production": [
Expand Down
2 changes: 1 addition & 1 deletion e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"@playwright/test": "^1.30.0"
},
"scripts": {
"test": "DEBUG=pw:webserver playwright test",
"test": "yarn workspace client build && yarn workspace server start:prod && DEBUG=pw:webserver playwright test",
"install-chromium": "playwright install --with-deps chromium"
}
}
2 changes: 1 addition & 1 deletion e2e/playwright.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const config = {

/* Run your local dev server before starting the tests */
webServer: {
command: 'cd ../client && yarn build && cd ../server && yarn start:prod',
// command: 'cd ../client && yarn build && cd ../server && yarn start:prod',
port: 3000,
reuseExistingServer: !process.env.CI,
},
Expand Down

0 comments on commit d39320e

Please sign in to comment.