Skip to content

Instantly share code, notes, and snippets.

@skydan
Created August 22, 2013 11:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skydan/6306162 to your computer and use it in GitHub Desktop.
Save skydan/6306162 to your computer and use it in GitHub Desktop.
### Current Style
Feature: Admin Login
In order to access the admin functionality of the site
As a registered admin of it
I need to be able to login into it
Scenario Outline: Successfully login with correct credentials
Given an admin account exists with email <email> and password <password>
And I am at the admin login page
When I fill in the email <email>
And I fill in the password <password>
And I click the "Login" button
Then I should see the "Signed in successfully." message
And I should be at the "Dashboard" page
###
### New BA Style
###
Feature: Admin Login
In order to access the admin functionality of the site
As a registered admin of it
I need to be able to login into it
# we have to consider both paths, the happy one and the non-happy one
Scenario Outline: Successfully login with correct credentials
Given an admin account exists with email <email> and password <password>
And I am at the admin login page
When I fill in the email <email>
And I fill in the password <password>
And I click the "Login" button
Then I should see the "Signed in successfully." message
And I should be at the "Dashboard" page
###
### Third Experimental Variant
###
Feature: Admin Login
In order to access the admin functionality of the site
As a registered admin of it
I need to be able to login into it
Scenario Outline: Successfully login with correct credentials
Given an admin account exists with email <email> and password <password>
And I am at the admin login page
When I fill in the email <email>
And I fill in the password <password>
And I click the "Login" button
Then I should see the "Signed in successfully." message
And I should be at the "Dashboard" page
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment