Codeception icon indicating copy to clipboard operation
Codeception copied to clipboard

seeCurrentUrlEquals is actually seeCurrentUriEquals (notice the last char in url and uri)

Open 4selin opened this issue 5 years ago • 0 comments

What are you trying to achieve?

I'm trying to assert equal current URL

What do you get instead?

I get assertion for current URI not URL

Details

  • Codeception version: 4.1.20

I'm currently working on acceptance test which is trying to assert switches between domain and subdomains.

And I found that current method seeCurrentUrlEquals is acually asserting equality of URI not URL. It should assert rather

$currentUrl = $this->webDriver->getCurrentURL()
$this->assertEquals($url, $currentUrl);

And in that case WebDriver need to introduce new method seeCurrentUriEquals which will assert

$this->assertEquals($uri, $this->_getCurrentUri());

4selin avatar May 18 '21 09:05 4selin