WordPress / WordPress/openverse
Use saved external network responses during Playwright tests
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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