With signals_on_server set and TYPESAFE_KEY present, the judge asks Jev about everyone's Signals on the server's key; otherwise each person turns Signals on in Settings with a key of their own, which is now checked with TypeSafe before it is saved. The Signals folder shows only when they are on. The browser suite's daemon inherited the shell's TYPESAFE_KEY, so fixture feeds were sent to the real TypeSafe to be categorised; it is blanked now, and an empty key counts as none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
70 lines
2.7 KiB
JavaScript
70 lines
2.7 KiB
JavaScript
const { defineConfig } = require('@playwright/test');
|
|
const setup = require('./tests/ui/global-setup');
|
|
|
|
// Before anything else, including the servers below.
|
|
setup.prepare();
|
|
|
|
// Real browser against a real daemon. The stub-DOM smoke test catches a script that
|
|
// fails to load; it cannot catch a wrong selector, a handler that runs but does nothing,
|
|
// or a page that renders empty -- which is exactly what has slipped through before.
|
|
module.exports = defineConfig({
|
|
testDir: './tests/ui',
|
|
timeout: 30_000,
|
|
expect: { timeout: 10_000 },
|
|
fullyParallel: false, // one daemon, one database
|
|
workers: 1,
|
|
reporter: process.env.CI ? 'line' : [['list']],
|
|
use: {
|
|
baseURL: 'http://127.0.0.1:8791',
|
|
trace: 'retain-on-failure',
|
|
screenshot: 'only-on-failure',
|
|
},
|
|
webServer: [
|
|
{
|
|
command: 'node tests/ui/fixtures/serve.js',
|
|
port: 8792,
|
|
reuseExistingServer: false,
|
|
stdout: 'ignore',
|
|
},
|
|
{
|
|
// The directory the Directory shows (#205), on SQLite in the scratch directory.
|
|
command: `cargo build -q -p ipx-directory && exec ./target/debug/ipx-directory --config ${setup.root}/directory.toml`,
|
|
url: `${setup.DIRECTORY}/healthz`,
|
|
reuseExistingServer: false,
|
|
timeout: 180_000,
|
|
stdout: 'ignore',
|
|
env: { DIRECTORY_DATABASE_URL: `sqlite://${setup.root}/directory.db?mode=rwc` },
|
|
},
|
|
{
|
|
// The frontend as production serves it (#203): built from web/, served by Caddy on the
|
|
// suite's port, the API passed to the daemon behind it.
|
|
command: `node web/build.mjs ${setup.root}/web && exec caddy run --config web/Caddyfile --adapter caddyfile`,
|
|
url: 'http://127.0.0.1:8791/favicon.png',
|
|
reuseExistingServer: false,
|
|
timeout: 60_000,
|
|
stdout: 'ignore',
|
|
env: { WEB_BIND: '127.0.0.1:8791', WEB_ROOT: `${setup.root}/web`, IPX_UPSTREAM: '127.0.0.1:8796', HOME: setup.root, XDG_DATA_HOME: setup.root, XDG_CONFIG_HOME: setup.root },
|
|
},
|
|
{
|
|
// Build first so the tests always run against current source.
|
|
command: 'cargo build -q && exec ./target/debug/ipx daemon',
|
|
port: 8796,
|
|
reuseExistingServer: false,
|
|
timeout: 180_000,
|
|
stdout: 'pipe',
|
|
env: {
|
|
IPX_CONFIG: `${setup.root}/config/config.toml`,
|
|
IPX_DATA_DIR: `${setup.root}/data`,
|
|
IPX_LOG: 'ipx=info',
|
|
// Blank, whatever the shell running the suite has: the test daemon sends no traces to
|
|
// production's Tempo and never opens production's database.
|
|
OTEL_EXPORTER_OTLP_ENDPOINT: '',
|
|
IPX_DATABASE_URL: '',
|
|
// Nor spends the server's TypeSafe key: fixture feeds went to TypeSafe to be categorised.
|
|
TYPESAFE_KEY: '',
|
|
IPX_TYPESAFE_URL: 'http://127.0.0.1:8792/jev',
|
|
},
|
|
},
|
|
],
|
|
});
|