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:
Charles Gagnon
2019-05-01 10:18:23 -07:00
committed by GitHub
parent 2558a66a48
commit 64bf211a45
3 changed files with 9 additions and 9 deletions

View File

@@ -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}"`);
}