Skip to content
Browse files

Fix scenario covering the `get_base_dom_id_from_label_tag` method.

  • Loading branch information...
1 parent ab7b8b1 commit a3453dc45db84a5066cfbaac139c9919ab2b5e95 @stevehodgkiss stevehodgkiss committed Mar 23, 2011
Showing with 17 additions and 4 deletions.
  1. +17 −4 features/select_dates.feature
View
21 features/select_dates.feature
@@ -2,7 +2,9 @@ Feature: Select dates
Background: A simple calendar app
Given I have created a new Rails 3 app "rails-3-app" with cucumber-rails support
- And I successfully run `bundle exec rails g scaffold appointment name:string when:datetime`
+
+ Scenario: Select dates
+ Given I successfully run `bundle exec rails g scaffold appointment name:string when:datetime`
And I write to "features/create_appointment.feature" with:
"""
Feature: Create appointments
@@ -15,15 +17,26 @@ Feature: Select dates
And I should see "2009-02-20 15:10:00 UTC"
"""
When I run `bundle exec rake db:migrate cucumber`
-
- Scenario: Select dates
Then it should pass with:
"""
1 scenario (1 passed)
6 steps (6 passed)
"""
Scenario: Select dates with label pointing to first select
+ Given I successfully run `bundle exec rails g scaffold appointment name:string when:date`
+ And I write to "features/create_appointment.feature" with:
+ """
+ Feature: Create appointments
+ Scenario: Constitution on May 17
+ Given I am on the new appointment page
+ And I fill in "Norway's constitution" for "Name"
+ And I select "2009-02-20 15:10:00 UTC" as the "When" date
+ And I press "Create Appointment"
+ Then I should see "Norway's constitution"
+ And I should see "2009-02-20"
+ """
+ When I run `bundle exec rake db:migrate cucumber`
Given I write to "app/views/appointments/_form.html.erb" with:
"""
<%= form_for(@appointment) do |f| %>
@@ -32,7 +45,7 @@ Feature: Select dates
<%= f.text_field :name %>
</div>
<div class="field">
- <%= f.label :when, :for => "when_1i" %><br />
+ <%= f.label :when, :for => "appointment_when_1i" %><br />
<%= f.datetime_select :when %>
</div>
<div class="actions">

0 comments on commit a3453dc

Please sign in to comment.
Something went wrong with that request. Please try again.