Add query-history tests (#19923)

This commit is contained in:
Charles Gagnon
2022-07-05 18:18:40 -07:00
committed by GitHub
parent 5d241c1907
commit 577c09e1f1
11 changed files with 1873 additions and 56 deletions

View File

@@ -11,24 +11,22 @@ import { initializeWizardPage, InputComponent, InputComponentInfo, Validator, Wi
import { FieldType } from '../../../interfaces';
import { IToolsService } from '../../../services/toolsService';
import { Deferred } from '../../utils';
import { createModelViewMock } from '@microsoft/azdata-test/out/mocks/modelView/modelViewMock';
import { StubCheckbox } from '@microsoft/azdata-test/out/stubs/modelView/stubCheckbox';
import { StubInputBox } from '@microsoft/azdata-test/out/stubs/modelView/stubInputBox';
import * as azdataTest from '@microsoft/azdata-test';
import * as should from 'should';
import * as sinon from 'sinon';
describe('WizardPage', () => {
let stubCheckbox: StubCheckbox;
let stubInputBox: StubInputBox;
let stubCheckbox: azdataTest.stubs.modelView.StubCheckbox;
let stubInputBox: azdataTest.stubs.modelView.StubInputBox;
let testWizardPage: WizardPageContext;
let contentRegistered: Deferred<void>;
before(function () {
contentRegistered = new Deferred<void>();
const mockWizardPage = TypeMoq.Mock.ofType<azdata.window.WizardPage>();
stubCheckbox = new StubCheckbox();
stubInputBox = new StubInputBox();
const mockModelView = createModelViewMock({
stubCheckbox = new azdataTest.stubs.modelView.StubCheckbox();
stubInputBox = new azdataTest.stubs.modelView.StubInputBox();
const mockModelView = azdataTest.mocks.modelView.createModelViewMock({
checkBox: () => stubCheckbox,
inputBox: () => stubInputBox
});