Skip to content

Instantly share code, notes, and snippets.

@fabiolnm
Created November 20, 2011 13:56
Show Gist options
  • Save fabiolnm/1380288 to your computer and use it in GitHub Desktop.
Save fabiolnm/1380288 to your computer and use it in GitHub Desktop.
Contact List Features
Feature: Manage Contacts
In order to make a Contact List
As a popular person
I want to create and manage contacts
Scenario: Empty Contact List
Given I have no contacts
When I go to the contact list
Then I should see "No contacts found."
Scenario: A Single Contact
Given I have a single contact
When I go to the contact list
Then I should see "1 contact found"
Scenario: Two Contacts
Given I have two contacts
When I go to the contact list
Then I should see "2 contacts found"
Scenario: Named contacts
Given I have contacts named Sabrina Sato, Dani Bananinha, Juju Panicat
When I go to the contact list
Then I should see "3 contact found"
And I should see "Sabrina Sato"
And I should see "Dani Bananinha"
And I should see "Juju Panicat"
Scenario: See Juju Panicat phone numbers
Given I have contact named Juju Panicat
And Juju Panicat has Work Number 1234-5678
And Juju Panicat has Cell Number 8765-4321
When I go to the contact list
And Open Juju Panicat's phone numbers
Then I should see
| Cell Number | 8765-4321 |
| Work Number | 1234-5678 |
Scenario: Submit new contact without phone number
Given A contact named Flavia Vianna with no phone numbers
When I add the contact
Then I should see "Cannot add contact without phone numbers."
Scenario: Submit new contact with Cell Number only
Given A contact named Flavia Vianna with Cell Number 8765-4321
When I add the contact
Then I should see "Contact saved!"
And I should see "Contact: Flavia Vianna"
And I should see
| Cell Number | 8765-4321 |
Scenario: Submit new contact with Work Number only
Given A contact named Flavia Vianna with Work Number 1234-5678
When I add the contact
Then I should see "Contact saved!"
And I should see "Contact: Flavia Vianna"
And I should see
| Work Number | 1234-5678 |
Scenario: Submit new contact with Cell Number and Work Number
Given A contact named Flavia Vianna with Cell Numbers
| Work Number | 1234-5678 |
| Cell Number | 8765-4321 |
When I add the contacts
Then I should see "Contacts saved!"
And I should see "Contact: Flavia Vianna"
And I should see
| Cell Number | 8765-4321 |
| Work Number | 1234-5678 |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment