mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-25 14:20:30 -04:00
Fixing the layering in the base folder (#5308)
* removes more builder references * remove builder from profiler * formatting * fix profiler dailog * remove builder from oatuhdialog * remove the rest of builder references * formatting * add more strict null checks to base * enable strict tslint rules * code layering of base * wip * working through changes to table data view * fix tests * update editabledropdown to not use layout service * wip * fix imports * fix import * fix compile error * add more localization * add comments to changes to import patterns * add more import comments
This commit is contained in:
@@ -476,10 +476,8 @@ suite('SQL QueryAction Tests', () => {
|
||||
databaseName: databaseName
|
||||
});
|
||||
|
||||
const layoutService = new TestLayoutService();
|
||||
|
||||
// If I query without having initialized anything, state should be clear
|
||||
listItem = new ListDatabasesActionItem(editor.object, connectionManagementService.object, undefined, undefined, configurationService.object, layoutService);
|
||||
listItem = new ListDatabasesActionItem(editor.object, connectionManagementService.object, undefined, undefined, configurationService.object);
|
||||
|
||||
assert.equal(listItem.isEnabled(), false, 'do not expect dropdown enabled unless connected');
|
||||
assert.equal(listItem.currentDatabaseName, undefined, 'do not expect dropdown to have entries unless connected');
|
||||
@@ -513,10 +511,8 @@ suite('SQL QueryAction Tests', () => {
|
||||
cms.setup(x => x.onConnectionChanged).returns(() => dbChangedEmitter.event);
|
||||
cms.setup(x => x.getConnectionProfile(TypeMoq.It.isAny())).returns(() => <IConnectionProfile>{ databaseName: databaseName });
|
||||
|
||||
const layoutService = new TestLayoutService();
|
||||
|
||||
// ... Create a database dropdown that has been connected
|
||||
let listItem = new ListDatabasesActionItem(editor.object, cms.object, null, null, configurationService.object, layoutService);
|
||||
let listItem = new ListDatabasesActionItem(editor.object, cms.object, null, null, configurationService.object);
|
||||
listItem.onConnected();
|
||||
|
||||
// If: I raise a connection changed event
|
||||
@@ -539,10 +535,8 @@ suite('SQL QueryAction Tests', () => {
|
||||
cms.setup(x => x.onConnectionChanged).returns(() => dbChangedEmitter.event);
|
||||
cms.setup(x => x.getConnectionProfile(TypeMoq.It.isAny())).returns(() => <IConnectionProfile>{ databaseName: databaseName });
|
||||
|
||||
const layoutService = new TestLayoutService();
|
||||
|
||||
// ... Create a database dropdown that has been connected
|
||||
let listItem = new ListDatabasesActionItem(editor.object, cms.object, null, null, configurationService.object, layoutService);
|
||||
let listItem = new ListDatabasesActionItem(editor.object, cms.object, null, null, configurationService.object);
|
||||
listItem.onConnected();
|
||||
|
||||
// If: I raise a connection changed event for the 'wrong' URI
|
||||
@@ -568,10 +562,8 @@ suite('SQL QueryAction Tests', () => {
|
||||
cms.callBase = true;
|
||||
cms.setup(x => x.onConnectionChanged).returns(() => dbChangedEmitter.event);
|
||||
|
||||
const layoutService = new TestLayoutService();
|
||||
|
||||
// ... Create a database dropdown
|
||||
let listItem = new ListDatabasesActionItem(editor.object, cms.object, null, null, configurationService.object, layoutService);
|
||||
let listItem = new ListDatabasesActionItem(editor.object, cms.object, null, null, configurationService.object);
|
||||
|
||||
// If: I raise a connection changed event
|
||||
let eventParams = <IConnectionParams>{
|
||||
|
||||
@@ -81,7 +81,7 @@ suite('SQL QueryEditor Tests', () => {
|
||||
instantiationService.setup(x => x.createInstance(TypeMoq.It.isAny(), TypeMoq.It.isAny(), TypeMoq.It.isAny())).returns((classDef, editor, action) => {
|
||||
if (classDef.ID) {
|
||||
if (classDef.ID === 'listDatabaseQueryActionItem') {
|
||||
return new ListDatabasesActionItem(editor, connectionManagementService.object, undefined, undefined, configurationService.object, undefined);
|
||||
return new ListDatabasesActionItem(editor, connectionManagementService.object, undefined, undefined, configurationService.object);
|
||||
}
|
||||
}
|
||||
// Default
|
||||
@@ -317,7 +317,7 @@ suite('SQL QueryEditor Tests', () => {
|
||||
queryActionInstantiationService.setup(x => x.createInstance(TypeMoq.It.isAny(), TypeMoq.It.isAny(), TypeMoq.It.isAny()))
|
||||
.returns((definition, editor, action, selectBox) => {
|
||||
if (definition.ID === 'listDatabaseQueryActionItem') {
|
||||
let item = new ListDatabasesActionItem(editor, queryConnectionService.object, undefined, undefined, configurationService.object, undefined);
|
||||
let item = new ListDatabasesActionItem(editor, queryConnectionService.object, undefined, undefined, configurationService.object);
|
||||
return item;
|
||||
}
|
||||
// Default
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import * as assert from 'assert';
|
||||
import { Dialog, DialogTab } from 'sql/platform/dialog/dialogTypes';
|
||||
import { DialogPane } from 'sql/platform/dialog/dialogPane';
|
||||
|
||||
Reference in New Issue
Block a user