From cd326d1ec997ed8c7744aeaadaa57c4c61d69695 Mon Sep 17 00:00:00 2001 From: Ty Date: Mon, 21 Sep 2026 01:54:21 -0700 Subject: [PATCH] test(review): #90 assert Primary photo src is valid + checkerboard on strip Locks in the two live-bug fixes: the Primary (leftmost kept) photo's must be a real URL (blob: for an in-memory capture blob) and never empty/ "object Blob"; and each strip card must carry the gray checkerboard background matching the Capture lineup. --- frontend/tests/e2e/review-photo-strip.spec.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/frontend/tests/e2e/review-photo-strip.spec.ts b/frontend/tests/e2e/review-photo-strip.spec.ts index 6b8b71a..1473875 100644 --- a/frontend/tests/e2e/review-photo-strip.spec.ts +++ b/frontend/tests/e2e/review-photo-strip.spec.ts @@ -200,6 +200,18 @@ test.describe('M3 Review photo strip (#90)', () => { await expect(cards.nth(0)).toHaveAttribute('data-primary', 'true'); await expect(page.getByText('PRIMARY', { exact: true })).toHaveCount(1); + // Bug #1 regression: the primary photo's must be a valid URL + // (blob: for an in-memory capture blob), never empty or "object Blob". + const primaryImg = cards.nth(0).locator('img'); + await expect(primaryImg).not.toHaveAttribute('src', /object Blob|^$/); + const src = await primaryImg.getAttribute('src'); + expect(src && src.length > 4).toBeTruthy(); + + // Bug #2 regression: the card carries the gray checkerboard background + // (matching the Capture lineup), not a flat color. + const bgImage = await cards.nth(0).evaluate((el) => getComputedStyle(el).backgroundImage); + expect(bgImage).toContain('45deg'); + // Remove the primary (cal) → primary auto-promotes to the next leftmost (ov). await cards.nth(0).click(); await expect(cards.nth(0)).toHaveAttribute('aria-pressed', 'false');