mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-02 09:35:40 -05:00
Add changes for flavor selection (#8419)
* Add changes for flavor selection * Use getDefaultProviderId method * Update default engine user setting description * Add back check for codeEditor * Add test for multiple providers * Removing extra merge line * Add an attribute to ConnectionProviderProperties for language flavor Adding a boolean property to ConnectionProviderProperties for providers that are language flavors. When it is set to true, the provider will be part of drop down for changing SQL language flavor. * Update variable name * Put logic for removing CMS at one place and remove flag for flavor provider * Using keys instead of entries Using Object.keys instead of entries as doing [0] can be error prone if no provider matches. * Adding logic to check from params * Updating variable names * Rename dedup map * Fix action
This commit is contained in:
@@ -729,6 +729,21 @@ suite('SQL ConnectionManagementService tests', () => {
|
||||
}
|
||||
});
|
||||
|
||||
test('getUniqueConnectionProvidersByNameMap should return non CMS providers', () => {
|
||||
let nameToDisplayNameMap: { [providerDisplayName: string]: string } = { 'MSSQL': 'SQL Server', 'MSSQL-CMS': 'SQL Server' };
|
||||
let providerNames = Object.keys(connectionManagementService.getUniqueConnectionProvidersByNameMap(nameToDisplayNameMap));
|
||||
assert.equal(providerNames.length, 1);
|
||||
assert.equal(providerNames[0], 'MSSQL');
|
||||
});
|
||||
|
||||
test('providerNameToDisplayNameMap should return all providers', () => {
|
||||
let expectedNames = ['MSSQL', 'PGSQL'];
|
||||
let providerNames = Object.keys(connectionManagementService.providerNameToDisplayNameMap);
|
||||
assert.equal(providerNames.length, 2);
|
||||
assert.equal(providerNames[0], expectedNames[0]);
|
||||
assert.equal(providerNames[1], expectedNames[1]);
|
||||
});
|
||||
|
||||
test('ensureDefaultLanguageFlavor should not send event if uri is connected', done => {
|
||||
let uri: string = 'Editor Uri';
|
||||
let options: IConnectionCompletionOptions = {
|
||||
|
||||
Reference in New Issue
Block a user