Skip to content

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

Resolve flakiness in global audio player VR tests (#3021)

Dhruv Bhanushali9e63905a9786
diff --git a/frontend/test/playwright/visual-regression/components/global-audio-player.spec.ts b/frontend/test/playwright/visual-regression/components/global-audio-player.spec.ts
index 1183b9737..211c86a85 100644
--- a/frontend/test/playwright/visual-regression/components/global-audio-player.spec.ts
+++ b/frontend/test/playwright/visual-regression/components/global-audio-player.spec.ts
@@ -12,8 +12,7 @@ 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)
@@ -29,6 +28,9 @@ for (const dir of languageDirections) {
.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)
})
})
diff --git a/frontend/test/playwright/visual-regression/components/global-audio-player.spec.ts-snapshots/global-audio-player-on-search-rtl-png-xs-linux.png b/frontend/test/playwright/visual-regression/components/global-audio-player.spec.ts-snapshots/global-audio-player-on-search-rtl-png-xs-linux.png
index f8b8e7f58..c71ca610a 100644
Binary files a/frontend/test/playwright/visual-regression/components/global-audio-player.spec.ts-snapshots/global-audio-player-on-search-rtl-png-xs-linux.png and b/frontend/test/playwright/visual-regression/components/global-audio-player.spec.ts-snapshots/global-audio-player-on-search-rtl-png-xs-linux.png differ