forked from kubeflow/kubeflow
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
19 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,4 +21,23 @@ describe('Landing Page', () => { | |
cy.get('main-page').shadow().find('landing-page').shadow().find('#MainCard > neon-animatable').find('md2-input#Email').should('exist').and('have.prop', 'value', '[email protected]'); | ||
cy.get('main-page').shadow().find('landing-page').shadow().find('#MainCard > neon-animatable').find('md2-input#Namespace').should('exist').and('have.prop', 'value', 'user-name'); | ||
}); | ||
|
||
// Ig the email is cloud statcan (or any not statcan.gc.ca) expect to see error with logout | ||
it('should show wrong email page', ()=>{ | ||
cy.intercept('GET', `/api/workgroup/exists`, { | ||
"hasAuth":true, | ||
"user":"[email protected]", | ||
"email": "[email protected]", | ||
"hasWorkgroup":false, | ||
"registrationFlowAllowed":true | ||
}).as('mockWorkgroupRequest'); | ||
cy.visit('/'); | ||
|
||
cy.wait(['@mockWorkgroupRequest', '@mockDashboardLinksRequest']); | ||
|
||
cy.get('main-page').shadow().find('landing-page').should('exist'); | ||
cy.get('main-page').shadow().find('landing-page').shadow().find('#MainCard > neon-animatable > h2').should('have.text', 'Welcome'); | ||
cy.get('main-page').shadow().find('landing-page').shadow().find('#MainCard > neon-animatable > p').should('have.text', 'You are currently logged in using [email protected], this domain is not supported. Please log out and log in using your “@statcan.gc.ca” email.'); | ||
cy.get('main-page').shadow().find('landing-page').shadow().find('#MainCard > neon-animatable > paper-button').should('have.text', 'Logout'); | ||
}) | ||
}); |