Skip to content

Commit

Permalink
revert comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rajku-dev committed Dec 28, 2024
1 parent 34a8fe6 commit 88c1c16
Showing 1 changed file with 48 additions and 48 deletions.
96 changes: 48 additions & 48 deletions cypress/e2e/homepage_spec/redirect.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,54 +7,54 @@ describe("redirect", () => {
cy.log("Logging in the user devdistrictadmin");
});

// it("Check if login redirects to the right url", () => {
// cy.awaitUrl("/resource/board", true);
// loginPage.loginManuallyAsDistrictAdmin();
// loginPage.ensureLoggedIn();
// cy.url().should("include", "/resource/board");
// });

// it("Check if the redirect param works", () => {
// const baseUrl = Cypress.config("baseUrl");
// cy.awaitUrl(`login?redirect=${baseUrl}/resource/board`, true);
// loginPage.loginManuallyAsDistrictAdmin();
// loginPage.ensureLoggedIn();
// cy.url().should("include", "/resource/board");
// });

// it("Check to ensure that redirect is the same origin", () => {
// cy.awaitUrl("login?redirect=https://google.com", true);
// loginPage.loginManuallyAsDistrictAdmin();
// loginPage.ensureLoggedIn();
// cy.url().should("include", "/facility");
// });

// it("Check if 'Contribute on GitHub' link redirects correctly", () => {
// cy.awaitUrl("/", true);

// loginPage.verifyGitHubLinkPresence();
// loginPage.clickGitHubLink();

// cy.origin("https://github.com", () => {
// cy.url().should("include", "github.com/ohcnetwork");
// cy.get(".heading-element")
// .should("exist")
// .and("contain.text", "Reimagining Healthcare Delivery");
// });
// });

// it("Check if 'Third Party Software License' link redirects correctly", () => {
// cy.awaitUrl("/", true);

// loginPage.verifyLicenseLinkPresence();
// loginPage.clickThirdPartyLicenseLink();

// cy.url().should("include", "/licenses");

// cy.contains(
// "This page shows what third-party software is used in Care, including the respective licenses and versions.",
// ).should("exist");
// });
it("Check if login redirects to the right url", () => {
cy.awaitUrl("/resource/board", true);
loginPage.loginManuallyAsDistrictAdmin();
loginPage.ensureLoggedIn();
cy.url().should("include", "/resource/board");
});

it("Check if the redirect param works", () => {
const baseUrl = Cypress.config("baseUrl");
cy.awaitUrl(`login?redirect=${baseUrl}/resource/board`, true);
loginPage.loginManuallyAsDistrictAdmin();
loginPage.ensureLoggedIn();
cy.url().should("include", "/resource/board");
});

it("Check to ensure that redirect is the same origin", () => {
cy.awaitUrl("login?redirect=https://google.com", true);
loginPage.loginManuallyAsDistrictAdmin();
loginPage.ensureLoggedIn();
cy.url().should("include", "/facility");
});

it("Check if 'Contribute on GitHub' link redirects correctly", () => {
cy.awaitUrl("/", true);

loginPage.verifyGitHubLinkPresence();
loginPage.clickGitHubLink();

cy.origin("https://github.com", () => {
cy.url().should("include", "github.com/ohcnetwork");
cy.get(".heading-element")
.should("exist")
.and("contain.text", "Reimagining Healthcare Delivery");
});
});

it("Check if 'Third Party Software License' link redirects correctly", () => {
cy.awaitUrl("/", true);

loginPage.verifyLicenseLinkPresence();
loginPage.clickThirdPartyLicenseLink();

cy.url().should("include", "/licenses");

cy.contains(
"This page shows what third-party software is used in Care, including the respective licenses and versions.",
).should("exist");
});

it("Should switch languages and verify the Login button text", () => {
cy.awaitUrl("/", true);
Expand Down

0 comments on commit 88c1c16

Please sign in to comment.