Skip to content

Commit

Permalink
add more asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
TamiTakamiya committed Aug 5, 2024
1 parent 7036a45 commit 05b2090
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/ui-test/lightspeedUiTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ export function lightspeedUIAssetsTest(): void {
});

it("Ansible Lightspeed status bar item absent when settings not enabled", async function () {
await editorView.openEditor(file);
expect(statusBar, "statusBar should not be undefined").to.be.not.undefined;
const editor = await editorView.openEditor(file);
expect(editor, "editor should not be undefined").to.be.not.undefined;

// The following lines replaced the original code that was using StatusBar.getItem() API.
const items = await statusBar.findElements(
Expand All @@ -102,7 +104,8 @@ export function lightspeedUIAssetsTest(): void {
".//a/text()='Lightspeed (not logged in))']",
),
);
expect(items.length).equals(0);
expect(items, "items should not be undefined").to.be.not.undefined;
expect(items.length, "items.length should be 0").equals(0);
});

it("Connect button exists in Lightspeed explorer view when settings not enabled", async function () {
Expand Down

0 comments on commit 05b2090

Please sign in to comment.