Add warning and confirmation before running theme doctor#6832
Add warning and confirmation before running theme doctor#6832
Conversation
|
Great start @FKauwe!
|
Yes to both! How will the commands change code within the themes? (I want to be specific with the message: "this command will change code within <which?> themes in <what ways?> " |
d6f7d90 to
5597fcc
Compare
1408474 to
4743242
Compare
Coverage report
Test suite run success3774 tests passing in 1454 suites. Report generated by 🧪jest coverage report action from ddeabf9 |
EvilGenius13
left a comment
There was a problem hiding this comment.
Changes look good! 🎩 went well. You can remove the changeset as this won't be used by users externally.
4743242 to
ddeabf9
Compare
|
We detected some changes at Caution DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release. |
WHY are these changes introduced?
Fixes #1016
Building off the architecture for a new
theme doctorcommand in this PR, I introduce a warning and confirm with the user before executing thetheme doctortest suite, as the tests will interact with user's remote shop.WHAT is this pull request doing?
renderConfirmationPromptfunction to thedoctor/theme/index.tsfileUser ConfirmsandUser Cancelsare correctlooks like this when User Confirms(test suite executes):

and when User Cancels (exit the command):

UPDATE: working with the addition of the required environment variable, I verified the variable requirement executes first and then the prompt and confirmation.

If the correct env variable is present:
If the incorrect variable is present:

I also wrote a new unittest to confirm this behavior.
How to test your changes?
pull my branch down locally
p buildrun
shopify-dev doctor theme -e <local-env-name>in external terminalsee the warning and prompt and the expected behaviors between Yes/No