fix(review): #90 clearer mandatory-photo indicator (padlock + REQUIRED tag)
The mandatory clean-cal and dimension-overlay photos now show a padlock glyph in their keep box and an amber REQUIRED tag at the top of the card, so the owner can see at a glance which photos cannot be removed (vs. optional batch photos, which keep a plain checkmark).
This commit is contained in:
@@ -213,12 +213,18 @@ test.describe('M3 Review photo strip (#90)', () => {
|
||||
expect(bgImage).toContain('45deg');
|
||||
|
||||
// Mandatory photos: the clean calibration (seq 1) and the dimension-overlay
|
||||
// copy (seq 2) are required — their keep checkbox is checked AND disabled.
|
||||
// copy (seq 2) are required — their keep checkbox is checked AND disabled,
|
||||
// and a REQUIRED tag marks them.
|
||||
await expect(cards.nth(0)).toHaveAttribute('data-required', 'true');
|
||||
await expect(cards.nth(1)).toHaveAttribute('data-required', 'true');
|
||||
await expect(cards.nth(2)).toHaveAttribute('data-required', '');
|
||||
await expect(cards.nth(0)).toHaveAttribute('aria-pressed', 'true');
|
||||
await expect(cards.nth(1)).toHaveAttribute('aria-pressed', 'true');
|
||||
await expect(cards.nth(0)).toHaveAttribute('aria-disabled', 'true');
|
||||
await expect(cards.nth(1)).toHaveAttribute('aria-disabled', 'true');
|
||||
await expect(cards.nth(2)).toHaveAttribute('aria-disabled', 'false');
|
||||
// Two REQUIRED tags (cal + overlay), none on the batch photo.
|
||||
await expect(page.getByText('REQUIRED', { exact: true })).toHaveCount(2);
|
||||
|
||||
// Tapping a mandatory photo is a no-op: it stays checked + primary (can't remove).
|
||||
// The card is aria-disabled, so force the click to exercise the handler directly.
|
||||
|
||||
Reference in New Issue
Block a user