mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Part 2 - Make Model view components disposable + dispose all emitters (#24097)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user