mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-09 17:52:34 -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;
|
||||
|
||||
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 {
|
||||
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);
|
||||
let nodes = <azdata.objectexplorer.ObjectExplorerNode[]>await azdata.objectexplorer.getActiveConnectionNodes();
|
||||
assert(nodes.length > 0, `Expecting at least one active connection, actual: ${nodes.length}`);
|
||||
|
||||
let index = nodes.findIndex(node => node.nodePath.includes(server.serverName));
|
||||
assert(index !== -1, `Failed to find server: "${server.serverName}" in OE tree`);
|
||||
let actualNodeLable = [];
|
||||
let childeren = await nodes[index].getChildren();
|
||||
assert(childeren.length === expectedNodeLable.length, `Expecting node count: ${expectedNodeLable.length}, Actual: ${childeren.length}`);
|
||||
let actualNodeLabel = [];
|
||||
let children = await nodes[index].getChildren();
|
||||
assert(children.length === expectedNodeLabel.length, `Expecting node count: ${expectedNodeLabel.length}, Actual: ${children.length}`);
|
||||
|
||||
childeren.forEach(c => actualNodeLable.push(c.label));
|
||||
assert(expectedNodeLable.toLocaleString() === actualNodeLable.toLocaleString(), `Expected node label: "${expectedNodeLable}", Actual: "${actualNodeLable}"`);
|
||||
children.forEach(c => actualNodeLabel.push(c.label));
|
||||
assert(expectedNodeLabel.toLocaleString() === actualNodeLabel.toLocaleString(), `Expected node label: "${expectedNodeLabel}", Actual: "${actualNodeLabel}"`);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user