Skip to content

Commit

Permalink
Get correct notification box
Browse files Browse the repository at this point in the history
  • Loading branch information
abhikdps committed Jan 29, 2025
1 parent 09c1e1f commit 2ae3c3e
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions test/ui-test/contentCreatorUiTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ describe("Test Ansible sample execution environment file scaffolding", () => {
);
});

it("Execute the build command from the right-click menu", async function () {
it("Executes the build command from the right-click menu", async function () {
const homeDir = path.resolve(
process.env.HOME ?? process.env.USERPROFILE ?? "~",
);
Expand Down Expand Up @@ -243,15 +243,16 @@ describe("Test Ansible sample execution environment file scaffolding", () => {
await menuItem.select();

const notifications = await workbench.getNotifications();
const successNotification = notifications.find((notification) =>
notification.getMessage(),
);
const successNotification = notifications.find(async (notification) => {
const message = await notification.getMessage();
return message.includes("Running: ansible-builder");
});
if (!successNotification) {
throw new Error("Success notification not found");
throw new Error("Successful run notification not found");
}

expect(await successNotification.getMessage()).to.include(
"Build successful",
"Running: ansible-builder",
);
});
});
Expand Down

0 comments on commit 2ae3c3e

Please sign in to comment.