Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
restore qualifyWithBaseUrl - it qualifies against non-empty paths
  • Loading branch information
flotwig committed Sep 22, 2020
commit 3a9a85eeaa32ee61525635d51ceabfb8dcb226b0
10 changes: 8 additions & 2 deletions packages/driver/src/cypress/location.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ class $Location {
}

static fullyQualifyUrl (url) {
return $Location.resolve(window.location.origin, url)
return this.resolve(window.location.origin, url)
}

static mergeUrlWithParams (url, params) {
Expand Down Expand Up @@ -192,7 +192,13 @@ class $Location {
}

static qualifyWithBaseUrl (baseUrl, url) {
return $Location.resolve(baseUrl, url)
// if we have a root url and our url isnt full qualified
if (baseUrl && !this.isFullyQualifiedUrl(url)) {
// prepend the root url to it
url = this.join(baseUrl, url)
}

return this.fullyQualifyUrl(url)
}

static isAbsoluteRelative (segment) {
Expand Down