From 5fdc5ae43657a3e215bfdf611a0c5967f838106a Mon Sep 17 00:00:00 2001 From: Reinier Balt Date: Wed, 9 Mar 2011 12:27:47 +0100 Subject: [PATCH] add test for last commit fix merge error --- features/project_edit.feature | 5 +++-- features/step_definitions/todo_steps.rb | 9 ++------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/features/project_edit.feature b/features/project_edit.feature index a48f4629..dd20a77c 100644 --- a/features/project_edit.feature +++ b/features/project_edit.feature @@ -101,7 +101,8 @@ Feature: Edit a project @selenium @wip Scenario: I can move a todo out of the current project Given I have a project "foo" with 2 todos + And I have a project called "bar" When I go to the "foo" project And I change the project_name field of "Todo 1" to "bar" - Then I should not see the todo "Todo 1" - And I should see the todo "Todo 2" + Then I should not see "Todo 1" + And I should see "Todo 2" diff --git a/features/step_definitions/todo_steps.rb b/features/step_definitions/todo_steps.rb index 177edf57..8cb5a957 100644 --- a/features/step_definitions/todo_steps.rb +++ b/features/step_definitions/todo_steps.rb @@ -61,18 +61,13 @@ Given /^I have a project "([^"]*)" that has the following todos$/ do |project_na end end -When /I change the (.*) field of "([^\"]*)" to "([^\"]*)"$/ do |field, todo_name, new_value| +When /I change the (.*) field of "([^\"]*)" to "([^\"]*)"$/ do |field_name, todo_name, new_value| todo = @current_user.todos.find_by_description(todo_name) todo.should_not be_nil - #selenium.click("//img[@id='edit_icon_todo_#{todo.id}']", :wait_for => :ajax, :javascript_framework => :jquery) open_edit_form_for(todo) - selenium.type("css=form.edit_todo_form input[name=#{field}]", new_value) - #selenium.click("css=button.positive", :wait_for => :ajax, :javascript_framework => :jquery) + selenium.type("css=form.edit_todo_form input[name=#{field_name}]", new_value) submit_edit_todo_form(todo) - - # TODO: change to a wait_for - sleep(1) end When /^I submit a new action with description "([^"]*)"$/ do |description|