switch origin

This commit is contained in:
Elio Bischof
2023-08-02 15:10:36 +02:00
parent 24e57e992b
commit 6f1da976c4

View File

@@ -1,7 +1,7 @@
import { stub } from "../support/mock";
const CUSTOM_TEXT = "Hubba Bubba";
const IDP_URL = "https://google.com";
const IDP_URL = "https://example.com/idp/url";
describe("register idps", () => {
beforeEach(() => {
@@ -29,8 +29,9 @@ describe("register idps", () => {
it("should redirect the user to the correct url", () => {
cy.visit("/register/idp");
const button = cy.get('button[e2e="google"]');
button.click();
cy.location("href", { timeout: 10_000 }).should("eq", IDP_URL);
cy.get('button[e2e="google"]').click();
cy.origin(IDP_URL, ()=> {
cy.location("href", { timeout: 10_000 }).should("eq", IDP_URL);
})
});
});