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

Autotests: Get rid of GENERATE_DATA flag in updating example files process #6340

Open
AlexeyGirin opened this issue Jan 22, 2025 · 0 comments
Labels
Autotests refactor Code refactoring, without changing the functionality
Milestone

Comments

@AlexeyGirin
Copy link
Collaborator

AlexeyGirin commented Jan 22, 2025

Background
Now we have GENERATE_DATA flag that allow saveToFile function to update file examples if it is true.
At the same time for screenshot update we use --update-snapshots run parameter.
Both of these processes (example file update and screenshot update) has the same nature - the update previously saved example file/screenshots
So it is obvious to unite them and make one universal update procedure

Solution
Screenshot update procedure set process.env.UPDATE_SNAPSHOTS environment variable to '1' if launched
so it obvious to use it for file update procedure as well
Update saveToFile function and remove GENERATE_DATA flag from configs

@AlexeyGirin AlexeyGirin added Autotests refactor Code refactoring, without changing the functionality labels Jan 22, 2025
@AlexeyGirin AlexeyGirin added this to the Autotests milestone Jan 22, 2025
@AlexeyGirin AlexeyGirin changed the title Autotests: Get rid of GENERATE_DATA flag in updating template files process Autotests: Get rid of GENERATE_DATA flag in updating example files process Jan 22, 2025
@AlexeyGirin AlexeyGirin changed the title Autotests: Get rid of GENERATE_DATA flag in updating example files process Autotests: Get rid of GENERATE_DATA flag in updating example files process Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Autotests refactor Code refactoring, without changing the functionality
Projects
None yet
Development

No branches or pull requests

1 participant