Skip to content

Commit

Permalink
update e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alan2207 committed Jun 6, 2024
1 parent 7ed817e commit a841bcd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- name: Install Playwright Browsers
run: yarn playwright install --with-deps
- name: Run Playwright tests
run: yarn test-e2e-start
run: yarn test-e2e
- uses: actions/upload-artifact@v4
if: always()
with:
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
"build": "tsc && vite build --base=/",
"preview": "vite preview",
"test": "vitest",
"test-e2e-start": "pm2 start \"npm run run-mock-server\" --name server && pm2 start \"npm run dev\" --name client",
"test-e2e-stop": "pm2 stop server && pm2 stop client",
"start-e2e-env": "pm2 start \"yarn run-mock-server\" --name server && yarn build && pm2 start \"yarn preview\" --name client",
"stop-e2e-env": "pm2 stop server && pm2 stop client",
"test-e2e": "yarn start-e2e-env && yarn playwright test",
"prepare": "husky",
"lint": "eslint src --ignore-path .gitignore",
"check-types": "tsc --project tsconfig.json --pretty --noEmit",
Expand Down
3 changes: 3 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ export default defineConfig({
server: {
port: 3000,
},
preview: {
port: 3000,
},
test: {
globals: true,
environment: 'jsdom',
Expand Down

0 comments on commit a841bcd

Please sign in to comment.