gemini icon indicating copy to clipboard operation
gemini copied to clipboard

Unexpected value of suite.fullUrl on Windows

Open generalov opened this issue 7 years ago • 0 comments

Output of gemini --version: 5.6.2

I've noted that html-reporter plugin produces data.json which contains invalid value in metaInfo.url property on Windows:

metaInfo: {
  url: "\\\\user\\profile.html\\",
}

Expected:

metaInfo: {
  url: "/user/profile.html",
}

The plugin uses value from suite.fullUrl to put in the report. Root cause of the issue is in https://github.com/gemini-testing/gemini/blob/7c709d778979adba0d97eb53c78bc7b2a035f647/lib/runner/browser-runner/index.js#L47-L52

The _mkFullUrl() function calls Node.js path module. But the module is intended to deal with filesystem paths rather URLs. It could return unexpected results on *nix systems too.

Perhaps url-join package or something like that could be used to concatenate URLs correctly.

generalov avatar Apr 06 '18 17:04 generalov