From 19097ed6e15a9cba693d14299fc368c695e7591c Mon Sep 17 00:00:00 2001 From: Vito Sansevero Date: Mon, 26 Oct 2026 08:27:30 -0700 Subject: [PATCH] test(browser): poll the import review's rows instead of reading them once gridOf reads the dialog's rows once; right after the click the review may not have rendered them yet (firefox CI: received undefined). --- tests/browser/workspace-system-integrations.spec.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/browser/workspace-system-integrations.spec.mjs b/tests/browser/workspace-system-integrations.spec.mjs index 47358efb..f8ee02c2 100644 --- a/tests/browser/workspace-system-integrations.spec.mjs +++ b/tests/browser/workspace-system-integrations.spec.mjs @@ -381,7 +381,8 @@ test('saved pairs block the import: the review explains it and offers only Close await openIntegrations(page); await enable(page); await layoutOf(page).getByRole('button', { name: 'Review import', exact: true }).click(); - expect((await gridOf(page))[2]).toEqual(['Protected', '1 imported prompt used by saved pairs']); + // gridOf reads once; poll until the review has rendered its rows. + await expect.poll(async () => (await gridOf(page))[2]).toEqual(['Protected', '1 imported prompt used by saved pairs']); await expect(dialog(page).locator('p.small')).toHaveText( 'Delete or change the saved pairs that use these prompts, then review the import again. Nothing was changed.'); expect(await dialog(page).locator('.dialog-actions button').allTextContents()).toEqual(['Close']);