Skip to content

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.

Remove focused playwright test so all tests run; fix broken tests (#2194)

Olga Bulat8cbe4e32fff6
diff --git a/frontend/test/playwright/e2e/all-results-keyboard.spec.ts b/frontend/test/playwright/e2e/all-results-keyboard.spec.ts
index c248d8c0a..ab1eb3855 100644
--- a/frontend/test/playwright/e2e/all-results-keyboard.spec.ts
+++ b/frontend/test/playwright/e2e/all-results-keyboard.spec.ts
@@ -59,7 +59,7 @@ test.describe("all results grid keyboard accessibility test", () => {
)
})
- test.only("should open audio results as links", async ({ page }) => {
+ test("should open audio results as links", async ({ page }) => {
await walkToType("audio", page)
await page.keyboard.press("Enter")
await page.waitForURL(
@@ -83,8 +83,13 @@ test.describe("all results grid keyboard accessibility test", () => {
const focusedResult = await locateFocusedResult(page)
const playButton = await audio.getInactive(focusedResult)
await playButton.click()
+
+ // Get the path for comparison purposes
+ const url = new URL(page.url())
+ const path = url.pathname + url.search
+
// should not navigate
- expect(page.url()).toMatch(/\/search\?q=birds$/)
+ expect(path).toMatch(/\/search\/?\?q=birds$/)
const pauseButton = await audio.getActive(focusedResult)
pauseButton.click()