Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-update snapshot tests if changing strings #20

Conversation

Mr0grog
Copy link
Member

@Mr0grog Mr0grog commented Feb 22, 2025

The special incantation to update snapshots is tough to remember and non-obvious to many folks who are just updating text copy in the app. This makes the CI workflow auto-update snapshot tests on pull requests (not other pushes) where there were changes to the english strings. It's possible this could make tests pass when they shouldn't (if other things that should not have changed were changed), so it also posts a comment to the PR if it had to update the snapshots that reminds a reviewer to check the snapshot changes.

The special incantation to update snapshots is tough to remember and non-obvious to many folks who are just updating text copy in the app. This makes the CI workflow auto-update snapshot tests on pull requests (not other pushes) where there were changes to the english strings. It's possible this could make tests pass when they shouldn't (if other things that should not have changed were changed), so it also posts a comment to the PR if it had to update the snapshots that reminds a reviewer to check the snapshot changes.
@Mr0grog Mr0grog force-pushed the text-edits-it-turns-out-you-need-to-regenerate-snapshots-a-lot-and-its-a-problem branch from 09c7767 to 542dc2e Compare February 22, 2025 00:44
@Mr0grog Mr0grog force-pushed the text-edits-it-turns-out-you-need-to-regenerate-snapshots-a-lot-and-its-a-problem branch from 5e3b6c3 to e24f593 Compare February 22, 2025 00:51
@Mr0grog Mr0grog force-pushed the text-edits-it-turns-out-you-need-to-regenerate-snapshots-a-lot-and-its-a-problem branch from 609d5c4 to 0d47ba1 Compare February 22, 2025 00:59
@Mr0grog Mr0grog force-pushed the text-edits-it-turns-out-you-need-to-regenerate-snapshots-a-lot-and-its-a-problem branch from b53366f to 89403b9 Compare February 22, 2025 01:02
Copy link

👋 FYI, your PR has been automatically updated with changes to client/src/intl/en.json, which contains all the translatable text from the application (probably because you made changes to the text of a component without updating this file).

Copy link

🚨 The "snapshot" tests in your PR have been automatically updated because you changed some text in the app! Make sure the changes to .snap files are correct and don’t include other things that should not have changed.

@Mr0grog Mr0grog force-pushed the text-edits-it-turns-out-you-need-to-regenerate-snapshots-a-lot-and-its-a-problem branch from 2219996 to 8aa7cdc Compare February 22, 2025 01:11
Copy link

🚨 The "snapshot" tests in your PR have been automatically updated because you changed some text in the app! Make sure the changes to .snap files are correct and don’t include other things that should not have changed.

@Mr0grog Mr0grog force-pushed the text-edits-it-turns-out-you-need-to-regenerate-snapshots-a-lot-and-its-a-problem branch from fba3909 to 9bd2710 Compare February 22, 2025 01:16
@Mr0grog Mr0grog force-pushed the text-edits-it-turns-out-you-need-to-regenerate-snapshots-a-lot-and-its-a-problem branch from 4cdd143 to 4e21b7e Compare February 22, 2025 01:30
@Mr0grog Mr0grog merged commit 782b01e into text-edits Feb 22, 2025
8 checks passed
@Mr0grog Mr0grog deleted the text-edits-it-turns-out-you-need-to-regenerate-snapshots-a-lot-and-its-a-problem branch February 22, 2025 01:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant