Skip to content

Commit

Permalink
fix: added extra check to testFilterPresence (#4068)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpaten committed Jul 8, 2024
1 parent 8d05847 commit 720a47e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion explorer/e2e/testFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,17 @@ export async function testFilterPresence(
page: Page,
tab: TabDescription
): Promise<void> {
// Goto the selected tab
await page.goto(tab.url);
await expect(page.getByRole("tab").getByText(tab.tabName)).toBeVisible();
for (const filter of anvilFilters) {
await page.getByText(filter_regex(filter)).click(); // maybe should select a random one instead;
// Check that each filter is visible and clickable
await expect(page.getByText(filter_regex(filter))).toBeVisible();
await page.getByText(filter_regex(filter)).click();
await expect(page.getByRole("checkbox").first()).not.toBeChecked();
// Check that clicking out of the filter menu causes it to disappear
await page.locator("body").click();
await expect(page.getByRole("checkbox")).toHaveCount(0);
}
}

Expand Down

0 comments on commit 720a47e

Please sign in to comment.