|
1 |
| -const USERNAME = Cypress.env('PORTAL_USERNAME') |
2 |
| -const PASSWORD = Cypress.env('PORTAL_PASSWORD') |
3 |
| -const PORTAL_URL = Cypress.env('PORTAL_URL') |
| 1 | +const USERNAME = Cypress.env("PORTAL_USERNAME"); |
| 2 | +const PASSWORD = Cypress.env("PORTAL_PASSWORD"); |
| 3 | +const PORTAL_URL = Cypress.env("PORTAL_URL"); |
4 | 4 |
|
5 |
| -describe('Login to Portal', () => { |
6 |
| - it('system messages', () => { |
7 |
| - cy.visit(PORTAL_URL) |
8 |
| - cy.get('div[role="alert"]').contains('Test Message') |
9 |
| - }) |
10 |
| - it('successful login', () => { |
11 |
| - cy.loginToPortal(USERNAME, PASSWORD, PORTAL_URL) |
12 |
| - cy.visit(PORTAL_URL) |
| 5 | +describe("Login to Portal", () => { |
| 6 | + it("system messages", () => { |
| 7 | + cy.visit(PORTAL_URL); |
| 8 | + cy.get('div[role="alert"]').contains("Test Message"); |
| 9 | + }); |
| 10 | + it("successful login", () => { |
| 11 | + cy.loginToPortal(USERNAME, PASSWORD, PORTAL_URL); |
| 12 | + cy.visit(PORTAL_URL); |
13 | 13 |
|
14 | 14 | // Facility is hidden in Org header
|
15 |
| - cy.get('#changeFacility').should('not.exist') |
| 15 | + cy.get("#changeFacility").should("not.exist"); |
16 | 16 |
|
17 | 17 | // All cards are available to Account Manager
|
18 |
| - cy.get('#reporting-card').should('exist') |
19 |
| - cy.get('#funding-card').should('exist') |
20 |
| - cy.get('#assistance-card').should('exist') |
21 |
| - cy.get('#applications-card').should('exist') |
22 |
| - cy.get('#account-mgmt-card').should('exist') |
23 |
| - cy.get('#help-card').should('not.exist') |
24 |
| - }) |
| 18 | + cy.get("#reporting-card").should("exist"); |
| 19 | + cy.get("#funding-card").should("exist"); |
| 20 | + cy.get("#assistance-card").should("exist"); |
| 21 | + cy.get("#applications-card").should("exist"); |
| 22 | + cy.get("#account-mgmt-card").should("exist"); |
| 23 | + cy.get("#help-card").should("exist"); |
| 24 | + }); |
25 | 25 |
|
26 |
| - it('failed login', () => { |
| 26 | + it("failed login", () => { |
27 | 27 | // SSO has error in application code on failed login
|
28 |
| - cy.on('uncaught:exception', (e) => { |
29 |
| - return false |
30 |
| - }) |
31 |
| - cy.loginToPortalNoSession('doesnotexist', 'password', PORTAL_URL) |
32 |
| - cy.visit(PORTAL_URL) |
| 28 | + cy.on("uncaught:exception", (e) => { |
| 29 | + return false; |
| 30 | + }); |
| 31 | + cy.loginToPortalNoSession("doesnotexist", "password", PORTAL_URL); |
| 32 | + cy.visit(PORTAL_URL); |
33 | 33 | // Should be back on Login screen
|
34 |
| - cy.get('a[id=bceid-login').should('exist') |
35 |
| - cy.get('#reporting-card').should('not.exist') |
36 |
| - }) |
37 |
| -}) |
| 34 | + cy.get("a[id=bceid-login").should("exist"); |
| 35 | + cy.get("#reporting-card").should("not.exist"); |
| 36 | + }); |
| 37 | +}); |
0 commit comments