Skip to content

Commit

Permalink
add filter tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MTRNord committed Apr 25, 2024
1 parent eca3b3f commit 6bc6dc7
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions tests/filters.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { test, expect } from '@playwright/test';

// We want to make sure that the ecosystem page has all the filters and they are clickable
test('can select filters on ecosystem pages', async ({ page }) => {
page.goto('/ecosystem/clients/');

// Check if platform filter works
await page.locator("#filter-platform").scrollIntoViewIfNeeded()
await page.locator("#filters-overlay").isHidden()
await page.locator("#filter-platform-menu").isHidden()
await page.locator("#filter-platform").click()
await page.locator("#filters-overlay").isVisible()
await page.locator("#filter-platform-menu").isVisible()

// Check if platform filter can be used
await page.locator("div.reset-links:nth-child(9) > button:nth-child(1)").click()
await page.locator("#filters-overlay").click()
const clients = await page.locator("#all-clients").all()
for (const client of clients) {
await client.isHidden()
}

await page.locator("#filter-platform").click()
await page.locator("div.reset-links:nth-child(9) > button:nth-child(2)").click()
await page.locator("#filters-overlay").click()
for (const client of clients) {
await client.isVisible()
}
});

0 comments on commit 6bc6dc7

Please sign in to comment.