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
3 changed files
with
22 additions
and
6 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 |
---|---|---|
|
@@ -16,7 +16,7 @@ describe('Landing Page', () => { | |
}); | ||
|
||
it('should access the landing page', ()=>{ | ||
cy.get('main-page').shadow().find('blocked-user-view').should('not.be.visible'); | ||
cy.get('main-page').shadow().find('blocked-user-view').should('not.exist'); | ||
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').find('a').should('exist').and('have.prop', 'href', 'https://zone.pages.cloud.statcan.ca/docs/en/'); | ||
|
@@ -74,7 +74,7 @@ describe('Landing Page', () => { | |
|
||
//assert the main page and that the default notebook shows up | ||
cy.get('main-page').shadow().find('landing-page').should('not.be.visible'); | ||
cy.get('main-page').shadow().find('blocked-user-view').should('not.be.visible'); | ||
cy.get('main-page').shadow().find('blocked-user-view').should('not.exist'); | ||
cy.get('main-page').shadow().find('dashboard-view').should('exist'); | ||
cy.get('main-page').shadow().find('dashboard-view').shadow().find('notebook-default-card').shadow().find('paper-card#DefaultNotebookCard').should('exist'); | ||
cy.get('main-page').shadow().find('dashboard-view').shadow().find('notebook-default-card').shadow().find('paper-card#DefaultNotebookCard > .data-content > .button-div > paper-button#Details').should('exist'); | ||
|
@@ -146,7 +146,7 @@ describe('Landing Page', () => { | |
|
||
cy.wait(['@mockWorkgroupRequest', '@mockDashboardLinksRequest']); | ||
|
||
cy.get('main-page').shadow().find('blocked-user-view').should('not.be.visible'); | ||
cy.get('main-page').shadow().find('blocked-user-view').should('not.exist'); | ||
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.'); | ||
|
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 |
---|---|---|
|
@@ -23,7 +23,7 @@ describe('Main Page', () => { | |
|
||
it('should access the dashboard', () => { | ||
cy.get('main-page').should('exist'); | ||
cy.get('main-page').shadow().find('blocked-user-view').should('not.be.visible'); | ||
cy.get('main-page').shadow().find('blocked-user-view').should('not.exist'); | ||
cy.get('main-page').shadow().find('dashboard-view').should('exist'); | ||
// create new notebook link | ||
cy.get('main-page').shadow().find('dashboard-view').shadow().find('paper-card#Quick-Links').should('exist'); | ||
|
@@ -168,6 +168,23 @@ describe('Main Page', () => { | |
cy.get('main-page').shadow().find('a[href="https://zone.pages.cloud.statcan.ca/docs/en/"]').find('paper-item').should('have.text', 'Documentation'); | ||
}); | ||
|
||
it('should block access to user', () =>{ | ||
cy.intercept('GET', `/api/workgroup/exists`, { | ||
"hasAuth":true, | ||
"user":"[email protected]", | ||
"email": "[email protected]", | ||
"hasWorkgroup":true, | ||
"registrationFlowAllowed":true, | ||
"isAllowed": false | ||
}).as('mockWorkgroupRequest'); | ||
cy.visit('/'); | ||
|
||
cy.wait('@mockWorkgroupRequest'); | ||
|
||
cy.get('main-page').should('exist'); | ||
cy.get('main-page').shadow().find('blocked-user-view').should('exist'); | ||
}); | ||
|
||
describe('Notebook Default Card', () => { | ||
it('should have a notebook card', () => { | ||
cy.get('main-page').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