commit 6ea4a2f2ad3a498c84cb70c4ef8229430e40ac9a
parent 67a9bd9f7f9bd05b5efdaaae531ba77517003867
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Wed, 14 Oct 2026 05:57:02 -0400
umtool: specs open the piece page's tab through urls.section(project, name); Delete project from the ⋯ menu
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
19 files changed, 73 insertions(+), 50 deletions(-)
diff --git a/umtool/e2e/article-delete.spec.ts b/umtool/e2e/article-delete.spec.ts
@@ -136,6 +136,8 @@ test("a take the project's manifest is, is refused until forced; another take an
expect(existsSync(path.join(PROJECT, "takes", "keep", "take.json"))).toBe(true);
await page.goto("/browse/reports/delete-fixture");
+ // Delete is in the piece head's ⋯ menu (P4a-1).
+ await page.getByRole("button", { name: "More" }).click();
await page.getByRole("button", { name: "Delete project" }).click();
const plan = page.getByRole("region", { name: "delete the project reports/delete-fixture" });
await expect(plan.getByRole("list", { name: "what goes" })).toContainText("reports/delete-fixture");
diff --git a/umtool/e2e/clip-bench.spec.ts b/umtool/e2e/clip-bench.spec.ts
@@ -3,6 +3,7 @@ import { execFileSync } from "node:child_process";
import { copyFileSync, existsSync, mkdirSync, readFileSync } from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
+import * as urls from "./urls";
// ---------------------------------------------------------------------------
// The clip bench.
@@ -271,7 +272,7 @@ test("a bench save shows up on the project page", async ({ page, request }) => {
data: { project: PROJECT, clip: "c01", start: 3, end: 9, lockEnd: true, token: t },
});
- await page.goto(`/browse/${PROJECT}`);
+ await page.goto(urls.section(PROJECT, "timeline"));
const row = page.locator("[data-entry=c01][data-kind]");
await expect(row).toContainText("end pinned");
// lockEnd is the acknowledgement, so the row's warning goes with it.
@@ -402,7 +403,7 @@ test("a clip off the walk still opens by URL, and says why it is off it", async
});
test("`ready N of M` counts the fetched clips that still need judgement", async ({ page }) => {
- await page.goto(`/browse/${WALK}`);
+ await page.goto(urls.section(WALK, "timeline"));
await expect(page.locator("[data-ready-count]")).toHaveText("ready 2 of 3 needing judgement");
// The pill is the same question the walk asks, per row.
await expect(page.locator("[data-entry=w02][data-kind]")).toHaveAttribute("data-fetched", "0");
@@ -411,7 +412,7 @@ test("`ready N of M` counts the fetched clips that still need judgement", async
// And the walk starts where the walk actually goes.
await expect(page.locator("[data-walk-start=w01]")).toHaveAttribute(
"href",
- `/browse/${WALK}/clip/w01`,
+ urls.clipBenchHref(WALK, "w01"),
);
await page.goto(walkBench("w01"));
@@ -509,7 +510,7 @@ test("a correction is written for the next pass, and collected on the project pa
// The project page lists it, because the list's real destination is somebody's
// next prompt -- not this manifest, which cannot fix a defect in the report.
- await page.goto(`/browse/${PROJECT}`);
+ await page.goto(urls.section(PROJECT, "timeline"));
const list = page.locator("[data-corrections]");
await expect(list).toBeVisible();
await expect(list.locator("[data-correction=c04]")).toContainText("not Destiny");
@@ -524,7 +525,7 @@ test("a correction is written for the next pass, and collected on the project pa
await page.goto(bench("c04"));
await setField(page, "correction", "");
await expect.poll(() => readClip("c04").correction).toBeUndefined();
- await page.goto(`/browse/${PROJECT}`);
+ await page.goto(urls.section(PROJECT, "timeline"));
await expect(page.locator("[data-corrections]")).toHaveCount(0);
});
@@ -770,7 +771,7 @@ test("a note written before `incorrect` existed still reads as incorrect", async
await expect(page.locator("[data-verdict-state]")).toHaveText("incorrect");
await expect(page.locator("[data-bench=c02]")).toHaveAttribute("data-verdict", "incorrect");
- await page.goto(`/browse/${PROJECT}`);
+ await page.goto(urls.section(PROJECT, "timeline"));
await expect(page.locator("[data-walk-progress]")).toContainText("incorrect");
await expect(page.locator("[data-correction=c02]")).toHaveAttribute(
"data-correction-verdict",
@@ -1109,14 +1110,14 @@ test("auto-audition plays the clip you walk onto", async ({ page, request }) =>
});
test("the project page opens the walk at the first clip", async ({ page }) => {
- await page.goto(`/browse/${PROJECT}`);
+ await page.goto(urls.section(PROJECT, "timeline"));
const cta = page.locator("[data-walk-cut]");
await expect(cta).toBeVisible();
await expect(cta).toContainText("Walk the cut");
// Named, so it is a promise about where it goes rather than a mystery.
await expect(page.locator("[data-walk-start=c01]")).toHaveAttribute(
"href",
- `/browse/${PROJECT}/clip/c01`,
+ urls.clipBenchHref(PROJECT, "c01"),
);
await page.locator("[data-walk-start=c01]").click();
await expect(page.locator("[data-bench=c01]")).toBeVisible();
diff --git a/umtool/e2e/deliver.spec.ts b/umtool/e2e/deliver.spec.ts
@@ -3,6 +3,7 @@ import { execFileSync } from "node:child_process";
import { existsSync, readdirSync, readFileSync, statSync } from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
+import * as urls from "./urls";
// ---------------------------------------------------------------------------
// DELIVER: what happens after the last clip is judged.
@@ -47,7 +48,7 @@ async function waitForJob(page: import("@playwright/test").Page, timeout = 120_0
}
test("the deliver panel counts verdicts and folds them by id prefix", async ({ page }) => {
- await page.goto(`/browse/${PROJECT}`);
+ await page.goto(urls.section(PROJECT, "deliver"));
const panel = page.locator("[data-deliver]");
await expect(panel).toBeVisible();
@@ -76,7 +77,7 @@ test("the deliver panel counts verdicts and folds them by id prefix", async ({ p
test("a confirmed clip with no cached window is listed as not fetched, not cut", async ({
page,
}) => {
- await page.goto(`/browse/${PROJECT}`);
+ await page.goto(urls.section(PROJECT, "deliver"));
const notFetched = page.locator("[data-not-fetched]");
await expect(notFetched).toBeVisible();
// a03's window is 30–33 s and the cache holds 0–24. Nothing here downloads
@@ -96,7 +97,7 @@ test("cutting from cache writes clips/<id>.mp4 of exactly the clip's length", as
page,
}) => {
test.setTimeout(180_000);
- await page.goto(`/browse/${PROJECT}`);
+ await page.goto(urls.section(PROJECT, "deliver"));
await page.locator('[data-action="deliver-cut"]').click();
// `k of n` is the JOB's count -- one step per clip -- so the readout and the
@@ -121,7 +122,7 @@ test("cutting from cache writes clips/<id>.mp4 of exactly the clip's length", as
test("the share batch skips every id an existing LIST.md already shipped", async ({ page }) => {
test.setTimeout(180_000);
- await page.goto(`/browse/${PROJECT}`);
+ await page.goto(urls.section(PROJECT, "deliver"));
await page.locator("[data-batch-name]").fill("second");
await page.locator('[data-action="deliver-share"]').click();
const { state, log } = await waitForJob(page);
@@ -171,7 +172,7 @@ test("apply rulings is refused while the walk is unfinished, and runs the report
page,
}) => {
test.setTimeout(120_000);
- await page.goto(`/browse/${PROJECT}`);
+ await page.goto(urls.section(PROJECT, "deliver"));
// b03 has never been judged. apply-manifest.py deletes the mp4 of every clip
// whose window moved, so running it over a half-walked cut bakes "nobody has
@@ -202,7 +203,7 @@ test("apply rulings is refused while the walk is unfinished, and runs the report
test("the panel shows the prose lines citing a clip the walk ruled incorrect", async ({
page,
}) => {
- await page.goto(`/browse/${PROJECT}`);
+ await page.goto(urls.section(PROJECT, "deliver"));
const cited = page.locator('[data-incorrect="b02"]');
await expect(cited).toBeVisible();
await expect(cited).toContainText("content.py:6");
@@ -211,7 +212,7 @@ test("the panel shows the prose lines citing a clip the walk ruled incorrect", a
test("rebuild runs build.py once per content variant present", async ({ page }) => {
test.setTimeout(120_000);
- await page.goto(`/browse/${PROJECT}`);
+ await page.goto(urls.section(PROJECT, "deliver"));
await page.locator('[data-action="deliver-rebuild"]').click();
const { state, log } = await waitForJob(page);
expect(state, log).toBe("done");
@@ -251,7 +252,7 @@ test("Stop abandons the rest of the cut, and the next one resumes without re-cut
page,
}) => {
test.setTimeout(240_000);
- await page.goto("/browse/reports/deliver-stop-fixture");
+ await page.goto(urls.section("reports/deliver-stop-fixture", "deliver"));
await expect(page.locator("[data-deliver]")).toHaveAttribute("data-deliver-need-cut", "6");
expect(stopCuts()).toHaveLength(0);
diff --git a/umtool/e2e/deliverables.spec.ts b/umtool/e2e/deliverables.spec.ts
@@ -3,6 +3,7 @@ import { execFileSync, spawnSync } from "node:child_process";
import { existsSync, lstatSync, readdirSync, readFileSync, readlinkSync, renameSync } from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
+import * as urls from "./urls";
// ---------------------------------------------------------------------------
// A report's deliverables behind the per-project switch (release 17, slice U2).
@@ -113,7 +114,7 @@ test("the switch moves clips/ and every share-* to the media root, then says med
test("the app cuts through the linked clips/, and the move waits for the cut", async ({ page, request }) => {
test.setTimeout(180_000);
- await page.goto(`/browse/${PROJECT}`);
+ await page.goto(urls.section(PROJECT, "deliver"));
await expect(page.locator("[data-deliverables]")).toHaveAttribute("data-deliverables", "media");
await expect(page.locator('[data-deliverable="clips"]')).toHaveAttribute("data-deliverable-state", "link");
const move = page.locator('[data-action="deliver-move"]');
@@ -146,7 +147,7 @@ test("the app cuts through the linked clips/, and the move waits for the cut", a
test("a new batch: refused by an app with no media root, made as a link by a CLI with one", async ({ page, request }) => {
test.setTimeout(180_000);
- await page.goto(`/browse/${PROJECT}`);
+ await page.goto(urls.section(PROJECT, "deliver"));
// The app could only make share-<x>/ in the project, which is not where this
// project's deliverables live: it says so rather than splitting them.
await expect(page.locator('[data-action="deliver-share"]')).toBeDisabled();
@@ -194,7 +195,7 @@ test("an unplugged media root: check blocks, the panel refuses, nothing is made"
["share-second", "blocking", true],
]);
- await page.goto(`/browse/${PROJECT}`);
+ await page.goto(urls.section(PROJECT, "deliver"));
await expect(page.locator('[data-deliverable="clips"]')).toHaveAttribute("data-deliverable-state", "dangling");
await expect(page.locator('[data-action="deliver-move"]')).toBeDisabled();
await expect(page.locator("[data-move-reason]")).toContainText("is the media drive mounted?");
@@ -215,7 +216,7 @@ test("an unplugged media root: check blocks, the panel refuses, nothing is made"
test("the bench moves the deliverables home, and offers no move to media without a media root", async ({ page }) => {
test.setTimeout(180_000);
- await page.goto(`/browse/${PROJECT}`);
+ await page.goto(urls.section(PROJECT, "deliver"));
const move = page.locator('[data-action="deliver-move"]');
await expect(move).toHaveText("Move deliverables to local");
await move.click();
diff --git a/umtool/e2e/draft-review.spec.ts b/umtool/e2e/draft-review.spec.ts
@@ -2,6 +2,7 @@ import { test, expect, type APIRequestContext } from "@playwright/test";
import { existsSync, readFileSync } from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
+import * as urls from "./urls";
// ---------------------------------------------------------------------------
// The drafts review (release 28, M0). A drafted field shows "drafted by
@@ -29,10 +30,11 @@ const review = (dir = DIR): Record<string, { verdict: string | null; note: strin
};
test("badges: drafted by <model>, approve, reject with a note; an edit makes the field the operator's", async ({ page }) => {
- await page.goto(`/browse/${PROJECT}`);
+ await page.goto(urls.section(PROJECT, "review"));
await expect(page.locator("[data-review-link]")).toHaveAttribute("data-review-link", "3");
// The On-screen table (folded: the deck is off) -- c02's title was drafted, c01's was not.
+ await page.goto(urls.section(PROJECT, "onscreen"));
await page.getByTestId("onscreen-words-folded").locator("summary").click();
const c02 = page.locator('[data-draft-badge="onscreen/c02/onscreen"]');
await expect(c02).toHaveAttribute("data-state", "unreviewed");
@@ -64,7 +66,7 @@ test("badges: drafted by <model>, approve, reject with a note; an edit makes the
});
test("the review page: every drafted field, the narration's badge, and Use this for the operator's field", async ({ page }) => {
- await page.goto(`/browse/${PROJECT}`);
+ await page.goto(urls.section(PROJECT, "review"));
await page.locator("[data-review-link]").click();
await expect(page).toHaveURL(new RegExp(`/projects/${PROJECT}/review$`));
// The narration and the teaser are drafted; a final build would refuse them.
diff --git a/umtool/e2e/media-draft-e.spec.ts b/umtool/e2e/media-draft-e.spec.ts
@@ -2,6 +2,7 @@ import { test, expect } from "@playwright/test";
import { existsSync, readFileSync } from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
+import * as urls from "./urls";
// ---------------------------------------------------------------------------
// Release 28 lane E's media drafts, as umtool shows them (M6): the project
@@ -24,7 +25,7 @@ const SOURCES = ["https://archive.example/?v=testchan%2Fvid1&t=3", "https://arch
test("the YouTube text: a preview before the build, Copy, then out/youtube.txt with chapters and sources", async ({ page, request, context }) => {
test.setTimeout(300_000);
await context.grantPermissions(["clipboard-read", "clipboard-write"]);
- await page.goto(`/browse/${PROJECT}`);
+ await page.goto(urls.section(PROJECT, "youtube"));
const section = page.locator("[data-youtube]");
await expect(section).toHaveAttribute("data-youtube", "preview");
await expect(section.locator("[data-youtube-status]")).toContainText("chapters are added by the build");
diff --git a/umtool/e2e/media-surfaces.spec.ts b/umtool/e2e/media-surfaces.spec.ts
@@ -3,6 +3,7 @@ import { existsSync, readFileSync } from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
import { WARM_TIMEOUT, warm } from "./warm";
+import * as urls from "./urls";
// ---------------------------------------------------------------------------
// Release 28 M9, the surfaces of the media drafts:
@@ -37,7 +38,7 @@ test.beforeAll(async ({ playwright }) => {
test("Draft with <model> per section: the job followed, the badge, the last run, an alternative and Use this", async ({ page }) => {
test.setTimeout(180_000);
- await page.goto(`/browse/${PROJECT}`);
+ await page.goto(urls.section(PROJECT, "drafts"));
const panel = page.getByRole("region", { name: "draft with a model" });
await expect(panel).toHaveAttribute("data-draft-panel", `${ARTICLE}/i1`);
// Seven sections; flips and threads say why they cannot draft on this cut.
@@ -91,7 +92,7 @@ test("Draft with <model> per section: the job followed, the badge, the last run,
expect(manifestOf(1).drafted?.["publish.youtube"]).toBeUndefined();
// A project made from no iteration offers no draft, and says why.
- await page.goto("/browse/reports/youtube-fixture");
+ await page.goto(urls.section("reports/youtube-fixture", "drafts"));
await expect(page.getByRole("region", { name: "draft with a model" }).locator("[data-draft-unlinked]")).toContainText("not made from an article's iteration");
});
diff --git a/umtool/e2e/mix.spec.ts b/umtool/e2e/mix.spec.ts
@@ -2,6 +2,7 @@ import { test, expect } from "@playwright/test";
import { existsSync, mkdirSync, readdirSync, renameSync, rmSync } from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
+import * as urls from "./urls";
// The mix bench, against SYNTHESISED tracks whose true answers are known in
// advance (see make-fixture.mjs):
@@ -228,7 +229,7 @@ test("the picker is grouped by project, and every project's media is in it", asy
});
test("a clip row links into the bench with the window already set", async ({ page }) => {
- await page.goto("/browse/reports/report-fixture");
+ await page.goto(urls.section("reports/report-fixture", "timeline"));
const link = page.locator("[data-mix-link=c01]");
await expect(link).toBeVisible();
@@ -265,7 +266,7 @@ test("a deep link outside the roots is REFUSED, not clamped to something else",
test("a clip with nothing fetched offers no link at all, rather than a dead one", async ({
page,
}) => {
- await page.goto("/browse/reports/report-fixture");
+ await page.goto(urls.section("reports/report-fixture", "timeline"));
// c02's window has no cached file covering it, and a 400 on click would be
// worse than saying so.
await expect(page.locator("[data-mix-link-disabled=c02]")).toBeVisible();
diff --git a/umtool/e2e/narration-review.spec.ts b/umtool/e2e/narration-review.spec.ts
@@ -2,6 +2,7 @@ import { test, expect } from "@playwright/test";
import { existsSync, readFileSync } from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
+import * as urls from "./urls";
// ---------------------------------------------------------------------------
// The narration review (release 25, T5): a cut's narration script, card by
@@ -35,7 +36,7 @@ const ttsAsks = (): { route?: string; text?: string }[] => {
};
test("review the narration card by card: approve, reject with a note, edit un-approves, play asks the editor", async ({ page }) => {
- await page.goto(`/browse/${PROJECT}`);
+ await page.goto(urls.section(PROJECT, "narration"));
await page.locator("[data-narration-link]").click();
await expect(page).toHaveURL(new RegExp(`/projects/${PROJECT}/narration$`));
const k1 = page.locator('[data-narration-card="k01"]');
diff --git a/umtool/e2e/onscreen-posts.spec.ts b/umtool/e2e/onscreen-posts.spec.ts
@@ -4,6 +4,7 @@ import { existsSync, readFileSync } from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
import { deckGeometry, feedGeometry, postWindows, postsGeometry, shiftedFootage } from "umtool-report-to-video/deck";
+import * as urls from "./urls";
// ---------------------------------------------------------------------------
// POSTS on the on-screen deck, as umtool edits them: the Posts table under the
@@ -120,7 +121,7 @@ const backdropMatrix = (page: Page) =>
});
async function openSection(page: Page) {
- await page.goto(`/browse/${PROJECT}`);
+ await page.goto(urls.section(PROJECT, "onscreen"));
await expect(page.getByTestId("onscreen-section")).toHaveAttribute("data-onscreen", "on");
await expect(page.getByTestId("onscreen-post-row")).toHaveCount(3);
}
diff --git a/umtool/e2e/onscreen.spec.ts b/umtool/e2e/onscreen.spec.ts
@@ -3,6 +3,7 @@ import { execFileSync } from "node:child_process";
import { existsSync, readFileSync, statSync } from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
+import * as urls from "./urls";
// ---------------------------------------------------------------------------
// ON-SCREEN: the report cut's deck (render.chrome), as umtool edits it.
@@ -85,7 +86,7 @@ async function putOnscreen(
/** The section, read and settled: the manifest loaded and the table filled. */
async function openSection(page: Page, project = PROJECT) {
- await page.goto(`/browse/${project}`);
+ await page.goto(urls.section(project, "onscreen"));
const section = page.getByTestId("onscreen-section");
await expect(section).toHaveAttribute("data-onscreen", /on|off/);
await expect(page.getByTestId("onscreen-row").first()).toBeAttached();
diff --git a/umtool/e2e/projects.spec.ts b/umtool/e2e/projects.spec.ts
@@ -509,7 +509,7 @@ test("a timeline entry of an unknown type renders, rather than crashing the page
// beside its cards; code that assumed card-or-clip put `undefined` into
// path.join() and 500'd the project page. The rule is that a CLIP is
// `type === "clip"` and everything else renders generically.
- const res = await page.goto("/browse/reports/report-fixture");
+ const res = await page.goto(urls.section("reports/report-fixture", "timeline"));
expect(res?.status()).toBe(200);
// The TIMELINE's entries, which carry a kind. The On-screen section's table
diff --git a/umtool/e2e/report-fetch-via-editor.spec.ts b/umtool/e2e/report-fetch-via-editor.spec.ts
@@ -2,6 +2,7 @@ import { test, expect } from "@playwright/test";
import { existsSync, readFileSync, statSync } from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
+import * as urls from "./urls";
// ---------------------------------------------------------------------------
// Fetching a clip window BY ASKING THE EDITOR.
@@ -129,7 +130,7 @@ test("the fetch route asks the editor, carries the provenance, and runs no yt-dl
expect(ytdlpCalls()).toBe(ytdlpBefore);
// The page reads the corpus window as cached, so the walk stops skipping it.
- await page.goto(`/browse/${PROJECT}`);
+ await page.goto(urls.section(PROJECT, "timeline"));
await expect(page.locator('[data-entry="e01"][data-kind]')).toHaveAttribute(
"data-fetched",
"1",
@@ -154,7 +155,7 @@ test("the project page fetches the unfetched clips one at a time, and Stop halts
test.setTimeout(120_000);
const ytdlpBefore = ytdlpCalls();
- await page.goto(`/browse/${MANY}`);
+ await page.goto(urls.section(MANY, "timeline"));
await expect(page.locator("[data-ready-count]")).toContainText("ready 0 of 2");
const button = page.getByRole("button", { name: /fetch 2 unfetched clips/i });
await expect(button).toBeVisible();
@@ -211,7 +212,7 @@ test("a clip the previous fetch already covers does not abort the sweep", async
// and the predicate is containment, so a sweep down a timeline routinely
// finds its next clip already paid for. Treating it as a refusal stopped the
// run on its own success and left the counter short.
- await page.goto(`/browse/${REUSE}`);
+ await page.goto(urls.section(REUSE, "timeline"));
await expect(page.locator("[data-ready-count]")).toContainText("ready 0 of 2");
await page.getByRole("button", { name: /fetch 2 unfetched clips/i }).click();
diff --git a/umtool/e2e/report-longform.spec.ts b/umtool/e2e/report-longform.spec.ts
@@ -3,6 +3,7 @@ import { execFileSync } from "node:child_process";
import { existsSync, readFileSync, rmSync } from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
+import * as urls from "./urls";
// ---------------------------------------------------------------------------
// The long-form pass: sources, revisions, notes and exports of a report video.
@@ -31,7 +32,7 @@ const umtool = (args: string[]) =>
execFileSync("node", ["bin/umtool.mjs", ...args], { cwd: UMTOOL, encoding: "utf8", env: cliEnv });
test("a clip that outruns its transcript is a cue gap, on the page and in the inbox", async ({ page }) => {
- await page.goto("/browse/reports/longform-fixture");
+ await page.goto(urls.section("reports/longform-fixture", "sources"));
const row = page.locator("[data-source='testchan/short1']");
await expect(row).toHaveAttribute("data-cue-gap", "c02");
await expect(row).toContainText("cues end 6 s · c02 needs 12 s");
@@ -40,6 +41,7 @@ test("a clip that outruns its transcript is a cue gap, on the page and in the in
await expect(page.locator("[data-source='testchan/vid1']")).toHaveAttribute("data-cite-override", "0");
await expect(page.locator("[data-source='testchan/vid1']")).toHaveAttribute("data-cue-gap", "");
+ await page.goto(urls.section("reports/longform-fixture", "decisions"));
await expect(page.locator("[data-decision='clip-cue-gap'][data-target=c02]")).toHaveCount(1);
await expect(page.locator("[data-decision='clip-cue-gap'][data-target=c02]")).toHaveAttribute("data-severity", "open");
});
@@ -55,7 +57,7 @@ test("umtool show prints the same sources table", () => {
});
test("a legacy .bak is listed as a snapshot and diffed, never renamed", async ({ page }) => {
- await page.goto("/browse/reports/longform-fixture");
+ await page.goto(urls.section("reports/longform-fixture", "revisions"));
const bak = page.locator("[data-snapshot='video.manifest.json.bak']");
await expect(bak).toHaveAttribute("data-legacy", "1");
// The .bak had c02 ending at 9; the manifest has 12: exactly one change.
@@ -66,7 +68,7 @@ test("a legacy .bak is listed as a snapshot and diffed, never renamed", async ({
});
test("README and sibling notes render, and long provenance reads as prose", async ({ page }) => {
- await page.goto("/browse/reports/longform-fixture");
+ await page.goto(urls.section("reports/longform-fixture", "notes"));
await expect(page.locator("[data-note=coverage]")).toContainText("well over one hundred and twenty");
await expect(page.locator("[data-note-file='build-notes.md']")).toBeVisible();
await page.locator("[data-note-file='build-notes.md'] summary").click();
@@ -95,7 +97,7 @@ test("snapshot, then a window edit, then the diff shows that one change", async
expect(d.changes[0].from.end).toBe(12);
expect(d.changes[0].to.end).toBe(13);
- await page.goto(`/browse/${project}`);
+ await page.goto(urls.section(project, "revisions"));
const row = page.locator(`[data-snapshot="${rel}"]`);
await expect(row).toHaveAttribute("data-diff", "1");
await expect(row).toHaveAttribute("data-legacy", "0");
diff --git a/umtool/e2e/report-narration.spec.ts b/umtool/e2e/report-narration.spec.ts
@@ -3,6 +3,7 @@ import { execFileSync, spawnSync } from "node:child_process";
import { existsSync, readFileSync, readdirSync } from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
+import * as urls from "./urls";
// ---------------------------------------------------------------------------
// A narrated card (release 25, T2), built through the driver.
@@ -110,7 +111,7 @@ test("a narrated card speaks, its length is the narration's, the plain card is s
// ---------------------------------------------------------------------------
test("the export row renders the cut as a podcast and offers the files", async ({ page, request }) => {
- await page.goto("/browse/reports/narration-fixture");
+ await page.goto(urls.section("reports/narration-fixture", "exports"));
const row = page.locator('[data-export-variant="sourced"]');
const podcast = row.locator('[data-podcast="sourced"]');
await expect(podcast.getByRole("button", { name: "podcast" })).toBeVisible();
diff --git a/umtool/e2e/report-tag-via-editor.spec.ts b/umtool/e2e/report-tag-via-editor.spec.ts
@@ -2,6 +2,7 @@ import { test, expect } from "@playwright/test";
import { readFileSync } from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
+import * as urls from "./urls";
// ---------------------------------------------------------------------------
// "Tag cited videos as …" — handing a walked report's judgement to the archive.
@@ -117,7 +118,7 @@ test("a section is its own scope, and the control on the project page uses it",
// And through the page, which is where an operator actually does it.
const asksBeforeUi = tagAsks().length;
- await page.goto(`/browse/${PROJECT}`);
+ await page.goto(urls.section(PROJECT, "tag"));
const control = page.locator("[data-tag-cited]");
await expect(control).toBeVisible();
await control.locator("[data-tag-cited-tag]").selectOption("eva-collab");
diff --git a/umtool/e2e/takes.spec.ts b/umtool/e2e/takes.spec.ts
@@ -2,6 +2,7 @@ import { test, expect } from "@playwright/test";
import { readFileSync } from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
+import * as urls from "./urls";
// ---------------------------------------------------------------------------
// Takes: alternative renders of part of a cut, side by side, judged.
@@ -22,12 +23,12 @@ test("a project with no takes/ says so, and its page has no takes link", async (
expect(res?.status()).toBe(200);
await expect(page.locator("[data-takes-empty]")).toContainText("No takes yet");
- await page.goto("/browse/reports/report-fixture");
+ await page.goto(urls.section("reports/report-fixture", "takes"));
await expect(page.locator("[data-takes-link]")).toHaveCount(0);
});
test("takes are grouped and ordered; the skipped one says why; a work dir is not a take", async ({ page }) => {
- await page.goto("/browse/reports/takes-fixture");
+ await page.goto(urls.section("reports/takes-fixture", "takes"));
const link = page.locator("[data-takes-link]");
await expect(link).toHaveAttribute("data-takes-link", "4");
await link.click();
diff --git a/umtool/e2e/timeline-edit.spec.ts b/umtool/e2e/timeline-edit.spec.ts
@@ -2,6 +2,7 @@ import { test, expect, type Page } from "@playwright/test";
import { copyFileSync, existsSync, readFileSync, readdirSync, rmSync, writeFileSync } from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
+import * as urls from "./urls";
// ---------------------------------------------------------------------------
// Structural edits to a report video (lib/report/manifest.mjs "STRUCTURE",
@@ -20,7 +21,7 @@ const HERE = path.dirname(fileURLToPath(import.meta.url));
const DIR = path.join(HERE, "..", ".e2e-song", "reports", "timeline-fixture");
const MANIFEST = path.join(DIR, "video.manifest.json");
const PRISTINE = path.join(DIR, "video.manifest.pristine");
-const PAGE = "/browse/reports/timeline-fixture";
+const PROJECT = "reports/timeline-fixture";
type Entry = Record<string, unknown> & { id: string };
const manifest = () => JSON.parse(readFileSync(MANIFEST, "utf8")) as { timeline: Entry[]; posts?: Entry[]; render: Record<string, unknown> };
@@ -37,9 +38,11 @@ test.beforeEach(() => {
rmSync(path.join(DIR, "notes.json"), { force: true });
});
-async function open(page: Page) {
- await page.goto(PAGE);
- await expect(page.getByTestId("timeline-undo")).toBeEnabled();
+/** The project page on the tab that holds `name`: the timeline (the Cut), or the on-screen panel's structure editors (Build). */
+async function open(page: Page, name: "timeline" | "onscreen" = "timeline") {
+ await page.goto(urls.section(PROJECT, name));
+ if (name === "timeline") await expect(page.getByTestId("timeline-undo")).toBeEnabled();
+ else await expect(page.getByTestId("structure-folded")).toBeVisible();
// The list has read its token once the page is hydrated.
await page.waitForLoadState("networkidle");
}
@@ -94,7 +97,7 @@ test("the row menu duplicates, removes, inserts — and a refusal is in the buil
});
test("the teaser's lines and beat, edited in place; an empty teaser is refused", async ({ page }) => {
- await open(page);
+ await open(page, "onscreen");
await page.getByTestId("structure-folded").locator("summary").click();
await page.getByTestId("teaser-lines-t1").fill("THE PROMISE\nAND WHAT HAPPENED");
await page.getByTestId("teaser-beat-t1").fill("1.2");
@@ -113,7 +116,7 @@ test("a post added, then removed; the fact-check's labels once the deck is on",
m.render.chrome = { engine: "hyperframes", layout: "deck" };
writeFileSync(MANIFEST, JSON.stringify(m, null, 2) + "\n");
- await open(page);
+ await open(page, "onscreen");
await page.getByTestId("structure-folded").locator("summary").click();
await page.getByTestId("post-add").click();
const fresh = page.locator("[data-post-row='new']");
diff --git a/umtool/e2e/video-notes.spec.ts b/umtool/e2e/video-notes.spec.ts
@@ -2,6 +2,7 @@ import { test, expect, type Locator, type Page } from "@playwright/test";
import { copyFileSync, existsSync, readFileSync, rmSync } from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
+import * as urls from "./urls";
// ---------------------------------------------------------------------------
// Notes on a report video (lib/annotations, components/notes):
@@ -67,7 +68,7 @@ test("the generated banner is on the project page and the clip bench", async ({
});
test("a timed note on the built cut resolves to the entry on screen and its source", async ({ page }) => {
- await page.goto(PAGE);
+ await page.goto(urls.section(PROJECT, "onscreen"));
const video = page.getByTestId("onscreen-final-video");
await expect(video).toBeVisible();
const scope = page.locator("[data-timed-notes='out/video-notes-fixture.mp4']");
@@ -139,7 +140,7 @@ test("an edit to a generated manifest leaves one edit note, coalesced, gone when
});
test("a row note on the project page, counted on the row and kept across a reload", async ({ page }) => {
- await page.goto(PAGE);
+ await page.goto(urls.section(PROJECT, "timeline"));
const row = page.locator("[data-anchored-notes='n02']");
await row.locator("[data-action='toggle-notes']").click();
await page.getByTestId("note-input-n02").fill("check the date on this one");