The refresh button turns while its feed is checked (#78)
The feed events already put a spinner on the sidebar row, which a phone hides. The same state now sets scan-this (the open feed, or a feed in the open folder) and scan-any (any of your feeds) on <body>, and the refresh icons turn under them. On <body> because the feed page is redrawn as items come in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1443,3 +1443,20 @@ test('Share hands the feed, the item and the file to the share sheet', async ({
|
||||
{ title: 'Second Episode', url: expect.stringContaining('/ep1.mp3?2') },
|
||||
]);
|
||||
});
|
||||
|
||||
test('a refresh button turns while what it checks is being checked', async ({ page }) => {
|
||||
await page.locator('.feed', { hasText: 'Test Show' }).click();
|
||||
const spin = sel => page.locator(sel).evaluate(el => getComputedStyle(el).animationName);
|
||||
const btn = '.fhead [data-a=scan] .i';
|
||||
await expect(page.locator(btn)).toBeVisible();
|
||||
expect(await spin(btn)).toBe('none');
|
||||
await page.evaluate(() => setScanning('test-show', true));
|
||||
expect(await spin(btn)).toBe('ipxspin');
|
||||
expect(await spin('#scanAll .i')).toBe('ipxspin');
|
||||
// Another feed being checked turns the toolbar's, not this page's.
|
||||
await page.evaluate(() => { setScanning('test-show', false); setScanning('multi-show', true); });
|
||||
expect(await spin(btn)).toBe('none');
|
||||
expect(await spin('#scanAll .i')).toBe('ipxspin');
|
||||
await page.evaluate(() => setScanning('multi-show', false));
|
||||
expect(await spin('#scanAll .i')).toBe('none');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user