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

@@ -153,7 +153,7 @@
"should": "^13.2.1",
"typemoq": "^2.1.0",
"lodash": "^4.17.21",
"@microsoft/azdata-test": "^3.0.1"
"@microsoft/azdata-test": "^3.0.3"
},
"__metadata": {
"id": "65",

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);

View File

@@ -230,10 +230,10 @@
resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.2.tgz#26520bf09abe4a5644cd5414e37125a8954241dd"
integrity sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw==
"@microsoft/azdata-test@^3.0.1":
version "3.0.1"
resolved "https://registry.yarnpkg.com/@microsoft/azdata-test/-/azdata-test-3.0.1.tgz#a8b89a12de42f277d33aae71c277d0c8efcfbee0"
integrity sha512-Zrctm/zKufwIRF9jfw8TOBzr5woLdKXAGNTlbAQl0IGLzVoIGULj9Gqdc1Ikhrov3rM0NkbAF/PY6j6BHiW8Tw==
"@microsoft/azdata-test@^3.0.3":
version "3.0.3"
resolved "https://registry.yarnpkg.com/@microsoft/azdata-test/-/azdata-test-3.0.3.tgz#a1b5bbead5412ac7925129e6199d724bfc8117ee"
integrity sha512-Whit8+MpNN/Kkx3R9CGT26FhYNzkjNyOb6dsaqkMq1scpO3JCeNJqhcSqTTsSbkRVdAKoYrJcpLZdoO9D1X/yw==
dependencies:
http-proxy-agent "^5.0.0"
https-proxy-agent "^5.0.0"