CodeceptJS: waitUrlEquals fails on a false-positive

Problem: waitUrlEquals triggers an error even though the assertion should pass.

Code:

Scenario('navigation & routing', async function(I) {
	I.amOnPage('http://localhost:8080');
	I.click('Buttons', '.side-panel');
	I.waitUrlEquals('/buttons/single', 2); // <<< ERROR
});

Result:

-- FAILURES:
  1) Example test
	navigation & routing:
	expected url to be http://localhost:8080/ui/buttons/single, but found:
	http://localhost:8080/ui/buttons/single

Is there something I’m doing wrong or is this just a plain bug 🪲 ?

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 1
  • Comments: 20

Most upvoted comments

ohhhh i understand)))

You use waitUrlEquals - and arg must be full url path) For wait part of url please use waitInUrl