A pinned item's pin keeps its accent disc in the reader's floating actions (#480)
On a phone the floating actions (#456) make every button transparent so the frosted capsule shows through. That outranked the pinned button's accent background but not its colour, --ink, so the pin was drawn white on a light theme's capsule. Pinned keeps its accent there now. The #456 browser test checks the pinned button's background, and names the actions it expects instead of counting them: since Up Next an episode has a fourth, and the count passed only when the tests before it left an item without audio first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RqkrVAJFkEgz9cXG3jG1Zy
This commit is contained in:
@@ -2430,7 +2430,9 @@ test.describe('an item with no files, on a phone', () => {
|
||||
});
|
||||
const bar = page.locator('#detail .dfloat');
|
||||
await expect(bar.locator('#dback')).toBeVisible();
|
||||
await expect(bar.locator('.dacts [data-a]')).toHaveCount(3);
|
||||
// By name, not counted: an episode has Up Next's button too (#473), so the count depended on
|
||||
// which item the tests before had left first.
|
||||
for (const a of ['read', 'flag', 'share']) await expect(bar.locator(`.dacts [data-a="${a}"]`)).toBeVisible();
|
||||
await page.locator('#detail').evaluate(el => { el.scrollTop = 3000; });
|
||||
// Still at the top of the screen, not scrolled away with the title.
|
||||
for (const q of ['#dback', '.dacts']) expect((await bar.locator(q).boundingBox())!.y).toBeLessThan(80);
|
||||
@@ -2440,6 +2442,10 @@ test.describe('an item with no files, on a phone', () => {
|
||||
await flag.click();
|
||||
await expect(bar.locator('[data-a="flag"]')).not.toHaveAttribute('aria-pressed', was!);
|
||||
expect(await page.locator('#detail').evaluate(el => el.scrollTop)).toBeGreaterThan(2500);
|
||||
// Pinned, it keeps its accent disc in the bar: cleared like the others, its pin was drawn in the
|
||||
// colour meant for the accent, white on a light theme's capsule (#480).
|
||||
const pinned = bar.locator('[data-a="flag"][aria-pressed="true"]');
|
||||
if (was !== 'true') await expect(pinned).not.toHaveCSS('background-color', 'rgba(0, 0, 0, 0)');
|
||||
await bar.locator('[data-a="flag"]').click();
|
||||
await expect(bar.locator('[data-a="flag"]')).toHaveAttribute('aria-pressed', was!);
|
||||
await bar.locator('#dback').click();
|
||||
|
||||
Reference in New Issue
Block a user