Skip to content

Commit

Permalink
Fix filter test for firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
MTRNord committed Mar 1, 2025
1 parent 602f852 commit 3742e08
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions tests/filters.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,21 @@ test('can select filters on ecosystem pages', async ({ page }) => {
const allButton = page.getByRole('button', { name: 'all' })
await allButton.scrollIntoViewIfNeeded()
await allButton.click()
await page.locator("#filter-platform").click()
// Firefox somehow is very odd?! It doesn't click the button on the first try
await page.locator("#filter-platform").click({ clickCount: 2 })
await expect(page.locator("#filters-overlay")).toBeHidden()
await expect(page.locator("#filter-platform-menu")).toBeHidden()

const clients = await page.locator("#all-clients").all()
for (const client of clients) {
await expect(client).toBeHidden()
}

await page.locator("#filter-platform").click()
await page.getByRole('button', { name: 'none' }).click()
// Firefox tries to skip it?!
await page.locator("#filter-platform").click({ force: true })
const noneButton = page.getByRole('button', { name: 'none' })
await noneButton.scrollIntoViewIfNeeded()
await noneButton.click()
await page.locator("#filter-platform").click()
for (const client of clients) {
await expect(client).toBeVisible()
Expand Down

0 comments on commit 3742e08

Please sign in to comment.