-
Notifications
You must be signed in to change notification settings - Fork 41
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
29 changed files
with
1,684 additions
and
226 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
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 |
---|---|---|
@@ -0,0 +1,60 @@ | ||
describe('Workspaces page', () => { | ||
it('Displays create workspace button', () => { | ||
cy.login(); | ||
|
||
cy.intercept('GET', '**/api/rbac/v2/workspaces/', { | ||
statusCode: 200, | ||
body: { data: [], meta: {} }, | ||
}).as('getWorkspaces'); | ||
|
||
cy.visit('/iam/access-management/workspaces'); | ||
cy.wait('@getWorkspaces', { timeout: 30000 }); | ||
|
||
// check if Workspaces heading exists on the page | ||
cy.contains('Workspaces').should('exist'); | ||
|
||
cy.get('button[data-ouia-component-id="create-workspace-button"]').should('exist'); | ||
}); | ||
|
||
it('Opens the create workspace wizard', () => { | ||
cy.login(); | ||
|
||
cy.intercept('GET', '**/api/rbac/v2/workspaces/', { | ||
statusCode: 200, | ||
body: { data: [], meta: {} }, | ||
}).as('getWorkspaces'); | ||
|
||
cy.visit('/iam/access-management/workspaces'); | ||
cy.wait('@getWorkspaces', { timeout: 30000 }); | ||
|
||
cy.contains('Workspaces').should('exist'); | ||
|
||
cy.get('button[data-ouia-component-id="create-workspace-button"]').click(); | ||
|
||
cy.contains('Create new workspace').should('be.visible'); | ||
cy.contains('Workspace name').should('be.visible'); | ||
cy.contains('Workspace description').should('be.visible'); | ||
}); | ||
|
||
it('Closes the create workspace wizard on cancel', () => { | ||
cy.login(); | ||
|
||
cy.intercept('GET', '**/api/rbac/v2/workspaces/', { | ||
statusCode: 200, | ||
body: { data: [], meta: {} }, | ||
}).as('getWorkspaces'); | ||
|
||
cy.visit('/iam/access-management/workspaces'); | ||
cy.wait('@getWorkspaces', { timeout: 30000 }); | ||
|
||
cy.contains('Workspaces').should('exist'); | ||
|
||
cy.get('button[data-ouia-component-id="create-workspace-button"]').click(); | ||
|
||
cy.get('div[data-ouia-component-id="create-workspace-wizard"]').should('exist'); | ||
|
||
cy.contains('Cancel').click(); | ||
|
||
cy.get('div[data-ouia-component-id="create-workspace-wizard"]').should('not.exist'); | ||
}); | ||
}); |
Oops, something went wrong.