Skip to content

Commit fd9f45c

Browse files
authored
Use the wasp-app-runner (#495)
1 parent 8fc03d9 commit fd9f45c

File tree

4 files changed

+60
-55
lines changed

4 files changed

+60
-55
lines changed

template/e2e-tests/ci-start-app-and-db.js

Lines changed: 0 additions & 41 deletions
This file was deleted.

template/e2e-tests/package-lock.json

Lines changed: 58 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

template/e2e-tests/package.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@
77
"test": "tests"
88
},
99
"scripts": {
10-
"ci:e2e:start": "npm run ci:e2e:cleanup-db && node ci-start-app-and-db.js",
11-
"ci:e2e:start-db": "cd ../app && wasp start db",
12-
"ci:e2e:start-app": "npm run ci:e2e:wait-for-db && cd ../app && wasp db migrate-dev && cd ../e2e-tests && cd ../app && wasp start",
13-
"ci:e2e:wait-for-db": "npx wait-port 5432",
14-
"_comment-on-ci:e2e:cleanup-db": "NOTE: the name of the DB container, e.g. name=^wasp-dev-db-OpenSaaS-, is generated by wasp and will match the name of the app definition in your `main.wasp` file, e.g. `app OpenSaaS { }`",
15-
"ci:e2e:cleanup-db": "(docker container rm $(docker container ls -f name=^wasp-dev-db-OpenSaaS- -q) -f || true) && docker volume rm $(docker volume ls -f name=^wasp-dev-db-OpenSaaS- -q) -f || true",
1610
"e2e:playwright": "DEBUG=pw:webserver npx playwright test",
1711
"_comment-on-local:e2e:cleanup-stripe": "NOTE: because we are running the stripe webhook listener in the background, we want to make sure we kill the previous processes before starting a new one.",
1812
"local:e2e:cleanup-stripe": "PID=$(ps -ef | grep 'stripe listen' | grep -v grep | awk '{print $2}') || true && kill -9 $PID || true",
@@ -25,7 +19,7 @@
2519
"dependencies": {
2620
"@playwright/test": "^1.42.1",
2721
"@prisma/client": "5.19.1",
28-
"linebyline": "^1.3.0",
22+
"@wasp.sh/wasp-app-runner": "0.0.7",
2923
"prisma": "5.19.1"
3024
},
3125
"devDependencies": {

template/e2e-tests/playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export default defineConfig({
3939
* For local development, where this does pose a nuisance, we start the app / web server manually with `wasp db start` and `wasp start` and then start tests with `npm run local:e2e:start`.
4040
*/
4141
webServer: {
42-
command: 'npm run ci:e2e:start',
42+
command: 'run-wasp-app dev --path-to-app=../app --wasp-cli-cmd=wasp',
4343
// Wait for the backend to start
4444
url: 'http://localhost:3001',
4545
reuseExistingServer: !process.env.CI,

0 commit comments

Comments
 (0)