https://cypress.io logo
hi again. is that a way to use two baseUrl or some...
# general-chat
m
hi again. is that a way to use two baseUrl or something similar in order to avoid passing full URL but rather just suffix? I need to deal two different domains in one test (Kubernetes cluster and app running on) so need to switch "context" several times. I set baseUrl for app domain but need shorten Kubernetes cluster's URL also. hostnames arriving in env vars by CI pipeline. what came to my mind is cy.origin() but doesn't let me use custom commands within cy.origin().
Copy code
cy.origin(Cypress.env("k8sBase"), () => {

            const createK8sDeploymentUrl =
            "/namespaces/deployments";
          
        cy.createDeployment(createK8sDeploymentUrl, Cypress.env("k8sToken"));
        })
other idea is just setting baseUrl any time I switch context. any idea is much appreciated.