fix failing tests

This commit is contained in:
Reinier Balt 2011-08-18 09:38:48 +02:00
parent 3bf8c461f1
commit bd7419a592
3 changed files with 5 additions and 4 deletions

View file

@ -41,7 +41,7 @@ Feature: Show all due actions in a calendar view
Then I should not see "a new next action"
@selenium
Scenario: Deleting a todo complete will remove it from the calendar
Scenario: Deleting a todo will remove it from the calendar
Given I have a todo "a new next action" in the context "@calendar" which is due tomorrow
When I go to the calendar page
Then I should see "a new next action"

View file

@ -70,7 +70,7 @@ Feature: Show statistics
Then I should not see the todo "todo 1"
And I should see the todo "foo bar"
@selenium @wip
@selenium
Scenario: Marking a todo selected from a chart as complete will remove it from the page
Given I have 5 todos
When I go to the statistics page

View file

@ -119,18 +119,19 @@ end
When /^I edit the due date of "([^"]*)" to "([^"]*)"$/ do |action_description, date|
todo = @current_user.todos.find_by_description(action_description)
todo.should_not be_nil
open_edit_form_for(todo)
fill_in "due_todo_#{todo.id}", :with => date
submit_edit_todo_form(todo)
end
When /^I edit the due date of "([^"]*)" to tomorrow$/ do |action_description|
date = format_date(todo.created_at + 1.day)
date = format_date(Time.zone.now + 1.day)
When "I edit the due date of \"#{action_description}\" to \"#{date}\""
end
When /^I edit the due date of "([^"]*)" to next month$/ do |action_description|
date = format_date(todo.created_at + 1.month)
date = format_date(Time.zone.now + 1.month)
When "I edit the due date of \"#{action_description}\" to \"#{date}\""
end