Codeception / Codeception/Codeception

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

Open
#6,209 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
4.9k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

#### 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](https://github.com/Codeception/module-webdriver/blob/ebbe729c630415e8caf6b0087e457906f0c6c0c6/src/Codeception/Module/WebDriver.php#L1277) is acually asserting equality of URI not URL. It should assert rather

```php
$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());`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.