Created
October 20, 2018 03:34
-
-
Save InfoSec812/a52ef1bcb39f5e5725f1d73ae13fd4b4 to your computer and use it in GitHub Desktop.
Updated Login feature specifications
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
| Feature: User login | |
| Scenario: Entering credentials and clicking the login button | |
| Given an instance of our Login component | |
| And a mocked implementation of the login method | |
| When I enter a username | |
| And I enter a password | |
| And I click the login button | |
| Then I expect the login handler method to be executed | |
| Scenario: Logging in calls REST API client | |
| Given a mock instance of the API client | |
| And a mock instance of the Vue router | |
| And an instance of the LogIn component | |
| When I enter a valid username | |
| And I enter a valid password | |
| And I click the login button | |
| Then I expect that the username property is set correctly | |
| And I expect that the password property is set correctly | |
| And I expect that the userAuth method on the API client is called | |
| And I expect that the Vue router has been called to navigate away from the Login |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment