[WIP] Add initial playwright test infrastructure and genesis user test - #835
[WIP] Add initial playwright test infrastructure and genesis user test#835philmcmahon wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The login test needs explicit post-login navigation, and Elasticsearch sniffing can break the single-host E2E setup.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds isolated Playwright E2E infrastructure for testing genesis user creation and login, with disposable Docker services and CI integration.
Changes:
- Adds E2E orchestration and service configuration.
- Adds Playwright setup, dependencies, and genesis user test.
- Documents local usage and runs tests in GitHub Actions.
File summaries
| File | Summary |
|---|---|
scripts/test-e2e.sh |
Orchestrates the isolated E2E environment and test run. |
README.md |
Documents E2E testing. |
frontend/vite.config.mts |
Configures frontend proxying for E2E use. |
frontend/playwright.config.ts |
Configures Playwright execution and artifacts. |
frontend/package.json |
Adds Playwright scripts and dependency. |
frontend/package-lock.json |
Locks Playwright dependencies. |
frontend/e2e/README.md |
Documents E2E setup and troubleshooting. |
frontend/e2e/genesis.spec.ts |
Tests genesis user creation and administrator login. |
frontend/.gitignore |
Ignores generated E2E artifacts. |
docker-compose.e2e.yml |
Defines disposable E2E services. |
backend/conf/e2e.conf |
Configures E2E backend endpoints and authentication. |
backend/conf/e2e-logback.xml |
Configures E2E logging. |
.github/workflows/e2e.yml |
Runs E2E tests in CI and uploads artifacts. |
Review details
Files not reviewed (1)
- frontend/package-lock.json: Generated file
- Files reviewed: 12/13 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| frontend/playwright-report/ | ||
| frontend/test-results/ | ||
| frontend/e2e-artifacts/ | ||
| retention-days: 7 |
|
|
||
| # Genesis needs storage and authentication, but no background extraction services. | ||
| worker.enabled = false | ||
| worker.useExternalExtractors = false |
There was a problem hiding this comment.
for now this is necessary. once we've done the submodule thing or something else we should be able to run the transcription service worker in these tests as well (though might need separate queues for the tests for when they're run on our local machines - could be quite a lot of test queues following queue gardens)
| @@ -0,0 +1,104 @@ | |||
| #!/usr/bin/env bash | |||
There was a problem hiding this comment.
this is probably the messiest part of the testing infrastructure. I was wondering about rewriting it in typescript but given that it's mostly calling out to npm/sbt etc maybe bash is fine

What does this change?
We currently spend quite a lot of time manually testing giant. In other teams people are having some success using AI generated playwright tests to check an application is working as expected.
This PR adds playwright to the frontend/ client project along with an initial test that checks that a genesis user can be created and we can login with that user after it has been created.
The tests have their own docker-compose setup keeping them isolated from whatever the local state of dev giant databases is.
There is a script file scripts/test-e2e.sh which works but I'm a bit unsure about as it's massive - needs some human review.
In a follow up branch I've added a test that checks that we can upload a document and the extractors pass. I think this is quite exciting as that's one of the first things I do when testing giant.
A big caveat is that the external extractors (transcription/translation) are disabled at the moment, we'll need to sort out the git submodule or another approach to run these e2e tests with both services.
How has this change been tested?