An x in a search box clears it (#291)
Once something is typed: at the box's right end, inside it. One click handler for every box, which clears it and fires its input event, so each box's own handler brings its list back whole. The browser's own x, drawn by some browsers and not others, gives way to it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1951,6 +1951,22 @@ test('a page brought back into view catches up with what was read elsewhere', as
|
||||
await expect(badge).toHaveText(String(before - 1));
|
||||
});
|
||||
|
||||
test('a search box has an x that clears it once something is typed', async ({ page }) => {
|
||||
// #291: inside the box, at its right end, and the list comes back whole.
|
||||
const box = page.locator('#feedFilter');
|
||||
const x = page.locator('.searchwrap .clearx');
|
||||
const all = await page.locator('#feedlist .feed').count();
|
||||
await expect(x).toBeHidden();
|
||||
await box.fill('zzz-nothing');
|
||||
await expect(x).toBeVisible();
|
||||
await expect(page.locator('#feedlist .feed')).toHaveCount(0);
|
||||
await x.click();
|
||||
await expect(box).toHaveValue('');
|
||||
await expect(box).toBeFocused();
|
||||
await expect(x).toBeHidden();
|
||||
await expect(page.locator('#feedlist .feed')).toHaveCount(all);
|
||||
});
|
||||
|
||||
test('a feed\'s settings say what downloads, take words as chips, and keep what is saved', async ({ page }) => {
|
||||
// The redesigned dialog (#167): the download choice, word chips, the fold, and a save that holds.
|
||||
const open = async () => {
|
||||
|
||||
Reference in New Issue
Block a user