fix(editor): say when a pinned tile is outside the search

A shown tile the search misses carries « Ne correspond pas à la
recherche » under its header (aria-describedby). The no-result notice
now needs no shown tile at all. Flip test watchers are stopped in
afterEach, so a failing assertion never leaves the setters patched.
This commit is contained in:
bchanot committed 2026-11-13 13:49:46 +01:00
1 parent c8109af719
commit b1fd8962ff
9 files changed
+148 -2

No files matched your search

@@ -486,6 +486,41 @@ test.describe('reference tiles, search, sort and add', () => {
).toBeVisible()
})
test('a tile edited out of the search stays after « Terminer », with its line, until the next search', async ({
page,
requests,
}) => {
test.setTimeout(150_000)
const { actor } = await open(page, sortShape)
requests.forbid(actor.account.email, actor.account.password)
await openTab(page, dict, 'references')
const bar = toolbar(page)
const notice = libraryRoot(page).getByTestId('editor-references-no-result')
await bar.search.fill('alpha')
await expect(headers(page)).toHaveCount(1)
await headers(page).first().click()
const tile = tileAt(page, 0)
await tile
.getByRole('button', { name: dict['editor.references.edit'] })
.click()
const citation = tile.getByLabel(dict['editor.reference.citation'])
await citation.fill('Autre titre')
await tile
.getByRole('button', {
name: dict['editor.references.done'],
exact: true,
})
.click()
await expect(
tile.getByText(dict['editor.references.outside_search']),
).toBeVisible()
await expect(notice).toHaveCount(0)
await expect(bar.clear).toBeVisible()
await bar.search.fill('alphab')
await expect(notice).toBeVisible()
await expect(headers(page)).toHaveCount(0)
})
test('a refused draft is never dropped silently by a read-only flip', async ({
page,
}) => {