mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-14 19:28:10 +01:00
fix #1052 based on the work of Tim Madden. Thanks Tim!
This commit is contained in:
parent
e9d92438d6
commit
b53fbc64dc
8 changed files with 78 additions and 28 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue