commit e31d3ae0d0dc28c08cc527642a63716b346b1153
parent d712564b05d847d7a7cc7b33ae8b4b0ac2b72698
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Thu, 5 Nov 2026 10:45:22 -0500
umtool tests: the picture-only spec reads a tile's strength until it holds (Play may swap the card's frame in once more as it settles)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/umtool/e2e/picture-replies.spec.ts b/umtool/e2e/picture-replies.spec.ts
@@ -82,8 +82,9 @@ test("A PICTURE-ONLY PARENT has its own beat before his read: its GIF in its own
// Never over the slot.
await expect(page.locator('[data-post-panel="parent:0"]')).toHaveCount(0);
await expect(frame.locator("[data-post-slot]")).toHaveCount(0);
- expect(await opacityOf(frame, '[data-thread-tile="parent:0"]')).toBeGreaterThan(0.95);
- const pic = await frame.locator('[data-post-pic="parent:0"]').boundingBox();
+ // (The card's frame may be swapped in once more as Play settles: read again until it holds.)
+ await expect(async () => expect(await opacityOf(frame, '[data-thread-tile="parent:0"]')).toBeGreaterThan(0.95)).toPass({ timeout: 10_000 });
+ const pic = await frame.locator('[data-post-pic="parent:0"]').boundingBox({ timeout: 10_000 });
expect(pic && pic.width > 300 && Math.abs(pic.width / pic.height - 16 / 9) < 0.05, "at the tile's width, its aspect kept").toBe(true);
if (SHOTS) await page.screenshot({ path: path.join(SHOTS, "picture-beat.png") });
}
@@ -92,8 +93,8 @@ test("A PICTURE-ONLY PARENT has its own beat before his read: its GIF in its own
const { player, frame } = await playAt(page, "p-41", 5);
await expect(player).not.toHaveAttribute("data-post-beat", /./);
await expect(page.locator('[data-post-panel="parent:0"]')).toHaveCount(0);
- await expect.poll(async () => opacityOf(frame, '[data-thread-tile="parent:0"]')).toBeLessThan(0.7);
- expect(await opacityOf(frame, '[data-thread-tile="post"]')).toBeGreaterThan(0.95);
+ await expect(async () => expect(await opacityOf(frame, '[data-thread-tile="parent:0"]')).toBeLessThan(0.7)).toPass({ timeout: 10_000 });
+ await expect(async () => expect(await opacityOf(frame, '[data-thread-tile="post"]')).toBeGreaterThan(0.95)).toPass({ timeout: 10_000 });
if (SHOTS) await page.screenshot({ path: path.join(SHOTS, "picture-read.png") });
}
});