Skip to content

Commit

Permalink
Stabilizing failing test by adding conditional wait
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Grossmann <lgrossma@redhat.com>
  • Loading branch information
lgrossma authored and vrubezhny committed Oct 17, 2024
1 parent 77a4535 commit 0559acd
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions test/ui/suite/createComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,15 @@ export function testCreateComponent(path: string) {

async function loadCreateComponentButton() {
section = await view.getContent().getSection(VIEWS.components);
const buttons = await (await section.findWelcomeContent()).getButtons();
for (const btn of buttons) {
if ((await btn.getTitle()) === BUTTONS.newComponent) {
button = btn;
await VSBrowser.instance.driver.wait( async () => {
const buttons = await (await section.findWelcomeContent()).getButtons();
for (const btn of buttons) {
if ((await btn.getTitle()) === BUTTONS.newComponent) {
button = btn;
return true
}
}
}
}, 10_000);
}
});
}

0 comments on commit 0559acd

Please sign in to comment.