Skip to content

Commit

Permalink
test(e2e): use try catch instead of then catch
Browse files Browse the repository at this point in the history
Signed-off-by: Zacharias Fragkiadakis <zacfragkiadakis@gmail.com>
  • Loading branch information
QZera committed Dec 28, 2024
1 parent 4eee6d9 commit f14601a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions test/e2e/helpers/assertions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ export async function expectCliCommandsAndPatchesToBeVisible(workbench: Workbenc

await browser.waitUntil(
async () => {
return await sidebarView
.wait()
.then(() => true)
.catch(() => false)
try {
await sidebarView.wait()

return true
} catch (error) {
return false
}
},
{
timeoutMsg: 'expected sidebar view to be visible',
Expand Down

0 comments on commit f14601a

Please sign in to comment.