Last active
May 5, 2020 14:59
-
-
Save felippepuhle/580e2eae23e6008d8beca0c16b2330a7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| import HomePage from '../elements/pages/HomePage'; | |
| describe('Sign In', () => { | |
| it('should show an error message on empty input', () => { | |
| const home = new HomePage(); | |
| home.visit(); | |
| const signIn = home.goToSignIn(); | |
| signIn.submit(); | |
| signIn.getEmailError() | |
| .should('exist') | |
| .contains('Email is required'); | |
| signIn | |
| .getPasswordError() | |
| .should('exist') | |
| .contains('Password is required'); | |
| }); | |
| it('should sign in with correct credentials', () => { | |
| const home = new HomePage(); | |
| home.visit(); | |
| const signIn = home.goToSignIn(); | |
| signIn | |
| .fillEmail('john@doe.com') | |
| .fillPassword('123456') | |
| .submit(); | |
| home.getUserAvatar().should('exist'); | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment