Closed
Description
Feature('foo');
Scenario('retry something', async ({ I }) => {
I.amOnPage('http://example.org');
// this works
await retryTo( (tryNum) => {
I.say(`${tryNum} try without await`);
if (tryNum < 2) {
I.say(`should fail and retry`);
I.waitForVisible('.shouldFail', 1);
}
I.say(`should pass`);
}, 2);
I.say(`---`);
// this doesn't work
await retryTo( async (tryNum) => {
I.say(` ${tryNum} try with await`);
await I.grabCurrentUrl();
if (tryNum < 2) {
I.say(`should fail and retry`);
I.waitForVisible('.shouldFail', 1);
}
I.say(`should pass`);
}, 2);
});
Details
- CodeceptJS version: 3.5.7
- NodeJS Version: 18.18.
- Operating System: macos
- playwright