Skip to content

Commit

Permalink
Merge pull request #65 from Arianee/feat/afterFewSecondsImplicits
Browse files Browse the repository at this point in the history
feat(steps): after few seconds become implicits
  • Loading branch information
benj2k authored Jan 3, 2023
2 parents 7f6e2e5 + 1a0b180 commit d339e5c
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/steps/display.step.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,24 @@ Given('_user does not see {selector} after few seconds', async function (selecto
});
});

Given('_user does not see {selector}', async function (selectorName) {
const selector = this.utils.selectorFactory(selectorName);
try {
await this.page.waitForSelector(selector, {
state: 'visible',
strict: true,
timeout: 2000
});
} catch (e) {
}

await this.page.waitForSelector(selector, {
state: 'hidden',
timeout: 2000,
strict: true
});
});

Given('_user does not see {selector} after {int} seconds', async function (selectorName, timeout) {
try {
await this.page.waitForSelector(this.utils.selectorFactory(selectorName), {
Expand Down

0 comments on commit d339e5c

Please sign in to comment.