chore(ci): fix update screenshot action to account for existing screenshot #25190
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.
Pull request checklist
Please check if your PR fulfills the following requirements:
npm run build
) was run locally and any changes were pushednpm run lint
) has passed locally and any fixes were made for failuresPull request type
Please check the type of change your PR introduces:
The update screenshots test had an issue where updating existing screenshots (as opposed to adding new screenshots) was not working as intended.
Given two test runner:
Runner A that updates Screenshot 1
Runner B that updates Screenshot 2
When the results from Runner A were added to the project, we got an updated Screenshot 1 and the old Screenshot 2.
When the results from Runner B were added to the project, we got an updated Screenshot 2 and an old Screenshot 1. The result is that the updated Screenshot 1 was overwritten by the old Screenshot 1 that got added from Runner B.
This new approach ensures that only the changed screenshots per-runner are added to the archive. The directory structure is preserved, so unzipping and moving the screenshots should allow screenshots to be merged without any conflicts.
Does this introduce a breaking change?
Other information