Add telemetry for opening dacpac wizard (#14884)

* add telemetry for opening dacpac wizard

* add wizard open telemetry to core

* fix tests

* remove WizardOpen
This commit is contained in:
Kim Santiago
2021-03-26 14:57:51 -07:00
committed by GitHub
parent e080770c19
commit 39a47b0053
10 changed files with 47 additions and 25 deletions

View File

@@ -141,13 +141,14 @@ suite('ExtHostModelViewDialog Tests', () => {
});
test('Opening a wizard updates its pages and buttons on the main thread', () => {
mockProxy.setup(x => x.$openWizard(It.isAny()));
mockProxy.setup(x => x.$openWizard(It.isAny(), It.isAny()));
mockProxy.setup(x => x.$setWizardDetails(It.isAny(), It.isAny()));
mockProxy.setup(x => x.$setWizardPageDetails(It.isAny(), It.isAny()));
mockProxy.setup(x => x.$setButtonDetails(It.isAny(), It.isAny()));
// Create a wizard with 2 pages and 2 custom buttons
let wizardTitle = 'wizard_title';
let source = 'command palette';
let wizard = extHostModelViewDialog.createWizard(wizardTitle);
let page1Title = 'page_1';
let page1 = extHostModelViewDialog.createWizardPage(page1Title);
@@ -162,7 +163,7 @@ suite('ExtHostModelViewDialog Tests', () => {
wizard.customButtons = [button1, button2];
// Open the wizard and verify that the correct main thread methods were called
extHostModelViewDialog.openWizard(wizard);
extHostModelViewDialog.openWizard(wizard, source);
mockProxy.verify(x => x.$setButtonDetails(It.isAny(), It.is(details => {
return details.enabled === false && details.label === button1Label;
})), Times.atLeastOnce());
@@ -179,7 +180,7 @@ suite('ExtHostModelViewDialog Tests', () => {
return details.title === wizardTitle && details.pages.length === 2 && details.customButtons.length === 2 &&
details.displayPageTitles === true;
})), Times.atLeastOnce());
mockProxy.verify(x => x.$openWizard(It.isAny()), Times.once());
mockProxy.verify(x => x.$openWizard(It.isAny(), It.isAny()), Times.once());
});
test('Wizard page changed events are handled correctly', () => {