fix(frontend): Testen starten
This commit is contained in:
parent
2e465e707b
commit
0a2f697a6d
2 changed files with 16 additions and 17 deletions
|
@ -13,8 +13,10 @@ DWENGO_DB_NAME=":memory:"
|
||||||
DWENGO_DB_UPDATE=true
|
DWENGO_DB_UPDATE=true
|
||||||
|
|
||||||
DWENGO_AUTH_STUDENT_URL=http://localhost:7080/realms/student
|
DWENGO_AUTH_STUDENT_URL=http://localhost:7080/realms/student
|
||||||
|
DWENGO_AUTH_STUDENT_CLIENT_ID=dwengo
|
||||||
DWENGO_AUTH_STUDENT_JWKS_ENDPOINT=http://localhost:7080/realms/student/protocol/openid-connect/certs
|
DWENGO_AUTH_STUDENT_JWKS_ENDPOINT=http://localhost:7080/realms/student/protocol/openid-connect/certs
|
||||||
DWENGO_AUTH_TEACHER_URL=http://localhost:7080/realms/teacher
|
DWENGO_AUTH_TEACHER_URL=http://localhost:7080/realms/teacher
|
||||||
|
DWENGO_AUTH_TEACHER_CLIENT_ID=dwengo
|
||||||
DWENGO_AUTH_TEACHER_JWKS_ENDPOINT=http://localhost:7080/realms/teacher/protocol/openid-connect/certs
|
DWENGO_AUTH_TEACHER_JWKS_ENDPOINT=http://localhost:7080/realms/teacher/protocol/openid-connect/certs
|
||||||
|
|
||||||
DWENGO_CORS_ALLOWED_ORIGINS=http://localhost:5173,http://localhost:3000
|
DWENGO_CORS_ALLOWED_ORIGINS=http://localhost:5173,http://localhost:3000,http://localhost:9876,*
|
||||||
|
|
|
@ -98,27 +98,24 @@ export default defineConfig({
|
||||||
|
|
||||||
/* Run your local dev server before starting the tests */
|
/* Run your local dev server before starting the tests */
|
||||||
webServer: [
|
webServer: [
|
||||||
|
// Assuming the idp is already running (because it is slow)
|
||||||
{
|
{
|
||||||
command: process.env.CI ? "npm run preview" : "npm run dev",
|
/* Frontend */
|
||||||
|
command: `VITE_API_BASE_URL='http://localhost:9876/api' ${process.env.CI ? "npm run preview" : "npm run dev"}`,
|
||||||
port: process.env.CI ? 4173 : 5173,
|
port: process.env.CI ? 4173 : 5173,
|
||||||
|
timeout: 120 * 1000,
|
||||||
reuseExistingServer: !process.env.CI,
|
reuseExistingServer: !process.env.CI,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
command: "cd ../ && docker compose up",
|
/* Backend */
|
||||||
reuseExistingServer: false,
|
command: `
|
||||||
gracefulShutdown: {
|
cd .. \
|
||||||
signal: "SIGTERM",
|
&& npx tsc --build common/tsconfig.json \
|
||||||
timeout: 5000,
|
&& cd backend \
|
||||||
},
|
&& npx tsx --env-file=./.env.test ./tool/startTestApp.ts
|
||||||
},
|
`,
|
||||||
{
|
port: 9876,
|
||||||
command: process.env.CI ? "cd ../ && npm run dev -w backend" : "cd ../ && npm run start -w backend",
|
|
||||||
port: 3000,
|
|
||||||
reuseExistingServer: !process.env.CI,
|
reuseExistingServer: !process.env.CI,
|
||||||
},
|
}
|
||||||
{
|
|
||||||
command: "wait-on http://localhost:7080",
|
|
||||||
timeout: 120000,
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue