Fix E2E test selector to scope clear button to org-selector parent

This commit is contained in:
amanape 2025-12-09 21:29:33 +04:00
parent cd94d1f9d2
commit 7b3c917f77

View File

@ -23,8 +23,11 @@ test("org selector should show all options when cleared", async ({ page }) => {
await expect(listbox).not.toBeVisible();
// Hover to reveal clear button and click it
// The clear button is within the org-selector's parent wrapper
await orgSelector.hover();
const clearButton = page.locator('button[data-visible="true"]');
const clearButton = orgSelector
.locator("..")
.locator('button[data-visible="true"]');
await clearButton.click();
// Click on the input to open the dropdown