Skip to content

Commit

Permalink
await promise
Browse files Browse the repository at this point in the history
  • Loading branch information
jonycoo committed Oct 27, 2023
1 parent 27d3518 commit d703a96
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/features/step_definitions/stepdefs.js
Original file line number Diff line number Diff line change
Expand Up @@ -829,8 +829,8 @@ Then('So the checkbox {string} is set to {string} [true OR false]', async functi
for (const idString of identifiers) promises.push(driver.wait(until.elementLocated(By.xpath(idString)), searchTimeout, `Timed out after ${searchTimeout} ms`, 100));

await Promise.any(promises)
.then((elem) => {
expect(elem.isSelected()).to.equal(checked);
.then(async (elem) => {
expect(await elem.isSelected()).to.equal(checked);
})
.catch(async (e) => {
await driver.takeScreenshot().then(async (buffer) => {
Expand Down

0 comments on commit d703a96

Please sign in to comment.