Skip to content

[WIP] Add initial playwright test infrastructure and genesis user test - #835

Draft
philmcmahon wants to merge 3 commits into
mainfrom
add-playwright-genesis-e2e
Draft

[WIP] Add initial playwright test infrastructure and genesis user test#835
philmcmahon wants to merge 3 commits into
mainfrom
add-playwright-genesis-e2e

Conversation

@philmcmahon

@philmcmahon philmcmahon commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

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?

  • Tested locally
  • Tested in CI

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.

Comment thread frontend/e2e/genesis.spec.ts
Comment thread backend/conf/e2e.conf
@philmcmahon philmcmahon added the maintenance Departmental tracking: maintenance work, not a fix or a feature label Sep 11, 2026
Comment thread .github/workflows/e2e.yml
frontend/playwright-report/
frontend/test-results/
frontend/e2e-artifacts/
retention-days: 7

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Example report page from these artifacts. Also includes all the logs from the app and docker containers

Image

Comment thread backend/conf/e2e.conf

# Genesis needs storage and authentication, but no background extraction services.
worker.enabled = false
worker.useExternalExtractors = false

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Comment thread scripts/test-e2e.sh
@@ -0,0 +1,104 @@
#!/usr/bin/env bash

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Departmental tracking: maintenance work, not a fix or a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants