Files
Oscar Hinton e3d0bc5709 Add SeederApi seeding to the e2e suite (#24381)
* Add SeederApi seeding to the e2e suite

Ports the seeder framework from the playwright branch into e2e/, updated
for the current SeederApi: basic auth, the { urls } emergency access
invite response, and the full SingleUserScene request and result.

Each test gets a play whose id tags what it seeds and what its pages
create, and which is deleted when the test ends. Seeding tests are
skipped when no SeederApi account is configured.

* Harden e2e seeding configuration and cleanup

- Skip seeding tests against a deployed vault while the SeederApi is
  local, since it seeds a database that vault never reads.
- Read E2E_SEEDER_USERNAME and E2E_SEEDER_PASSWORD as a pair, failing
  on a partial set, and resolve the seeder URL the same way whatever
  supplied the account. Empty values count as unset.
- Set up `play` before the browser context so the page closes before
  its data is deleted.
- Assert the seeded user is the one signed in, through the automation
  driver's lock capability.
- Document that client-created data is only cleaned up when Api and
  Identity have play-id tracking enabled.

* Use Playwright's request client and routing for e2e seeding

- Call the SeederApi through an APIRequestContext opened per play, so
  credentials are read once, calls appear in traces, and an unreachable
  SeederApi says so.
- Tag requests to the vault with the play id through context routing
  instead of patching fetch, which also covers XHR.
- Record video for newPage contexts, which the config's video option
  does not reach.
- Simplify Play.mangle.

* Say up front when seeding e2e tests skip and when they fail
2026-11-09 09:04:11 +01:00
..