ipx asks ipx-directory on its people's behalf, with the token an admin set in the new Admin, Directory tab, so the page never talks to it and never sees the token or a feed's address. /api/directory, /api/popular and a feed's Directory page answer from it; subscribing takes the address from the directory and goes through Add feed's steps. With no directory set up, the Directory says so. The local directory code is gone; its privacy checks are the snapshot builder's now, and their tests moved with them. With sharing on, ipx sends its snapshot after every scan, whenever the config changes (set_cfg) and every half hour: each public feed and how many here subscribe, never an OPML or Patreon creator itself or anything private. A feed can be marked private in its settings, for a paid feed whose address does not give it away; anyone subscribed may mark it, only an admin unmark it. The admin's category for a feed that names none goes with it, which the directory uses only while the feed names none, so the category an admin gives a blog still reaches the Directory. The directory lists only feeds it has read as a feed: the first snapshot after a start went before the first scan, when an OPML was not yet known to be one, and the directory listed the OPML. It now fetches what a snapshot brings in at once instead of within the minute. The browser suite runs its own ipx-directory on SQLite; the Directory's tests match feeds by title, since the directory names them by address. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
57 lines
2.0 KiB
JavaScript
57 lines
2.0 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` },
|
|
},
|
|
{
|
|
// Build first so the tests always run against current source.
|
|
command: 'cargo build -q && exec ./target/debug/ipx daemon',
|
|
port: 8791,
|
|
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: '',
|
|
},
|
|
},
|
|
],
|
|
});
|