Skip to content

Commit

Permalink
Remove focused playwright test so all tests run; fix broken tests (#2194
Browse files Browse the repository at this point in the history
)

* Revert PW changes from #1920

* Try removing only

* Try removing only

* Fix url path matching in "should allow toggling audio playback via play/pause click" test

---------

Co-authored-by: Zack Krida <zackkrida@pm.me>
  • Loading branch information
obulat and zackkrida authored May 25, 2023
1 parent 08837a8 commit 8cbe4e3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions frontend/test/playwright/e2e/all-results-keyboard.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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()
Expand Down

0 comments on commit 8cbe4e3

Please sign in to comment.