Links and GET forms to wiki pages swap the next page into .shell instead of loading a new document: the server answers boosted requests and history restores with a partial (title, page actions out-of-band, shell content). The header stays, browsers without cross-document view transitions (Firefox) no longer flash between pages, and the swap runs as a same-document view transition. Files, the editor, internal endpoints and POST forms still navigate normally. Back/Forward refetch pages (no snapshots that could predate a move or delete); the tree rail keeps its scroll position and the content column returns to where it was. Mutation redirects swap their result in the same way. Page scripts that assumed a fresh document now also run after a swap (toc, contents, companion, scroll-sync, search actions) or register once (fitness). The e2e suite now also runs in Firefox. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
31 lines
871 B
JavaScript
31 lines
871 B
JavaScript
import { defineConfig, devices } from "@playwright/test";
|
|
|
|
const port = process.env.E2E_PORT || "8765";
|
|
|
|
export default defineConfig({
|
|
testDir: "tests",
|
|
// Tests share one server and wiki but each works in its own sandbox folder,
|
|
// so they can run in parallel.
|
|
workers: 4,
|
|
fullyParallel: true,
|
|
reporter: "list",
|
|
use: {
|
|
baseURL: `http://127.0.0.1:${port}`,
|
|
trace: "retain-on-failure",
|
|
screenshot: "only-on-failure",
|
|
},
|
|
projects: [
|
|
// The system Chrome; no browser download needed.
|
|
{ name: "chrome", use: { channel: "chrome" } },
|
|
// Playwright's Firefox build: npx playwright install firefox
|
|
{ name: "firefox", use: { ...devices["Desktop Firefox"] } },
|
|
],
|
|
webServer: {
|
|
command: "node server.mjs",
|
|
url: `http://127.0.0.1:${port}/`,
|
|
timeout: 120_000,
|
|
reuseExistingServer: false,
|
|
stdout: "pipe",
|
|
},
|
|
});
|