first commit
This commit is contained in:
@@ -298,5 +298,28 @@ test('a second person has their own feeds and their own read state', async ({ br
|
||||
await page.locator('.tabs button', { hasText: 'Unread' }).click();
|
||||
await expect(page.locator('.ep')).toHaveCount(rows);
|
||||
|
||||
// Two people now share this feed, so the page says so and Delete is honest about it.
|
||||
await expect(page.locator('#content .sub').first()).toContainText('shared with 1 other person');
|
||||
|
||||
await ctx.close();
|
||||
});
|
||||
|
||||
test('deleting a shared file warns that it is everyone\'s copy', async ({ page }) => {
|
||||
// Admin and Sam both subscribe to Test Show by now; the daemon downloaded one file.
|
||||
await page.getByText('Test Show').click();
|
||||
await page.locator('.tabs button', { hasText: 'Downloaded' }).click();
|
||||
const row = page.locator('.ep').first();
|
||||
await expect(row).toBeVisible({ timeout: 20_000 });
|
||||
await row.click();
|
||||
|
||||
const del = page.locator('#detail button', { hasText: 'Delete' });
|
||||
await expect(del).toHaveText(/Delete for everyone/);
|
||||
|
||||
// First prompt: the browser confirm. Say yes, then decline the server's warning, and
|
||||
// the file must still be there.
|
||||
page.once('dialog', d => d.accept());
|
||||
const second = new Promise(resolve => page.once('dialog', d => { resolve(d.message()); d.dismiss(); }));
|
||||
await del.click();
|
||||
expect(await second).toContain('one copy of this file');
|
||||
await expect(page.locator('#detail button', { hasText: 'Delete' })).toBeVisible();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user