Skip to content

Commit 9f2a163

Browse files
Make integration tests more robust (#154)
Co-authored-by: Kartik Gupta <88345179+kartikgupta-db@users.noreply.github.com>
1 parent fc3ebb4 commit 9f2a163

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

packages/databricks-vscode/src/test/e2e/configure.e2e.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,16 +171,21 @@ describe("Configure Databricks Extension", async function () {
171171
await input.setText(clusterId);
172172
await input.confirm();
173173

174+
// wait for tree to update
175+
let clusterPropsItems;
176+
do {
177+
await driver.sleep(200);
178+
clusterPropsItems = await clusterConfigItem.getChildren();
179+
} while (clusterPropsItems.length <= 1);
180+
174181
// get cluster ID
175-
const clusterPropsItems = await clusterConfigItem.getChildren();
176182
const clusterProps: Record<string, string> = {};
177183
for (const i of clusterPropsItems) {
178184
clusterProps[await i.getLabel()] = (await i.getDescription()) || "";
179185
}
180186

181-
// store cluster ID in test suite scope
182-
clusterId = clusterProps["Cluster ID:"];
183-
assert(clusterId);
187+
const testClusterId = clusterProps["Cluster ID:"];
188+
assert.equal(testClusterId, clusterId);
184189
});
185190

186191
it("should write the project config file", async function () {

0 commit comments

Comments
 (0)