From 08d35a4a816002bfe8ae8e434fd67310ed762a0d Mon Sep 17 00:00:00 2001 From: Sandro Date: Mon, 2 Nov 2026 11:30:08 +0100 Subject: [PATCH] test(e2e): pick the lock notice among the status elements The connection status at the profile is always shown now and also has role=status. Co-Authored-By: Claude Opus 5.5 --- e2e/lock.e2e.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/e2e/lock.e2e.mjs b/e2e/lock.e2e.mjs index 22e0772..5b8d7be 100644 --- a/e2e/lock.e2e.mjs +++ b/e2e/lock.e2e.mjs @@ -99,7 +99,7 @@ const main = async () => { await B.page.getByText('Darunter', { exact: true }).first().click(); await B.page.keyboard.press('Home'); await B.page.keyboard.press('Backspace'); - const notice = await waitFor(async () => B.page.getByRole('status').innerText(), 3000); + const notice = await waitFor(async () => B.page.getByRole('status').filter({ hasText: /bearbeitet/ }).first().innerText(), 3000); check(!!notice && /bearbeitet diesen Punkt gerade/.test(notice), `Hinweis statt halber Aktion: ${notice}`); await sleep(1500); const afterMerge = (await serverBlocks(admin, doc.id)).map((b) => b.content).sort(); @@ -133,7 +133,7 @@ const main = async () => { check(!!conflictShown, 'Konfliktkopie wird markiert angezeigt'); // The user's cursor is still in the original bullet (it holds the lock), so the admin may not overwrite it await A.page.getByRole('button', { name: 'Übernehmen' }).first().click(); - const refused = await waitFor(async () => A.page.getByRole('status').innerText(), 3000); + const refused = await waitFor(async () => A.page.getByRole('status').filter({ hasText: /bearbeitet/ }).first().innerText(), 3000); check(!!refused && /bearbeitet/.test(refused), `Übernehmen in einen fremd gesperrten Punkt wird verweigert: ${refused}`); // The user holding the original can accept once the copy's author (here a separate API client that never // renews its lease) no longer holds the copy, i.e. after at most 20 s