commit a7b7f91ec8c22170008a0d496c5045310d75a853
parent 85d78abed2a8abae8ad317516907dc963c23c6ed
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Wed, 18 Nov 2026 03:17:58 -0500
x-trending e2e: create-channel takes the slug beside the fields; the page's re-render gets time
The new spec posted the slug inside fields (refused), and waited the default five seconds for the channel page to re-render after a judgement and a watch switch.
Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat:
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/editor/e2e/x-trending.spec.ts b/editor/e2e/x-trending.spec.ts
@@ -196,7 +196,7 @@ test("an X trending library: judgements, a watch tick, media kept once, gone fro
topics: { id: string; watch?: { on: boolean; ticks: number; paused?: { reason: string }; sentence: string } }[];
posts: { id: string; gone?: { at: string }; capture?: { files: number; mediaState: string }; judgement?: { state: string; by: string } }[];
};
- const made = await post("create-channel", { fields: { name: "Trending", slug: SLUG, handling: "transcribe", platform: "x-trending" } });
+ const made = await post("create-channel", { slug: SLUG, fields: { name: "Trending", handling: "transcribe", platform: "x-trending" } });
expect(made.status, JSON.stringify(made.json)).toBe(200);
expect((await post("read-x-trending", { slug: SLUG, url: FIXTURE_TREND_URL, topic: "Kettle Festival" })).status).toBe(200);
await expect.poll(archiveLines, { timeout: 60_000 }).toBe(4);
@@ -211,7 +211,8 @@ test("an X trending library: judgements, a watch tick, media kept once, gone fro
const topic = page.locator('[data-x-trending-topic="kettle-festival"]');
await expect(topic.locator(`[data-x-trending-post="${A}"] [data-x-trending-judgement="keep"]`)).toContainText("keep by agent: the opening");
await page.getByRole("button", { name: `Drop ${B}`, exact: true }).click();
- await expect(topic.locator(`[data-x-trending-post="${B}"] [data-x-trending-judgement="drop"]`)).toContainText("drop by operator");
+ // (The page re-renders after the action: allow it more than the default wait.)
+ await expect(topic.locator(`[data-x-trending-post="${B}"] [data-x-trending-judgement="drop"]`)).toContainText("drop by operator", { timeout: 30_000 });
// An agent's judgement never replaces the operator's.
const over = await post("judge-trending", { slug: SLUG, archive: false, set: [{ id: B, state: "keep" }] });
expect(over.json).toMatchObject({ written: [], skipped: [{ id: B, reason: "judged by the operator: an agent's judgement does not replace it" }] });
@@ -219,7 +220,7 @@ test("an X trending library: judgements, a watch tick, media kept once, gone fro
// WATCH the topic, from the page.
await topic.getByRole("button", { name: "Watch", exact: true }).click();
- await expect(topic.locator("[data-x-trending-watch-state]")).toContainText("Watched every 30 min until");
+ await expect(topic.locator("[data-x-trending-watch-state]")).toContainText("Watched every 30 min until", { timeout: 30_000 });
await expect(topic).toContainText("it does not cover a night nobody refreshes in");
expect((await listing()).topics[0].watch).toMatchObject({ on: true, ticks: 0 });