// The pages used as people use them: logged in through the PDS's own // approval page, writing from the pages, and reading back what they wrote, // on the page and in the PDS. The shots show what the pages draw; this // shows that what they do lands. // // just e2e a world of its own, seeded as the shots' is, and the flows // // The world is written to as it runs, so it is never the one `shots-up` // keeps: setup.mjs seeds one for each run, on ports of its own (E2E=1). // The flows go in order in one worker, as each writes to the world the // next reads. import { defineConfig } from '@playwright/test' import { join } from 'node:path' import { root } from '../shots/world.mjs' // Without it, the world would take the shots' ports, and `shots-up`'s. if (!process.env.E2E) throw new Error('run the flows with E2E=1, as `just e2e` does') export default defineConfig({ testDir: '.', // The public flows over the stock PDS, as most accounts' are; the // private ones over the spaces alpha (KNOTLESS_DEV_ENV), as only it // holds a private repository. testMatch: process.env.KNOTLESS_DEV_ENV ? 'private.spec.mjs' : 'flows.spec.mjs', globalSetup: './setup.mjs', // Each run's own, as a run clears its outputs first. outputDir: join(root, 'target/e2e', process.env.KNOTLESS_DEV_ENV ? 'private' : 'results'), workers: 1, // Seeding takes a while; a flow, waiting on the index, much less. timeout: 60_000, expect: { timeout: 15_000 }, reporter: [['list']], use: { browserName: 'chromium', viewport: { width: 1280, height: 800 }, locale: 'en-US', // The pages are reached as a PDS reaches a gateway: over https, at the // harness's gateway hostname, with the harness's own certificate. ignoreHTTPSErrors: true, launchOptions: { args: ['--host-resolver-rules=MAP gateway.knotless.internal 127.0.0.1'] }, trace: 'retain-on-failure', screenshot: 'only-on-failure', }, })