Skip to content

cy.visit() should allow override of baseUrl #30000

Open
@mryellow

Description

@mryellow

What would you like?

cy.visit() should itself accept the option baseUrl: null.

Then it can be disabled on a case-by-case basis without impacting an entire test by specifying in options for it or by calling Cypress.config('baseUrl', null).

Why is this needed?

#2918
#4450

Other

if (Cypress.isCrossOriginSpecBridge) {
url = $Location.qualifyWithBaseUrl(Cypress.state('originCommandBaseUrl'), url)
} else {
const baseUrl = config('baseUrl')
if (baseUrl) {
url = $Location.qualifyWithBaseUrl(baseUrl, url)
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    E2EIssue related to end-to-end testingtype: featureNew feature that does not currently exist

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions