Give Currently Listening its own place, below Popular
It was a section at the bottom of the Popular page, so finding the episode you were halfway through meant opening a list of feeds first. It is a place in the feed list now, between Popular and All Subscriptions, with its own page and count. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -88,6 +88,7 @@ const drive = [
|
||||
['opmlModal', () => ctx.opmlModal()],
|
||||
['selectFeed (directory)', () => ctx.selectFeed(':directory')],
|
||||
['selectFeed (popular)', () => ctx.selectFeed(':popular')],
|
||||
['selectFeed (currently listening)', () => ctx.selectFeed(':listening')],
|
||||
['selectFeed (all subscriptions)', () => ctx.selectFeed(':all')],
|
||||
['logsModal', () => ctx.logsModal()],
|
||||
// `const S` is not reachable from here: top-level const/let do not become properties
|
||||
|
||||
@@ -155,7 +155,7 @@ test('an item with several enclosures lists them all', async ({ page }) => {
|
||||
await expect(page.locator('#files .encbox').nth(1).locator('.kind[title^="image"]')).toBeVisible();
|
||||
});
|
||||
|
||||
test('Currently Listening, below Popular, resumes an episode you started', async ({ page }) => {
|
||||
test('Currently Listening, its own place below Popular, resumes an episode you started', async ({ page }) => {
|
||||
// Second Episode (900s) is 42 seconds in and unfinished. Which of Test Show's two episodes
|
||||
// the daemon auto-downloaded is not fixed (see the three-panes test above), so an earlier
|
||||
// test may have opened -- and so read -- this one already; reset it before relying on it.
|
||||
@@ -164,7 +164,14 @@ test('Currently Listening, below Popular, resumes an episode you started', async
|
||||
await page.evaluate(() =>
|
||||
api('/api/entries/test-show/ui-2/position', { method: 'POST', body: JSON.stringify({ secs: 42 }) }));
|
||||
|
||||
// Popular lists feeds and nothing else; the episodes have a place of their own under it.
|
||||
await page.locator('#feedlist .place', { hasText: 'Popular' }).click();
|
||||
await expect(page.locator('#popular')).toBeVisible();
|
||||
await expect(page.locator('#listening')).toHaveCount(0);
|
||||
const places = await page.locator('#feedlist .place b').allTextContents();
|
||||
expect(places.indexOf('Currently Listening')).toBe(places.indexOf('Popular') + 1);
|
||||
|
||||
await page.locator('#feedlist .place', { hasText: 'Currently Listening' }).click();
|
||||
const row = page.locator('#listening .childrow', { hasText: 'Second Episode' });
|
||||
await expect(row).toBeVisible({ timeout: 20_000 });
|
||||
await expect(row).toContainText('0:42 of 15:00');
|
||||
@@ -177,7 +184,7 @@ test('Currently Listening, below Popular, resumes an episode you started', async
|
||||
// Finished (read) drops it from the list, however far it got.
|
||||
await page.evaluate(() =>
|
||||
api('/api/entries/test-show/ui-2/flags', { method: 'POST', body: JSON.stringify({ read: true }) }));
|
||||
await page.locator('#feedlist .place', { hasText: 'Popular' }).click();
|
||||
await page.locator('#feedlist .place', { hasText: 'Currently Listening' }).click();
|
||||
await expect(page.locator('#listening')).not.toContainText('Second Episode', { timeout: 20_000 });
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user