diff --git a/CHANGELOG.md b/CHANGELOG.md index 33e1575..4bb5495 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -61,6 +61,8 @@ The long form, with what was wrong before and how it was found, is in ### Fixed +- Playing a file from the Files pane played it twice at once, in the pane and in the player bar. + The pane has a play button now, and the player bar is the only player. - The password box in Manage users was white in the dark theme. - An item with no date showed a stray dot in its details. - Escape did not close a dialog while the cursor was in one of its boxes, so Add feed, which opens diff --git a/tests/ui/app.spec.js b/tests/ui/app.spec.js index 1c7ef7f..bab2f5e 100644 --- a/tests/ui/app.spec.js +++ b/tests/ui/app.spec.js @@ -89,13 +89,13 @@ test('the three panes are there and the item text lands in the bottom one', asyn // its chip rather than assuming which episode the daemon happened to fetch. const downloaded = page.locator('.ep', { has: page.locator('.kind.here') }).first(); await downloaded.click(); - await expect(page.locator('#files audio')).toBeVisible(); + await expect(page.locator('#files [data-a="play"]')).toBeVisible(); await expect(page.locator('#files .encbox [title="Save to this computer"]')).toBeVisible(); // Selecting another item replaces the pane rather than stacking. await page.locator('.ep', { hasText: 'First Episode' }).click(); await expect(page.locator('#detail .dt')).toHaveText('First Episode'); - await expect(page.locator('#files audio')).toHaveCount(0); + await expect(page.locator('#files [data-a="play"]')).toHaveCount(0); }); test('a downloaded file that is not audio gets no player', async ({ page }) => { @@ -109,7 +109,7 @@ test('a downloaded file that is not audio gets no player', async ({ page }) => { await row.click(); await expect(page.locator('#detail .dt')).toHaveText('An Article'); - await expect(page.locator('#files audio')).toHaveCount(0); + await expect(page.locator('#files [data-a="play"]')).toHaveCount(0); // What it is and that it is here: one icon, green, with the words in its tooltip. await expect(page.locator('#files .encbox .kind.here')).toHaveAttribute('title', 'image, downloaded'); // Still offered as a file, just not as an episode: viewable and keepable. @@ -767,3 +767,14 @@ test('the item table sorts by any column, both ways, and remembers', async ({ pa await expect(page.locator('#eps .ep .size', { hasText: /\d/ }).first()).toBeVisible(); await expect(page.locator('#eps .ep .file', { hasText: /\d/ })).toHaveCount(0); }); + +test('play in the Files pane plays once, in the player bar', async ({ page }) => { + // Regression: the pane had an