commit 31d49fcfaa8144bd562e4a029cdc478279b11154
parent fb56252b86759192defc551b3f17b4e1bd9924b1
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Wed, 4 Nov 2026 01:16:39 -0500
umtool e2e: thread-reads waits for the card page to take the state Play is at (each tick applies it) before reading a tile's transform
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/umtool/e2e/thread-reads.spec.ts b/umtool/e2e/thread-reads.spec.ts
@@ -85,6 +85,7 @@ test("NEVER NARRATE HIDDEN TEXT, in Play: the post it answers in full and lit wh
const blocks = await frame.locator('[data-thread-tile="parent:0"] [data-post-block]').evaluateAll((els) => els.map((el) => el.getAttribute("data-post-block")));
expect(blocks[part]).toBe(k);
await expect(player).toHaveAttribute("data-post-thread-tiles", /parent:0=1\/1 post=1\/0/);
+ await expect.poll(async () => (await tileOf(frame, "post")).opacity).toBe("0");
const t = await tileOf(frame, "parent:0");
expect(t.state).toBe("focus");
expect(t.transform).toBe("");
@@ -107,7 +108,7 @@ test("THE REPLY COMES IN: as his first part starts the parent shrinks and dims (
expect(Number(sc)).toBeGreaterThan(0.62);
expect(Number(sc)).toBeLessThan(1);
expect(Number(op)).toBeLessThan(1);
- expect((await tileOf(frame, "parent:0")).transform).toMatch(/^scale\(0\.\d+\)$/);
+ await expect.poll(async () => (await tileOf(frame, "parent:0")).transform).toMatch(/^scale\(0\.\d+\)$/);
if (SHOTS) await page.screenshot({ path: path.join(SHOTS, "thread-transition.png") });
}
for (const [at, part] of [[12.5, 0], [16, 1]] as const) {
@@ -116,9 +117,10 @@ test("THE REPLY COMES IN: as his first part starts the parent shrinks and dims (
const k = await player.getAttribute("data-post-follow-block");
const mine = await frame.locator('[data-thread-tile="post"] [data-post-block]').evaluateAll((els) => els.map((el) => el.getAttribute("data-post-block")));
expect(mine[part]).toBe(k);
+ // The page set to the state Play is at (each tick applies it).
+ await expect.poll(async () => (await tileOf(frame, "parent:0")).transform).toBe("scale(0.62)");
const parent = await tileOf(frame, "parent:0");
expect(parent.state).toBe("context");
- expect(parent.transform).toBe("scale(0.62)");
expect(parent.opacity).toBe("0.5");
await expect.poll(async () => (await inWindow(frame, k!)).op).toBe("");
const b = await inWindow(frame, k!);