From 44c61d942a3ca6bae36dea989a563b6034af9ba7 Mon Sep 17 00:00:00 2001 From: Reinier Balt Date: Wed, 5 May 2010 19:08:41 +0200 Subject: [PATCH] make sure login works for non-selenium cucumber regression since my last commit --- features/step_definitions/login_steps.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/features/step_definitions/login_steps.rb b/features/step_definitions/login_steps.rb index e3db63fd..49995c1d 100644 --- a/features/step_definitions/login_steps.rb +++ b/features/step_definitions/login_steps.rb @@ -3,7 +3,9 @@ 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) + if response.respond_to? :selenium + selenium.wait_for_page_to_load(5000) + end response.should contain(/Login successful/) @current_user = User.find_by_login(username) end