Skip to content

Commit

Permalink
Provide correct url in error message #34
Browse files Browse the repository at this point in the history
  • Loading branch information
schipiga committed Jul 14, 2018
1 parent e84c17a commit d4fbfc8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
5 changes: 3 additions & 2 deletions lib/steps/page.js
Expand Up @@ -111,10 +111,11 @@ var PageSteps = {
var pages = Object.values(this._pages()).sort(
(a, b) => a.url.length < b.url.length);

var curUrl = url.parse(await this.webdriver.getUrl());
var curUrl = await this.webdriver.getUrl();
var parsedUrl = url.parse(curUrl);

for (var page of pages) {
if (curUrl.pathname.startsWith(page.url)) {
if (parsedUrl.pathname.startsWith(page.url)) {
LOG.info("Current web page is found");
allure.pass();
return page;
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -36,7 +36,7 @@
},
"devDependencies": {
"eslint": "^4.19.1",
"glace-core": "^1.6.4",
"glace-core": "^1.6.5",
"ink-docstrap": "^1.3.0",
"jsdoc": "^3.5.5",
"jsdoc-strip-async-await": "^0.1.0",
Expand Down

0 comments on commit d4fbfc8

Please sign in to comment.