Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve flakiness in global audio player VR tests #3021

Merged
merged 4 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,25 @@ import audio from "~~/test/playwright/utils/audio"

for (const dir of languageDirections) {
breakpoints.describeXs(async ({ expectSnapshot }) => {
// https://github.com/WordPress/openverse/issues/3009
test.skip(`Global audio player on the search page - ${dir}`, async ({
test(`Global audio player on the search page - ${dir}`, async ({
page,
}) => {
await dismissTranslationBanner(page)
await dismissAnalyticsBanner(page)
await page.goto(
pathWithDir("/search/audio/?q=honey&length=shortest", dir)
)
const audioRow = await audio.getNthAudioRow(page, 2)
const audioRow = await audio.getNthAudioRow(page, 3)
await audio.play(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)
// Allow audio to buffer to the seeked position
// eslint-disable-next-line playwright/no-networkidle
await page.waitForLoadState("networkidle")
await expectSnapshot(`global-audio-player-on-search-${dir}.png`, page)
})
})
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.