Linked Questions

Popular Questions

I have a test suite that opens a local url before making a bunch of assertions on some DOM elements.

Now I'd like to integrate Cypress in my CI/CD but I'm unsure on how to tell Cypress to visit the staging url instead of the local one.

Any idea?

it('The body of the page is in viewport', function() {
    let initialPosition;
    const body = cy.get('body');
    body.should('have.class', 'pdfView');
    cy.get('.body-wrapper').should($el => {
      initialPosition = $el.position();

I'd like for the visit url to automatically switch to say the staging one (which could be on the CI environment.

Related Questions