Rails 3 in action book - Chapter 7.3.1
I did as the steps in the book but cucumber test is not passing this time !
➜ ticketee git:(master) ✗ rake cucumber:ok
/home/dexter/.rvm/rubies/ruby-1.9.3-p194/bin/ruby -S bundle exec
cucumber --profile default
Rack::File headers parameter replaces cache_control after Rack 1.5.
Using the default profile...
Feature: Creating projects
In order to have projects to assign tickets to
As a user
I want to create them easily
Background: #
features/creating_projects.feature:6
Given there are the following users: #
features/step_definitions/user_steps.rb:1
| email | password | admin |
| admin@ticketee.com | password | true |
And I am signed in as them #
features/step_definitions/user_steps.rb:11
Given I am on the homepage #
features/step_definitions/web_steps.rb:44
When I follow "New Project" #
features/step_definitions/web_steps.rb:56
Scenario: Creating a project #
features/creating_projects.feature:14
And I fill in "Name" with "TextMate 2" #
features/step_definitions/web_steps.rb:60
Unable to find field "Name" (Capybara::ElementNotFound)
./features/step_definitions/web_steps.rb:61:in `/^(?:|I )fill in
"([^"]*)" with "([^"]*)"$/'
features/creating_projects.feature:15:in `And I fill in "Name"
with "TextMate 2"'
And I press "Create Project" #
features/step_definitions/web_steps.rb:52
Then I should see "Project has been created." #
features/step_definitions/web_steps.rb:105
And I should be on the project page for "TextMate 2" #
features/step_definitions/web_steps.rb:230
And I should see "TextMate 2" #
features/step_definitions/web_steps.rb:105
Scenario: Creating a project without a name #
features/creating_projects.feature:21
And I press "Create Project" #
features/step_definitions/web_steps.rb:52
Unable to find button "Create Project" (Capybara::ElementNotFound)
./features/step_definitions/web_steps.rb:53:in `/^(?:|I )press
"([^"]*)"$/'
features/creating_projects.feature:22:in `And I press "Create
Project"'
Then I should see "Project has not been created." #
features/step_definitions/web_steps.rb:105
And I should see "Name can't be blank" #
features/step_definitions/web_steps.rb:105
Feature: Creating Tickets
In order to create tickets for projects
As a user
I want to be able to select a project and do that
Background:
# features/creating_tickets.feature:6
Given there is a project called "Internet Explorer"
# features/step_definitions/project_steps.rb:1
And there are the following users:
# features/step_definitions/user_steps.rb:1
| email | password |
| user@ticketee.com | password |
And I am on the homepage
# features/step_definitions/web_steps.rb:44
When I follow "Internet Explorer"
# features/step_definitions/web_steps.rb:56
And I follow "New Ticket"
# features/step_definitions/web_steps.rb:56
Then I should see "You need to sign in or sign up before
continuing." # features/step_definitions/web_steps.rb:105
When I fill in "Email" with "user@ticketee.com"
# features/step_definitions/web_steps.rb:60
And I fill in "Password" with "password"
# features/step_definitions/web_steps.rb:60
And I press "Sign in"
# features/step_definitions/web_steps.rb:52
Then I should see "New Ticket"
# features/step_definitions/web_steps.rb:105
Scenario: Creating a ticket
# features/creating_tickets.feature:20
When I fill in "Title" with "Non-standards compliance"
# features/step_definitions/web_steps.rb:60
And I fill in "Description" with "My pages are ugly!"
# features/step_definitions/web_steps.rb:60
And I press "Create Ticket"
# features/step_definitions/web_steps.rb:52
Then I should see "Ticket has been created."
# features/step_definitions/web_steps.rb:105
Then I should see "Created by user@ticketee.com"
# features/step_definitions/web_steps.rb:105
Scenario: Creating a ticket without valid attributes fails
# features/creating_tickets.feature:27
When I press "Create Ticket"
# features/step_definitions/web_steps.rb:52
Then I should see "Ticket has not been created."
# features/step_definitions/web_steps.rb:105
And I should see "Title can't be blank"
# features/step_definitions/web_steps.rb:105
And I should see "Description can't be blank"
# features/step_definitions/web_steps.rb:105
Scenario: Description must be longer than 10 characters
# features/creating_tickets.feature:33
When I fill in "Title" with "Non-standards compliance"
# features/step_definitions/web_steps.rb:60
And I fill in "Description" with "it sucks"
# features/step_definitions/web_steps.rb:60
And I press "Create Ticket"
# features/step_definitions/web_steps.rb:52
Then I should see "Ticket has not been created."
# features/step_definitions/web_steps.rb:105
And I should see "Description is too short"
# features/step_definitions/web_steps.rb:105
Feature: Deleting projects
In order to remove needless projects
As a project manager
I want to make them disappear
Background: #
features/deleting_projects.feature:6
Given there are the following users: #
features/step_definitions/user_steps.rb:1
| email | password | admin |
| admin@ticketee.com | password | true |
And I am signed in as them #
features/step_definitions/user_steps.rb:11
Scenario: Deleting a project #
features/deleting_projects.feature:12
Given there is a project called "TextMate 2" #
features/step_definitions/project_steps.rb:1
And I am on the homepage #
features/step_definitions/web_steps.rb:44
When I follow "TextMate 2" #
features/step_definitions/web_steps.rb:56
And I follow "Delete Project" #
features/step_definitions/web_steps.rb:56
Then I should see "Project has been deleted." #
features/step_definitions/web_steps.rb:105
expected to find text "Project has been deleted." in "You must
be an admin to do that. Ticketee Signed in as admin@ticketee.com
New Project Projects TextMate 2"
(RSpec::Expectations::ExpectationNotMetError)
./features/step_definitions/web_steps.rb:107:in `/^(?:|I )should
see "([^"]*)"$/'
features/deleting_projects.feature:17:in `Then I should see
"Project has been deleted."'
Then I should not see "TextMate 2" #
features/step_definitions/web_steps.rb:123
Feature: Deleting tickets
In order to remove tickets
As a user
I want to press a button and make them disappear
Background: #
features/deleting_tickets.feature:6
Given there are the following users: #
features/step_definitions/user_steps.rb:1
| email | password |
| user@ticketee.com | password |
And I am signed in as them #
features/step_definitions/user_steps.rb:11
Given there is a project called "TextMate 2" #
features/step_definitions/project_steps.rb:1
And "user@ticketee.com" has created a ticket for this project: #
features/step_definitions/ticket_steps.rb:1
| title | description |
| Make it shiny! | Gradients! Starbursts! Oh my! |
Given I am on the homepage #
features/step_definitions/web_steps.rb:44
When I follow "TextMate 2" #
features/step_definitions/web_steps.rb:56
And I follow "Make it shiny!" #
features/step_definitions/web_steps.rb:56
Scenario: Deleting a ticket #
features/deleting_tickets.feature:19
When I follow "Delete Ticket" #
features/step_definitions/web_steps.rb:56
Then I should see "Ticket has been deleted." #
features/step_definitions/web_steps.rb:105
And I should be on the project page for "TextMate 2" #
features/step_definitions/web_steps.rb:230
Feature: Editing Projects
In order to update project information
As a user
I want to be able to do that through an interface
Background: #
features/editing_projects.feature:6
Given there are the following users: #
features/step_definitions/user_steps.rb:1
| email | password | admin |
| admin@ticketee.com | password | true |
And I am signed in as them #
features/step_definitions/user_steps.rb:11
Given there is a project called "TextMate 2" #
features/step_definitions/project_steps.rb:1
And I am on the homepage #
features/step_definitions/web_steps.rb:44
When I follow "TextMate 2" #
features/step_definitions/web_steps.rb:56
And I follow "Edit Project" #
features/step_definitions/web_steps.rb:56
Scenario: Updating a project #
features/editing_projects.feature:16
And I fill in "Name" with "TextMate 2 beta" #
features/step_definitions/web_steps.rb:60
Unable to find field "Name" (Capybara::ElementNotFound)
./features/step_definitions/web_steps.rb:61:in `/^(?:|I )fill in
"([^"]*)" with "([^"]*)"$/'
features/editing_projects.feature:17:in `And I fill in "Name"
with "TextMate 2 beta"'
And I press "Update Project" #
features/step_definitions/web_steps.rb:52
Then I should see "Project has been updated." #
features/step_definitions/web_steps.rb:105
Then I should be on the project page for "TextMate 2 beta" #
features/step_definitions/web_steps.rb:230
Scenario: Updating a project with invalid attributes is bad #
features/editing_projects.feature:22
And I fill in "Name" with "" #
features/step_definitions/web_steps.rb:60
Unable to find field "Name" (Capybara::ElementNotFound)
./features/step_definitions/web_steps.rb:61:in `/^(?:|I )fill in
"([^"]*)" with "([^"]*)"$/'
features/editing_projects.feature:23:in `And I fill in "Name"
with ""'
And I press "Update Project" #
features/step_definitions/web_steps.rb:52
Then I should see "Project has not been updated." #
features/step_definitions/web_steps.rb:105
Feature: Editing tickets
In order to alter ticket information
As a user
I want a form to edit the tickets
Background: #
features/editing_tickets.feature:6
Given there are the following users: #
features/step_definitions/user_steps.rb:1
| email | password |
| user@ticketee.com | password |
And I am signed in as them #
features/step_definitions/user_steps.rb:11
Given there is a project called "TextMate 2" #
features/step_definitions/project_steps.rb:1
And "user@ticketee.com" has created a ticket for this project: #
features/step_definitions/ticket_steps.rb:1
| title | description |
| Make it shiny! | Gradients! Starbursts! Oh my! |
Given I am on the homepage #
features/step_definitions/web_steps.rb:44
When I follow "TextMate 2" #
features/step_definitions/web_steps.rb:56
And I follow "Make it shiny!" #
features/step_definitions/web_steps.rb:56
When I follow "Edit Ticket" #
features/step_definitions/web_steps.rb:56
Scenario: Updating a ticket #
features/editing_tickets.feature:20
When I fill in "Title" with "Make it really shiny!" #
features/step_definitions/web_steps.rb:60
And I press "Update Ticket" #
features/step_definitions/web_steps.rb:52
Then I should see "Ticket has been updated." #
features/step_definitions/web_steps.rb:105
And I should see "Make it really shiny!" within "#ticket h2" #
features/step_definitions/web_steps.rb:35
But I should not see "Make it shiny!" #
features/step_definitions/web_steps.rb:123
Scenario: Updating a ticket with invalid information #
features/editing_tickets.feature:27
When I fill in "Title" with "" #
features/step_definitions/web_steps.rb:60
And I press "Update Ticket" #
features/step_definitions/web_steps.rb:52
Then I should see "Ticket has not been updated." #
features/step_definitions/web_steps.rb:105
Feature: Signing in
In order to use the site
As a user
I want to be able to sign in
Scenario: Siging in via confirmation
# features/signing_in.feature:6
Given there are the following users:
# features/step_definitions/user_steps.rb:1
| email | password | unconfirmed |
| user@ticketee.com | password | true |
And "user@ticketee.com" opens the email with subject "Confirmation
instructions" # features/step_definitions/email_steps.rb:80
And they click the first link in the email
# features/step_definitions/email_steps.rb:182
Then I should see "Your account was successfully confirmed"
# features/step_definitions/web_steps.rb:105
And I should see "Signed in as user@ticketee.com"
# features/step_definitions/web_steps.rb:105
Scenario: Signing in via form # features/signing_in.feature:15
Given there are the following users: #
features/step_definitions/user_steps.rb:1
| email | password |
| user@ticketee.com | password |
And I am signed in as them #
features/step_definitions/user_steps.rb:11
Feature: Signing up
In order to be attributed for my work
As a user
I want to be able to sign up
Scenario: Signing up #
features/signing_up.feature:6
Given I am on the homepage #
features/step_definitions/web_steps.rb:44
When I follow "Sign up" #
features/step_definitions/web_steps.rb:56
And I fill in "Email" with "user@ticketee.com" #
features/step_definitions/web_steps.rb:60
And I fill in "Password" with "password" #
features/step_definitions/web_steps.rb:60
And I fill in "Password confirmation" with "password" #
features/step_definitions/web_steps.rb:60
And I press "Sign up" #
features/step_definitions/web_steps.rb:52
Then I should see "You have signed up successfully." #
features/step_definitions/web_steps.rb:105
Feature: Viewing projects
In order to assign tickets to a project
As a user
I want to be able to see a list of available projects
Scenario: Listing all projects #
features/viewing_projects.feature:6
Given there is a project called "TextMate 2" #
features/step_definitions/project_steps.rb:1
And I am on the homepage #
features/step_definitions/web_steps.rb:44
When I follow "TextMate 2" #
features/step_definitions/web_steps.rb:56
Then I should be on the project page for "TextMate 2" #
features/step_definitions/web_steps.rb:230
Feature: Viewing tickets
In order ro view the tickets for a project
As a user
I want to see them on that project's page
Background: #
features/viewing_tickets.feature:6
Given there are the following users: #
features/step_definitions/user_steps.rb:1
| email | password |
| user@ticketee.com | password |
And there is a project called "TextMate 2" #
features/step_definitions/project_steps.rb:1
And "user@ticketee.com" has created a ticket for this project: #
features/step_definitions/ticket_steps.rb:1
| title | description |
| Make it shiny! | Gradients! Starbursts! Oh my! |
And there is a project called "Internet Explorer" #
features/step_definitions/project_steps.rb:1
And "user@ticketee.com" has created a ticket for this project: #
features/step_definitions/ticket_steps.rb:1
| title | description |
| Standards compliance | Isn't a joke. |
And I am on the homepage #
features/step_definitions/web_steps.rb:44
Scenario: Viewing tickets for a given project #
features/viewing_tickets.feature:20
When I follow "TextMate 2" #
features/step_definitions/web_steps.rb:56
Then I should see "Make it shiny!" #
features/step_definitions/web_steps.rb:105
And I should not see "Standards compliance" #
features/step_definitions/web_steps.rb:123
When I follow "Make it shiny!" #
features/step_definitions/web_steps.rb:56
Then I should see "Make it shiny" within "#ticket h2" #
features/step_definitions/web_steps.rb:35
And I should see "Gradients! Starbursts! Oh my!" #
features/step_definitions/web_steps.rb:105
When I follow "Ticketee" #
features/step_definitions/web_steps.rb:56
And I follow "Internet Explorer" #
features/step_definitions/web_steps.rb:56
Then I should see "Standards compliance" #
features/step_definitions/web_steps.rb:105
And I should not see "Make it shiny!" #
features/step_definitions/web_steps.rb:123
When I follow "Standards compliance" #
features/step_definitions/web_steps.rb:56
Then I should see "Standards compliance" within "#ticket h2" #
features/step_definitions/web_steps.rb:35
And I should see "Isn't a joke." #
features/step_definitions/web_steps.rb:105
Failing Scenarios:
cucumber features/creating_projects.feature:14 # Scenario: Creating a
project
cucumber features/creating_projects.feature:21 # Scenario: Creating a
project without a name
cucumber features/deleting_projects.feature:12 # Scenario: Deleting a
project
cucumber features/editing_projects.feature:16 # Scenario: Updating a
project
cucumber features/editing_projects.feature:22 # Scenario: Updating a
project with invalid attributes is bad
16 scenarios (5 failed, 11 passed)
158 steps (5 failed, 12 skipped, 141 passed)
0m2.705s
No comments:
Post a Comment