Skip to content

Commit

Permalink
Better comments
Browse files Browse the repository at this point in the history
  • Loading branch information
MicroFish91 committed Oct 30, 2024
1 parent f796118 commit f532a7d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dev/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,11 @@ export declare class TestUserInput {
public readonly onDidFinishPrompt: Event<PromptResult>;

public constructor(vscode: typeof import('vscode'));

/**
* Boolean set to indicate whether the UI is being used for test inputs. For`TestUserInput`, this will always default to true.
* See: https://github.com/microsoft/vscode-azuretools/pull/1807
*/
readonly isTesting: boolean;

/**
Expand Down
4 changes: 4 additions & 0 deletions dev/src/TestUserInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ export class TestUserInput implements types.TestUserInput {
private readonly _vscode: typeof vscodeTypes;
private _inputs: (string | RegExp | TestInput)[] = [];

/**
* Boolean set to indicate whether the UI is being used for test inputs. For`TestUserInput`, this will always default to true.
* See: https://github.com/microsoft/vscode-azuretools/pull/1807
*/
readonly isTesting: boolean = true;

constructor(vscode: typeof vscodeTypes) {
Expand Down
1 change: 1 addition & 0 deletions utils/src/wizard/AzureWizard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ export class AzureWizard<T extends (IInternalActionContext & Partial<types.Execu

if (loadingQuickPick) {
disposables.push(loadingQuickPick?.onDidHide(() => {
// Avoid issuing cancels during tests - see: https://github.com/microsoft/vscode-azuretools/pull/1807
if (!this._context.ui.isPrompting && !this._context.ui.isTesting) {
this._cancellationTokenSource.cancel();
}
Expand Down

0 comments on commit f532a7d

Please sign in to comment.