-
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.
Update cypress e2e tests to work with icon-based buttons
- Loading branch information
Showing
7 changed files
with
137 additions
and
66 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 |
---|---|---|
|
@@ -2,27 +2,27 @@ describe('Sign up and log out', () => { | |
// first user that signs up to this app is given admin permissions. | ||
it('Create first user and log out', () => { | ||
cy.app_signup('AdminUser', 'test', '[email protected]', 'Admin User'); | ||
cy.contains('Log Out').click(); | ||
cy.get('#logout').click(); | ||
}); | ||
|
||
it('Create second user and log out', () => { | ||
cy.app_signup('SecondUser', 'test', '[email protected]', 'Second User'); | ||
cy.contains('Log Out').click(); | ||
cy.get('#logout').click(); | ||
}); | ||
}); | ||
|
||
describe('Log in and log out, verify permissions are correct', () => { | ||
it('Log in admin account, verify admin permissions, log out', () => { | ||
cy.app_login('[email protected]', 'test',); | ||
cy.contains('New Project'); | ||
cy.contains('Log Out').click(); | ||
cy.get('#logout').click(); | ||
cy.url().should('eq', 'http://localhost:3000/'); | ||
}); | ||
|
||
it('Log in user account, verify no admin permissions, log out', () => { | ||
cy.app_login('[email protected]', 'test'); | ||
cy.contains('New Project').should('not.exist'); | ||
cy.contains('Log Out').click(); | ||
cy.get('#logout').click(); | ||
cy.url().should('eq', 'http://localhost:3000/'); | ||
}) | ||
}); |
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
Oops, something went wrong.