-
Notifications
You must be signed in to change notification settings - Fork 287
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cypress: Tests in relevant spec category (#2225)
- Loading branch information
Showing
37 changed files
with
132 additions
and
132 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
|
@@ -49,14 +49,23 @@ describe('Users', function() { | |
cy.get('.modal input#password') | ||
.type('cypress'); | ||
|
||
// Error checking - for incorrect email format | ||
cy.get('.modal input#email').type('cypress'); | ||
|
||
cy.get('.select2-container--bootstrap').eq(1).click(); | ||
cy.log('Before waiting for Icon Dashboard element'); | ||
cy.wait('@loadHomepageAfterSearch'); | ||
cy.get('.select2-results__option') | ||
.should('contain', 'Icon Dashboard') | ||
.click(); | ||
|
||
// Add first by clicking next | ||
// Try saving | ||
cy.get('.modal .save-button').click(); | ||
|
||
cy.contains('Please enter a valid email address.'); | ||
cy.get('.modal input#email').clear().type('[email protected]'); | ||
|
||
// Save | ||
cy.get('.modal .save-button').click(); | ||
|
||
// Check if user is added in toast message | ||
|
@@ -94,6 +103,17 @@ describe('Users', function() { | |
cy.get('.modal input#userName').clear() | ||
.type('CypressTestUserEdited' + testRun); | ||
|
||
cy.get('.modal input#newPassword').clear().type('newPassword'); | ||
cy.get('.modal input#retypeNewPassword').clear().type('wrongPassword'); | ||
|
||
// edit test user | ||
cy.get('.bootbox .save-button').click(); | ||
cy.wait('@putRequest') | ||
|
||
// Error checking - for password mismatch | ||
cy.contains('Passwords do not match'); | ||
cy.get('.modal input#retypeNewPassword').clear().type('newPassword'); | ||
|
||
// edit test user | ||
cy.get('.bootbox .save-button').click(); | ||
|
||
|
File renamed without changes.
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
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
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