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');