From 5b2c21bdafe6d57d37bc275b076026f5adf6eb31 Mon Sep 17 00:00:00 2001 From: Vito Date: Fri, 23 Oct 2026 03:03:38 -0700 Subject: [PATCH] test(annotations): capture the details panel after it has loaded (#292) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "Tag opens the dialog without selecting the card" read the panel while it still said "Loading file details…", then compared it with the same card's finished details. On a slow WebKit runner the read raced the load. --- tests/browser/workspace-tagging.spec.mjs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/browser/workspace-tagging.spec.mjs b/tests/browser/workspace-tagging.spec.mjs index 06d24a6..15de079 100644 --- a/tests/browser/workspace-tagging.spec.mjs +++ b/tests/browser/workspace-tagging.spec.mjs @@ -340,6 +340,9 @@ test('Tag opens the dialog without selecting the card', async ({ page }) => { const panel = page.getByRole('complementary', { name: 'Selected image details', exact: true }); await page.goto(images); await expect(card(page, FIRST)).toHaveClass(/\bselected\b/); + // Capture the panel once it shows the first card's details, not while it is still reading them. + await expect(panel.getByRole('heading', { level: 2 })).toBeVisible(); + await expect(panel).not.toContainText('Loading file details'); const before = await panel.innerText(); await openTag(page, SECOND, { goto: false }); await page.keyboard.press('Escape');