Fix deploy upgrade existing not choosing the correct database (#14635)

* fix deploy upgrade existing not choosing the correct database

* fix test

* specify databaseDropdownValue as a string
This commit is contained in:
Kim Santiago
2021-03-10 15:02:14 -08:00
committed by GitHub
parent ee2988f5fd
commit 03a0d71486
3 changed files with 5 additions and 5 deletions

View File

@@ -22,7 +22,7 @@ export class TestDeployConfigPage extends DeployConfigPage {
}
SetDatabaseDropDown(): void {
this.databaseDropdown.value = { name: 'DummyDatabase', displayName: 'DummyDatabase' };
this.databaseDropdown.value = 'DummyDatabase';
}
SetFileName(): void {

View File

@@ -104,12 +104,12 @@ export abstract class DacFxConfigPage extends BasePage {
// Handle database changes
this.databaseDropdown.onValueChanged(() => {
const databaseDropdownValue = this.databaseDropdown.value;
const databaseDropdownValue: string = this.databaseDropdown.value as string;
if (!databaseDropdownValue) {
return;
}
this.model.database = databaseDropdownValue as string;
this.model.database = databaseDropdownValue;
this.fileTextBox.value = this.generateFilePathFromDatabaseAndTimestamp();
this.model.filePath = this.fileTextBox.value;
});

View File

@@ -142,12 +142,12 @@ export class DeployConfigPage extends DacFxConfigPage {
//Handle database changes
this.databaseDropdown.onValueChanged(() => {
const databaseDropdownValue = this.databaseDropdown.value as azdata.CategoryValue;
const databaseDropdownValue: string = this.databaseDropdown.value as string;
if (!databaseDropdownValue) {
return;
}
this.model.database = databaseDropdownValue.name;
this.model.database = databaseDropdownValue;
});
this.databaseLoader = this.view.modelBuilder.loadingComponent().withItem(this.databaseDropdown).withProperties({