fix #1052 based on the work of Tim Madden. Thanks Tim!

This commit is contained in:
Reinier Balt 2011-02-26 11:38:39 +01:00
parent e9d92438d6
commit b53fbc64dc
8 changed files with 78 additions and 28 deletions

View file

@ -1,5 +1,5 @@
Given /^I have logged in as "(.*)" with password "(.*)"$/ do |username, password|
visit login_path
When "I go to the login page"
fill_in "Login", :with => username
fill_in "Password", :with => password
uncheck "Stay logged in:"
@ -7,7 +7,8 @@ Given /^I have logged in as "(.*)" with password "(.*)"$/ do |username, password
if response.respond_to? :selenium
selenium.wait_for_page_to_load(5000)
end
response.should contain(/Logout \(#{username}\)/)
logout_string = @mobile_interface ? "Logout" : "Logout \(#{username}\)"
response.should contain(/#{logout_string}/)
@current_user = User.find_by_login(username)
end