diff --git a/web/tests/e2e/monitoring-executions.spec.ts b/web/tests/e2e/monitoring-executions.spec.ts index 6e253bad6..8d33cbf13 100644 --- a/web/tests/e2e/monitoring-executions.spec.ts +++ b/web/tests/e2e/monitoring-executions.spec.ts @@ -445,9 +445,20 @@ test('remembers all filters on reload and persists resetting them', async ({ for (const [id, label] of selections) { await page.locator(`#monitoring-filter-${id}`).click(); if (id === 'processor') { - await page.getByRole('checkbox', { name: label, exact: true }).check(); + const checkbox = page.getByRole('dialog').getByRole('checkbox', { + name: label, + exact: true, + }); + await checkbox.check(); + await expect(checkbox).toBeChecked(); await page.keyboard.press('Escape'); - } else await page.getByRole('option', { name: label, exact: true }).click(); + await expect(page.getByRole('dialog')).toHaveCount(0); + } else { + await page.getByRole('option', { name: label, exact: true }).click(); + await expect(page.getByRole('listbox')).toHaveCount(0); + } + // The previous popup must finish restoring focus before opening another. + await expect(page.locator(`#monitoring-filter-${id}`)).toBeFocused(); } await page.reload(); for (const [id, label] of selections) {