mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Fix failing OE Tests caused by changes in connection API defaults (#5295)
* Fix failing OE Tests caused by changes in connection API defaults * More spelling fixes
This commit is contained in:
@@ -45,7 +45,7 @@ if (context.RunTest) {
|
|||||||
let expectedActions;
|
let expectedActions;
|
||||||
|
|
||||||
if (process.platform === 'win32') {
|
if (process.platform === 'win32') {
|
||||||
expectedActions = ['Manage', 'New Query', 'Disconnect', 'Delete Connection', 'Refresh', 'New Notebook', 'Properties', 'Launch Profiler'];
|
expectedActions = ['Manage', 'New Query', 'Disconnect', 'Delete Connection', 'Refresh', 'New Notebook', 'Launch Profiler', 'Properties'];
|
||||||
} else {
|
} else {
|
||||||
expectedActions = ['Manage', 'New Query', 'Disconnect', 'Delete Connection', 'Refresh', 'New Notebook', 'Launch Profiler'];
|
expectedActions = ['Manage', 'New Query', 'Disconnect', 'Delete Connection', 'Refresh', 'New Notebook', 'Launch Profiler'];
|
||||||
}
|
}
|
||||||
@@ -56,18 +56,18 @@ if (context.RunTest) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
async function VerifyOeNode(server: TestServerProfile, timeout: number, expectedNodeLable: string[]) {
|
async function VerifyOeNode(server: TestServerProfile, timeout: number, expectedNodeLabel: string[]) {
|
||||||
await connectToServer(server, timeout);
|
await connectToServer(server, timeout);
|
||||||
let nodes = <azdata.objectexplorer.ObjectExplorerNode[]>await azdata.objectexplorer.getActiveConnectionNodes();
|
let nodes = <azdata.objectexplorer.ObjectExplorerNode[]>await azdata.objectexplorer.getActiveConnectionNodes();
|
||||||
assert(nodes.length > 0, `Expecting at least one active connection, actual: ${nodes.length}`);
|
assert(nodes.length > 0, `Expecting at least one active connection, actual: ${nodes.length}`);
|
||||||
|
|
||||||
let index = nodes.findIndex(node => node.nodePath.includes(server.serverName));
|
let index = nodes.findIndex(node => node.nodePath.includes(server.serverName));
|
||||||
assert(index !== -1, `Failed to find server: "${server.serverName}" in OE tree`);
|
assert(index !== -1, `Failed to find server: "${server.serverName}" in OE tree`);
|
||||||
let actualNodeLable = [];
|
let actualNodeLabel = [];
|
||||||
let childeren = await nodes[index].getChildren();
|
let children = await nodes[index].getChildren();
|
||||||
assert(childeren.length === expectedNodeLable.length, `Expecting node count: ${expectedNodeLable.length}, Actual: ${childeren.length}`);
|
assert(children.length === expectedNodeLabel.length, `Expecting node count: ${expectedNodeLabel.length}, Actual: ${children.length}`);
|
||||||
|
|
||||||
childeren.forEach(c => actualNodeLable.push(c.label));
|
children.forEach(c => actualNodeLabel.push(c.label));
|
||||||
assert(expectedNodeLable.toLocaleString() === actualNodeLable.toLocaleString(), `Expected node label: "${expectedNodeLable}", Actual: "${actualNodeLable}"`);
|
assert(expectedNodeLabel.toLocaleString() === actualNodeLabel.toLocaleString(), `Expected node label: "${expectedNodeLabel}", Actual: "${actualNodeLabel}"`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ export class ExtHostConnectionManagement extends ExtHostConnectionManagementShap
|
|||||||
return this._proxy.$getUriForConnection(connectionId);
|
return this._proxy.$getUriForConnection(connectionId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public $connect(connectionProfile: azdata.IConnectionProfile, saveConnection: boolean = false, showDashboard: boolean = false): Thenable<azdata.ConnectionResult> {
|
public $connect(connectionProfile: azdata.IConnectionProfile, saveConnection: boolean = true, showDashboard: boolean = true): Thenable<azdata.ConnectionResult> {
|
||||||
return this._proxy.$connect(connectionProfile, saveConnection, showDashboard);
|
return this._proxy.$connect(connectionProfile, saveConnection, showDashboard);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ export class MainThreadConnectionManagement implements MainThreadConnectionManag
|
|||||||
return connection;
|
return connection;
|
||||||
}
|
}
|
||||||
|
|
||||||
public $connect(connectionProfile: IConnectionProfile, saveConnection: boolean = false, showDashboard: boolean = false): Thenable<azdata.ConnectionResult> {
|
public $connect(connectionProfile: IConnectionProfile, saveConnection: boolean = true, showDashboard: boolean = true): Thenable<azdata.ConnectionResult> {
|
||||||
let profile = new ConnectionProfile(this._capabilitiesService, connectionProfile);
|
let profile = new ConnectionProfile(this._capabilitiesService, connectionProfile);
|
||||||
profile.id = generateUuid();
|
profile.id = generateUuid();
|
||||||
return this._connectionManagementService.connectAndSaveProfile(profile, undefined, {
|
return this._connectionManagementService.connectAndSaveProfile(profile, undefined, {
|
||||||
|
|||||||
Reference in New Issue
Block a user