Update Schema Compare dialog to start a new connection (#15193)

* Update SC dialog to start a new connection

* Functionally complete

* Fix target db to pick correct database

* Address comments

* Added test+fixed one missing scenario

* Address comments + add one more test
This commit is contained in:
Sakshi Sharma
2021-04-29 09:53:38 -07:00
committed by GitHub
parent e42da81005
commit e695a01538
9 changed files with 241 additions and 62 deletions

View File

@@ -0,0 +1,34 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as azdata from 'azdata';
import * as vscode from 'vscode';
import { SchemaCompareDialog } from '../dialogs/schemaCompareDialog';
import { SchemaCompareMainWindow } from '../schemaCompareMainWindow';
export class SchemaCompareDialogTest extends SchemaCompareDialog {
constructor(
schemaCompareMainWindow: SchemaCompareMainWindow,
view: azdata.ModelView,
extensionContext: vscode.ExtensionContext) {
super(schemaCompareMainWindow, view, extensionContext);
}
// only for test
public getSourceServerDropdownValue(): string | azdata.CategoryValue {
if (this.sourceServerDropdown) {
return this.sourceServerDropdown.value;
}
return undefined;
}
public getTargetServerDropdownValue(): string | azdata.CategoryValue {
if (this.targetServerDropdown) {
return this.targetServerDropdown.value;
}
return undefined;
}
}