feat: enhance Playwright configuration and CI workflow for E2E testing
Deploy Development / deploy (push) Successful in 36s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 10s

- Updated playwright.config.js to allow dynamic base URL configuration via environment variables, improving flexibility for different environments.
- Modified .gitea/workflows/test.yml to include steps for starting a development stack, seeding test data, and stopping the stack after tests, enhancing the CI process for end-to-end testing.
- Refactored login test in dev-smoke-test.spec.js to use a dedicated function for submitting the login form, improving code clarity and maintainability.
This commit is contained in:
Lars committed 2026-04-29 12:35:30 +02:00
1 parent 1f2c8ea0f1
commit 50b8ff12cd
5 files changed
+143 -10

No files matched your search

+9 -1
View File
@@ -1,3 +1,11 @@
// CI: PLAYWRIGHT_BASE_URL=http://127.0.0.1:3098 nach docker compose dev-env
// Lokal gegen LAN/Dev: export PLAYWRIGHT_BASE_URL=http://192.168.x.x:3098
const rawBase =
process.env.PLAYWRIGHT_BASE_URL ||
process.env.BASE_URL ||
'http://127.0.0.1:3098';
module.exports = {
testDir: './tests',
timeout: 30000,
@@ -6,7 +14,7 @@ module.exports = {
headless: true,
viewport: { width: 390, height: 844 },
screenshot: 'only-on-failure',
baseURL: 'http://192.168.2.49:3098',
baseURL: rawBase.replace(/\/$/, ''),
},
reporter: 'list',
};