WordPress / WordPress/openverse

Use saved external network responses during Playwright tests

Open
#548 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

💻 aspect: code 🟨 priority: medium 🧰 goal: internal improvement 🧱 stack: frontend
Dominant language
Python
Stars
380
Forks
290
Avg merge
3h 17m
Merged PRs (30d)
8

Description

Problem

To make sure that the Playwright tests are not affected by different search results, we use recorded network responses or block some requests (i.e., the audio requests). Currently, we use talkback proxy to record and playback the API requests. However, the external requests for images from providers are not proxied, and use the network. This makes the tests slower and flakier.

Description

We need to find a way of proxying the network requests that are still going through in Playwright tests.
talkback allows us to only proxy one host, so it's not possible to use it as is.

Alternatives

We could also block provider URLs in Playwright tests, and alter the single image page to fallback on the thumbnail (which comes from our API, and is saved by talkback). This might be a stop-gap solution for now, but it's not as flexible.

Additional context

Implementation

  • 🙋 I would be interested in implementing this feature.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Playwright test setup and the existing talkback proxy configuration. Identify the provider image requests that still reach the network, then verify that they use saved responses or an appropriate test fallback and that the Playwright tests remain deterministic without those external requests.

Written by the indexing model from the issue text.

Assessment

Tech stack
playwright
Domain
testing-qa
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.