Skip to content

Commit

Permalink
Fix global audio test
Browse files Browse the repository at this point in the history
  • Loading branch information
obulat committed Aug 18, 2023
1 parent a8302bd commit 1018fca
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
dismissAnalyticsBanner,
languageDirections,
pathWithDir,
t,
} from "~~/test/playwright/utils/navigation"
import breakpoints from "~~/test/playwright/utils/breakpoints"
import audio from "~~/test/playwright/utils/audio"
Expand All @@ -21,7 +22,10 @@ for (const dir of languageDirections) {
)
const audioRow = await audio.getNthAudioRow(page, 2)
await audio.play(audioRow, dir)
await audio.pause(audioRow, dir)
await page
.locator(".global-track")
.getByRole("button", { name: t("playPause.pause", dir) })
.click()
// To make the tests consistent, set the played area to the same position
await page.mouse.click(170, 650)
await expectSnapshot(`global-audio-player-on-search-${dir}.png`, page)
Expand Down

0 comments on commit 1018fca

Please sign in to comment.