Signals in a folder of their own in the feed list, as an OPML's feeds are (#255)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -11,7 +11,8 @@ test('the page loads and lists the configured feeds', async ({ page }) => {
|
||||
// Regression: a ReferenceError in the script left the shell rendered and the sidebar
|
||||
// empty, with every handler below the error dead. Server-side checks all passed.
|
||||
// Four top-level feeds in the fixture config; the OPML's children are inside a closed folder.
|
||||
await expect(page.locator('.feed')).toHaveCount(5, { timeout: 15_000 });
|
||||
// The Signals folder is above them, and no feed.
|
||||
await expect(page.locator('.feed:not(.sigs)')).toHaveCount(5, { timeout: 15_000 });
|
||||
await expect(page.locator('.feed', { hasText: 'Test Show' })).toBeVisible();
|
||||
const errors = [];
|
||||
page.on('pageerror', e => errors.push(e.message));
|
||||
@@ -403,7 +404,8 @@ test('an OPML subscription is a collapsible folder', async ({ page }) => {
|
||||
// Only a folder has a triangle, and it is a button that says whether the folder is open.
|
||||
const chev = page.locator('.feed.group .chev');
|
||||
await expect(chev).toBeVisible({ timeout: 20_000 });
|
||||
await expect(page.locator('.feed:not(.group) .chev')).toHaveCount(0);
|
||||
// The Signals folder is a folder too (#255).
|
||||
await expect(page.locator('.feed:not(.group):not(.sigs) .chev')).toHaveCount(0);
|
||||
await expect(chev).toHaveAttribute('aria-expanded', 'false');
|
||||
|
||||
// Closed by default: the children are not listed until the folder is opened.
|
||||
@@ -1141,7 +1143,7 @@ test('one action, one icon: the toolbar, the page and every dialog agree', async
|
||||
() => page.locator('#content .acts [data-a="settings"]').click(),
|
||||
() => page.locator('#content .acts [data-a="dl"]').click(),
|
||||
() => page.locator('#content .acts [data-a="rm"]').click(),
|
||||
() => page.locator('#feedlist .place', { hasText: 'New signal' }).click(),
|
||||
async () => { await page.locator('#feedlist .sigs').click(); await page.locator('#content .acts [data-a="new"]').click(); },
|
||||
];
|
||||
for (const open of dialogs) {
|
||||
await open();
|
||||
@@ -2076,12 +2078,14 @@ test('a Signal holds the items Jev says fit its keywords, read where they are re
|
||||
const { id: feed } = await (await page.request.post('/api/feeds', { data: { url: 'http://127.0.0.1:8792/signal.xml' } })).json();
|
||||
await page.reload();
|
||||
|
||||
await page.locator('#feedlist .place', { hasText: 'New signal' }).click();
|
||||
// A folder, closed until opened, as an OPML's is (#255).
|
||||
await page.locator('#feedlist .sigs .chev').click();
|
||||
await page.locator('#feedlist .feed', { hasText: 'New signal' }).click();
|
||||
await page.locator('#sgname').fill('F1');
|
||||
await page.locator('#sgkwin').fill('monaco');
|
||||
await page.keyboard.press('Enter');
|
||||
await page.locator('#sgsave').click();
|
||||
const row = page.locator('#feedlist .place', { hasText: 'F1' });
|
||||
const row = page.locator('#feedlist .feed.child', { hasText: 'F1' });
|
||||
await expect(row).toHaveClass(/sel/);
|
||||
|
||||
const signals = async () => (await (await page.request.get('/api/signals')).json());
|
||||
|
||||
Reference in New Issue
Block a user