microsoft / vscode-azuretools

Common packages for building Azure extensions for VS Code
MIT License
106 stars 67 forks source link

utils & dev: Add fix for tests that fail due to having `showLoadingPrompt` set to `true` #1807

Closed MicroFish91 closed 1 month ago

MicroFish91 commented 1 month ago

We were seeing tests failing due to having showLoadingPrompt set to true. It appears that the loading pick's onDidHide was being triggered when running multiple tests back-to-back, which would then cause a cancel and a premature wizard exit.

This new logic would add an isTesting boolean that the wizard can check internally so that we can prevent an early cancel from being issued. This boolean would be automatically set each time we create a test action context.