Part 2 - Make Model view components disposable + dispose all emitters (#24097)

This commit is contained in:
Cheena Malhotra
2023-08-23 12:46:09 -07:00
committed by GitHub
parent 25a658775c
commit 6c6464e772
58 changed files with 435 additions and 195 deletions

View File

@@ -27,7 +27,8 @@ export function createViewContext(): ViewTestContext {
onValidityChanged: undefined!,
valid: true,
validate: undefined!,
focus: undefined!
focus: undefined!,
dispose() { }
};
let button: azdata.ButtonComponent = Object.assign({}, componentBase, {
onDidClick: onClick.event
@@ -266,7 +267,8 @@ export function createViewContext(): ViewTestContext {
infoBox: undefined!,
slider: undefined!,
executionPlan: undefined!,
}
},
dispose() { }
};
let tab: azdata.window.DialogTab = {
title: '',
@@ -280,7 +282,8 @@ export function createViewContext(): ViewTestContext {
},
onValidityChanged: undefined!,
valid: true,
modelView: undefined!
modelView: undefined!,
dispose() { }
};
let dialogButton: azdata.window.Button = {
@@ -310,7 +313,8 @@ export function createViewContext(): ViewTestContext {
valid: true,
loading: false,
loadingText: '',
loadingCompletedText: ''
loadingCompletedText: '',
dispose() { }
};
let wizard: azdata.window.Wizard = {
title: '',
@@ -351,7 +355,8 @@ export function createViewContext(): ViewTestContext {
}
},
modelView: undefined!,
valid: true
valid: true,
dispose() { }
};
apiWrapper.setup(x => x.createButton(TypeMoq.It.isAny(), TypeMoq.It.isAny())).returns(() => dialogButton);
apiWrapper.setup(x => x.createTab(TypeMoq.It.isAny())).returns(() => tab);