Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@yuxt
Created September 24, 2015 04:00
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 yuxt/ea4dae0981a32cced403 to your computer and use it in GitHub Desktop.
Save yuxt/ea4dae0981a32cced403 to your computer and use it in GitHub Desktop.
Feature: Locations section of the practice settings page
As a practice admin I'd like to be able to add one or multiple locations to my practice
Background:
Given I have practice
And I am admin of this practice
Scenario: Navigating to locations section of the practice settings page
Given I am in the "Home"-section of practice settings page
When I click on the "Locations" item of practice settings page menu
Then I should go to the "Locations"-section of practice settings page
Scenario: Accessing locations
Name is required
Address is require
City is required
State is required
Phone should have mask
Zip should consist of 5+4 digits. 5 required, 4 optional
State should be selected from list of USA states
Given I am in the "Locations"-section of practice settings page
Then I should see location form with the following fields:
| Field |
| name |
| address |
| suite |
| city |
| state |
| zip |
| phone |
Scenario: Adding one more location
Given I am in the "Locations"-section of practice settings page
When I click "Add more" button
Then I should get one more form for location
Scenario: Saving location
Given I am in the "Locations"-section of practice settings page
When I fill location form correctly
And I press save button
And I reload page
Then I should see location form filled
Scenario: Location validation
Name field is required
So when I save form without filling name field
I should get an error
Given I am in the "Locations"-section of practice settings page
When I fill practice location form incorrectly
And I press save button
Then I should see an error in practice location form
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment