mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-15 09:35:37 -05:00
SQL DB Project Extension - Providing publish deploy options (#17993)
* initilaizing the sqlproj display options work * added more code to the options dialog, need default option values * Except REset Button, all works and need to refactor and test * DisplayOptions for SQL DB Proj completed, refactor needed * Tests for display options * refactor code and removed unnecessary await calls * Description values getting from STS API and code refactor * DacpacExtesnion test model error fix * updates related to STS model updates * Dac Deployement options model updates according to STS changes * Undoing file updates and moving as separate PR * Undoing vscode whitespace changes which were added accidentally * Options display name coming from API * Updated model with dac deploy options display names coming from the STS API * errors fixed after merge to main * separating model related changes after merge, separate PR exists * wrong Comment for the test case removed * code refactor updates * Hyperlink changes to secondary button and style updates * refactoring code and comments * importing type only instead of whole azdata and comment updates * projectcontroller test fix * removed duplicate file updates from other PR * code refactor according to comments * Added dispose to the onclick handler * Added test case * parameter change results error and fixed * Addressing all comments with updates * Unused variable removed and missed with previous commit * Updated the ppublish button and width * Adjusted the database dropdown and options margins to make all input align in same line * Updated the database width and moved stylings to uiconstants file
This commit is contained in:
committed by
GitHub
parent
0b89272739
commit
e08a87d035
@@ -0,0 +1,31 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as should from 'should';
|
||||
import * as testUtils from '../../test/testContext';
|
||||
import { DeployOptionsModel } from '../../models/options/deployOptionsModel';
|
||||
|
||||
describe('Publish Dialog Deploy Options Model', () => {
|
||||
it('Should create model and set options successfully', function (): void {
|
||||
const model = new DeployOptionsModel(testUtils.getDeploymentOptions());
|
||||
should.notEqual(model.getOptionsData(), undefined, 'Options shouldn\'t be undefined');
|
||||
|
||||
should.doesNotThrow(() => model.setDeploymentOptions());
|
||||
|
||||
should(model.getDeployOptionUtil('')).equal(undefined);
|
||||
});
|
||||
|
||||
it('Should get description', function (): void {
|
||||
const model = new DeployOptionsModel(testUtils.getDeploymentOptions());
|
||||
model.optionsLabels.forEach(l => {
|
||||
should(model.getDescription(l)).not.equal(undefined);
|
||||
});
|
||||
});
|
||||
|
||||
it('Should be undefined for null description', function (): void {
|
||||
const model = new DeployOptionsModel(testUtils.getDeploymentOptions());
|
||||
should(model.getDescription('')).equal(undefined);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user