This repository has been archived by the owner on Feb 22, 2023. It is now read-only.
Add descriptive names to e2e response tapes #1193
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes
Fixes #1050 by @sarayourfriend
Description
To make the end-to-end tests less flaky, we save the API responses and re-use them in subsequent tests. This way, the rendered pages use the same data, and should render the same result.
These responses are saved in
/test/tapes/
folder asresponse-<number>.json5
. When trying to fix the end-to-end tests on #1159, I had difficulties debugging. It is unclear, which files are changed when you run e2e tests with:update-tapes
.The main changes in this PR are in
test/proxy.js
file, and the rest of the 300+ file changes are just the renaming and date updates.This PR uses
requestType_mediaType_queryOrUuid_connectionHeader
pattern:thumb_audio_4f5c37fd-e6ba-4aa8-b06a-529aed468ca4_closed.json5
related_images_e9d97a98-621b-4ec2-bf70-f47a74380452_keep-alive.json5
search_images_q=243f6a8885a308d3.json5
detail_images_802d76cd-84cf-45bc-81ac-610331dab420.json5
While working on this PR, I noticed had the same url, but differed in their connection headers and compression. When I was saving only one out of these two variants, e2e tests were failing, so I added connection suffix to the tape file names.
I'm setting the priority here as 'high' because I can't get the e2e tests to pass in #1159 without this change.
Testing Instructions
The e2e tests in CI should pass.
If you run
pnpm test:playwright:update-tapes
, the tests should pass, and no new tapes should be added.Checklist
Update index.md
).main
) or a parent feature branch.Developer Certificate of Origin
Developer Certificate of Origin