-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Incorporated tests from qa-ofmcc-1250-crm-login.
- Loading branch information
weskubo-cgi
authored and
weskubo-cgi
committed
Aug 15, 2024
1 parent
e42612a
commit d432f40
Showing
3 changed files
with
46 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,17 +26,52 @@ describe('Login to CRM via AAD', () => { | |
}) | ||
}) | ||
|
||
it.skip('failed login', () => { | ||
it('navigate to organization', () => { | ||
cy.webExceptions(CRM_BASE_URL) | ||
cy.visit('https://google.ca') | ||
cy.loginToAAD('[email protected]', 'password', CRM_URL, CRM_BASE_URL) | ||
|
||
// Validate urror | ||
cy.get('div[role="alert"]') | ||
.contains( | ||
'This username may be incorrect. Make sure you typed it correctly. Otherwise, contact your admin.' | ||
) | ||
.should('exist') | ||
cy.loginToAAD(AAD_USERNAME, AAD_PASSWORD, CRM_URL, CRM_BASE_URL) | ||
cy.visit(CRM_URL) | ||
cy.origin(CRM_BASE_URL, () => { | ||
cy.on('uncaught:exception', (e) => { | ||
return false | ||
}) | ||
|
||
cy.get('ul[aria-label="Childcare Providers"]') | ||
.contains('Organization-Facilities') | ||
.click() | ||
cy.get( | ||
'input[aria-label="Organization-Facility Filter by keyword"]' | ||
).type('Test-1088 Organization{enter}') | ||
cy.wait(5000) | ||
cy.get('div[row-index="0"]') | ||
.find('input[type="checkbox"]') | ||
.click({ force: true }) | ||
cy.get('ul[aria-label="Organization-Facility Commands"]') | ||
.find('button') | ||
// XXX This should be Edit but for some reason it's not displaying | ||
// Test is still valid as Org can be actioned with either button | ||
.contains('Activate') | ||
.click() | ||
}) | ||
}) | ||
|
||
it('failed login', () => { | ||
cy.webExceptions(CRM_BASE_URL) | ||
cy.visit('https://google.ca') | ||
//cy.loginToAAD('[email protected]', 'password', CRM_URL, CRM_BASE_URL) | ||
cy.visit(CRM_BASE_URL) | ||
cy.origin('login.microsoftonline.com', () => { | ||
cy.get('input[type="email"]').type('[email protected]', { | ||
log: false, | ||
}) | ||
cy.get('input[type="submit"]').click() | ||
|
||
// Validate error | ||
cy.get('div[role="alert"]') | ||
.contains( | ||
'This username may be incorrect. Make sure you typed it correctly. Otherwise, contact your admin.' | ||
) | ||
.should('exist') | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters