Mark all read on an OPML subscription
Marking the subscription read did nothing: its own row holds no entries. read-all now resolves the feeds grouped under the id -- via subscriptions(), so a child promoted to config is included -- and marks those. Button sits before Unsubscribe, where every other feed keeps it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AdXho5tTkjFLeUXKbEjKBh
This commit is contained in:
@@ -189,3 +189,21 @@ test('an OPML subscription is a collapsible folder', async ({ page }) => {
|
||||
await page.locator('.feed', { hasText: 'Test Subscriptions' }).first().click();
|
||||
await expect(page.locator('.childrow')).toHaveCount(1);
|
||||
});
|
||||
|
||||
test('marking an OPML subscription read covers the feeds inside it', async ({ page }) => {
|
||||
await page.evaluate(() =>
|
||||
fetch('/api/fetch', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ feed: 'test-subscriptions', force: true }),
|
||||
}));
|
||||
|
||||
// The folder's own row has no entries, so anything it marks read came from its child.
|
||||
const folder = page.locator('.feed', { hasText: 'Test Subscriptions' }).first();
|
||||
await expect(folder).toBeVisible({ timeout: 20_000 });
|
||||
await expect(folder.locator('.badge')).not.toHaveText('0');
|
||||
await folder.click();
|
||||
|
||||
await page.locator('#content .acts button', { hasText: 'Mark all read' }).click();
|
||||
await expect(folder.locator('.badge')).toHaveText('0');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user