Skip to content

Commit

Permalink
Formatting fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
weskubo-cgi authored and weskubo-cgi committed Oct 16, 2024
1 parent 488c104 commit d5861d4
Showing 1 changed file with 29 additions and 29 deletions.
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
const USERNAME = Cypress.env("PORTAL_USERNAME");
const PASSWORD = Cypress.env("PORTAL_PASSWORD");
const PORTAL_URL = Cypress.env("PORTAL_URL");
const USERNAME = Cypress.env('PORTAL_USERNAME')
const PASSWORD = Cypress.env('PORTAL_PASSWORD')
const PORTAL_URL = Cypress.env('PORTAL_URL')

describe("Login to Portal", () => {
it("system messages", () => {
cy.visit(PORTAL_URL);
cy.get('div[role="alert"]').contains("Test Message");
});
it("successful login", () => {
cy.loginToPortal(USERNAME, PASSWORD, PORTAL_URL);
cy.visit(PORTAL_URL);
describe('Login to Portal', () => {
it('system messages', () => {
cy.visit(PORTAL_URL)
cy.get('div[role="alert"]').contains('Test Message')
})
it('successful login', () => {
cy.loginToPortal(USERNAME, PASSWORD, PORTAL_URL)
cy.visit(PORTAL_URL)

// Facility is hidden in Org header
cy.get("#changeFacility").should("not.exist");
cy.get('#changeFacility').should('not.exist')

// All cards are available to Account Manager
cy.get("#reporting-card").should("exist");
cy.get("#funding-card").should("exist");
cy.get("#assistance-card").should("exist");
cy.get("#applications-card").should("exist");
cy.get("#account-mgmt-card").should("exist");
cy.get("#help-card").should("exist");
});
cy.get('#reporting-card').should('exist')
cy.get('#funding-card').should('exist')
cy.get('#assistance-card').should('exist')
cy.get('#applications-card').should('exist')
cy.get('#account-mgmt-card').should('exist')
cy.get('#help-card').should('exist')
})

it("failed login", () => {
it('failed login', () => {
// SSO has error in application code on failed login
cy.on("uncaught:exception", (e) => {
return false;
});
cy.loginToPortalNoSession("doesnotexist", "password", PORTAL_URL);
cy.visit(PORTAL_URL);
cy.on('uncaught:exception', (e) => {
return false
})
cy.loginToPortalNoSession('doesnotexist', 'password', PORTAL_URL)
cy.visit(PORTAL_URL)
// Should be back on Login screen
cy.get("a[id=bceid-login").should("exist");
cy.get("#reporting-card").should("not.exist");
});
});
cy.get('a[id=bceid-login').should('exist')
cy.get('#reporting-card').should('not.exist')
})
})

0 comments on commit d5861d4

Please sign in to comment.