Keep a show from an OPML when the OPML drops it (#280)
A show inside a subscribed OPML went when the OPML stopped listing it (orphaned only if it had downloads), and went for you when you left the OPML. Keep, in its settings, is a per-person flag on the subscription: when the OPML drops a kept show, or nobody subscribes to the OPML any more, it becomes a catalogue entry outside the OPML, taking the OPML's settings while it is there, and stays on the lists of those who kept it. Whoever had it only through the OPML loses it as before. Leaving the OPML yourself leaves what you kept on your list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -486,6 +486,43 @@ test('inside an OPML, feeds with unread items are listed first', async ({ page }
|
||||
await expect(page.locator('.childrow b')).toHaveText(want);
|
||||
});
|
||||
|
||||
test('a show inside an OPML can be kept, and only it', async ({ page }) => {
|
||||
await page.evaluate(() =>
|
||||
fetch('/api/fetch', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ feed: 'test-subscriptions', force: true }),
|
||||
}));
|
||||
const chev = page.locator('.feed.group .chev');
|
||||
await expect(chev).toBeVisible({ timeout: 20_000 });
|
||||
if (await chev.getAttribute('aria-expanded') === 'false') await chev.click();
|
||||
await page.locator('#feedlist').getByText('Aardvark Radio').click();
|
||||
await page.locator('#content .acts [data-a="settings"]').click();
|
||||
|
||||
// Saved settings on a show would stop it following the OPML's for later tests, so the save is
|
||||
// caught here and only what it would send is checked (#280).
|
||||
let sent = null;
|
||||
await page.route('**/api/feeds/*', (route) => {
|
||||
if (route.request().method() !== 'PATCH') return route.continue();
|
||||
sent = route.request().postDataJSON();
|
||||
return route.fulfill({ status: 204 });
|
||||
});
|
||||
const keep = page.locator('#skept');
|
||||
await expect(keep).not.toBeChecked();
|
||||
await expect(page.locator('#modalCard')).toContainText('Test Subscriptions stops listing it');
|
||||
await keep.check({ force: true });
|
||||
await page.locator('#ssave').click();
|
||||
await expect.poll(() => sent && sent.kept).toBe(true);
|
||||
await page.unroute('**/api/feeds/*');
|
||||
|
||||
// The OPML's own settings have no Keep.
|
||||
await page.keyboard.press('Escape');
|
||||
await page.locator('.feed', { hasText: 'Test Subscriptions' }).first().click();
|
||||
await page.locator('#content .acts [data-a="settings"]').click();
|
||||
await expect(page.locator('#modalCard')).toBeVisible();
|
||||
await expect(page.locator('#skept')).toHaveCount(0);
|
||||
});
|
||||
|
||||
test('marking an OPML subscription read covers the feeds inside it', async ({ page }) => {
|
||||
await page.evaluate(() =>
|
||||
fetch('/api/fetch', {
|
||||
|
||||
Reference in New Issue
Block a user