Skip to content

Instantly share code, notes, and snippets.

@InfoSec812
Created October 20, 2018 03:34
Show Gist options
  • Select an option

  • Save InfoSec812/a52ef1bcb39f5e5725f1d73ae13fd4b4 to your computer and use it in GitHub Desktop.

Select an option

Save InfoSec812/a52ef1bcb39f5e5725f1d73ae13fd4b4 to your computer and use it in GitHub Desktop.
Updated Login feature specifications
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