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

Support of flutter's --dart-define attribute for screenshots command #210

Open
sderungs99 opened this issue Jul 25, 2020 · 1 comment
Open

Comments

@sderungs99
Copy link

Flutter allows to pass in command arguments via the --dart-define attribute (see https://itnext.io/flutter-1-17-no-more-flavors-no-more-ios-schemas-command-argument-that-solves-everything-8b145ed4285d for more details).

It will be good if the screenshots command would allow to use a similar attribute, which will then be passed to the tests defined in the screenshots.yaml configuration file.

Right now, I am writing the --dart-define attributes directly into the screenshots.yaml file, like so:
tests:

  • --target=test_driver/app.dart --driver=test_driver/app_test.dart --dart-define=SECRET_API_KEY=<MY_VERY_SECRET_API_KEY>

Rather than having this secret key in the screenshots.yaml file (which is checked into version control and therefore visible to everyone), it would be nice if I could use this attribute when calling the screenshots command, for example:
screenshots -df=SECRET_API_KEY=<MY_VERY_SECRET_API_KEY>

Would be great if this can be added, or maybe there is a different way to do this already?

@devjeff
Copy link

devjeff commented Feb 16, 2021

Yeah, that's a good idea. We're also using dart define variables and I would like to pass them to the screenshots command.

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

No branches or pull requests

2 participants