This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Scenario: Add an invalid new task | |
Given I am on the tasks page | |
When I select "December 25, 2010" as the date | |
And I press "add" | |
Then I should see "1 error prohibited this task from being saved" | |
And I should see "Desc can't be blank" | |
And the selected date for "task[due]" should be "December 25, 2010" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Then /^the selected date for "([^"]*)" should be "([^"]*)"$/ do |field, date| | |
field = field.tr('[', '_') | |
field = field.tr(']', '_') | |
year_field = field + '1i' | |
month_field = field + '2i' | |
day_field = field + '3i' | |
date = Date.parse(date) | |
field_with_id(year_field).element.search(".//option[@selected = 'selected']").inner_html.should =~ /#{date.year}/ |
NewerOlder