Created
May 10, 2019 23:51
-
-
Save vitorebatista/d979332bb57c1ad17b031f7e3e0cd677 to your computer and use it in GitHub Desktop.
BDD - Login example with Cucumber
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
Feature: Login | |
I want to login on Keepfy | |
Background: | |
Given I go to '/login' | |
And the field 'email' is empty | |
And the field 'password' is empty | |
Scenario: Error on empty fields | |
When I click on 'enter' | |
Then field 'email' should be with error | |
And field 'password' should be with error | |
Scenario: Wrong password | |
When I type '[email protected]' in 'email' | |
And I type '123456' in 'password' | |
And I click on 'enter' | |
Then I should see 'E-mail or password is incorrect' | |
Scenario: Login successfully | |
Given I have users: | |
| name | email | password | | |
| Vitor Batista | [email protected] | abcdef | | |
When I type '[email protected]' in 'email' | |
And I type 'abcdef' in 'password' | |
And I click on 'enter' | |
Then I shouldn't see 'Access your account' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment