From f53b386bd1d0a58237c220fcb712c7863bec8a2b Mon Sep 17 00:00:00 2001 From: Reinier Balt Date: Wed, 5 May 2010 13:15:00 +0200 Subject: [PATCH 1/3] remove anoying message about login text not found when running cucumber/selenium --- features/step_definitions/login_steps.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/features/step_definitions/login_steps.rb b/features/step_definitions/login_steps.rb index b4d80868..b6f52cfa 100644 --- a/features/step_definitions/login_steps.rb +++ b/features/step_definitions/login_steps.rb @@ -3,6 +3,10 @@ Given /^I have logged in as "(.*)" with password "(.*)"$/ do |username, password fill_in "Login", :with => username fill_in "Password", :with => password click_button + selenium.wait_for_page_to_load(5000) +# wait_for do +# selenium.is_visible("flash") +# end response.should contain(/Login successful/) @current_user = User.find_by_login(username) end From a0b642dab349dd2a61e813a23a862e904df03911 Mon Sep 17 00:00:00 2001 From: Reinier Balt Date: Wed, 5 May 2010 13:16:54 +0200 Subject: [PATCH 2/3] remove commented lines from last commit --- features/step_definitions/login_steps.rb | 3 --- 1 file changed, 3 deletions(-) diff --git a/features/step_definitions/login_steps.rb b/features/step_definitions/login_steps.rb index b6f52cfa..e3db63fd 100644 --- a/features/step_definitions/login_steps.rb +++ b/features/step_definitions/login_steps.rb @@ -4,9 +4,6 @@ Given /^I have logged in as "(.*)" with password "(.*)"$/ do |username, password fill_in "Password", :with => password click_button selenium.wait_for_page_to_load(5000) -# wait_for do -# selenium.is_visible("flash") -# end response.should contain(/Login successful/) @current_user = User.find_by_login(username) end From eef1b6b7a9b148fa253288e2a832125a95af378b Mon Sep 17 00:00:00 2001 From: Reinier Balt Date: Wed, 5 May 2010 13:19:26 +0200 Subject: [PATCH 3/3] remove selenium scripts that were already converted to cucumber --- .../context_listing/edit_then_delete.rsel | 15 --------------- test/selenium/context_listing/edit_twice.rsel | 19 ------------------- 2 files changed, 34 deletions(-) delete mode 100644 test/selenium/context_listing/edit_then_delete.rsel delete mode 100644 test/selenium/context_listing/edit_twice.rsel diff --git a/test/selenium/context_listing/edit_then_delete.rsel b/test/selenium/context_listing/edit_then_delete.rsel deleted file mode 100644 index 4f35a28b..00000000 --- a/test/selenium/context_listing/edit_then_delete.rsel +++ /dev/null @@ -1,15 +0,0 @@ -setup :fixtures => :all -login :as => 'admin' -open "/contexts" -click "css=#context_3 .buttons img.edit_item" -wait_for_visible "edit_context_3" -wait_for_not_visible "context_3" -type "//div[@id='edit_context_3'] //input[@name='context[name]']", "telegraph" -click "//div[@id='edit_context_3'] //button" -wait_for_not_visible "edit_context_3" -wait_for_visible "context_3" -click "css=#context_3 .buttons img.delete_item" -assert_confirmation "Are you sure that you want to delete the context 'telegraph'?" -wait_for_visible "flash" -wait_for_text "flash", "Deleted context 'telegraph'" -wait_for_element_not_present "context_3" \ No newline at end of file diff --git a/test/selenium/context_listing/edit_twice.rsel b/test/selenium/context_listing/edit_twice.rsel deleted file mode 100644 index 635a70d3..00000000 --- a/test/selenium/context_listing/edit_twice.rsel +++ /dev/null @@ -1,19 +0,0 @@ -setup :fixtures => :all -login :as => 'admin' -open "/contexts" -click "css=#context_3 .buttons img.edit_item" -wait_for_visible "edit_context_3" -wait_for_not_visible "context_3" -type "//div[@id='edit_context_3'] //input[@name='context[name]']", "telegraph" -click "//div[@id='edit_context_3'] //button" -wait_for_not_visible "edit_context_3" -wait_for_visible "context_3" -assert_text 'css=#context_3 .data a', 'telegraph' -click "css=#context_3 .buttons img.edit_item" -wait_for_visible "edit_context_3" -wait_for_not_visible "context_3" -type "//div[@id='edit_context_3'] //input[@name='context[name]']", "email" -click "//div[@id='edit_context_3'] //button" -wait_for_not_visible "edit_context_3" -wait_for_visible "context_3" -assert_text 'css=#context_3 .data a', 'email' \ No newline at end of file