blob: c5432f83593a0bd090f4918f3395a1b33b15d060 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
require 'timeout'
module QA
module Page
module Main
class Entry < Page::Base
def initialize
visit('/')
# This resolves cold boot / post-deployment migrations running
# problems.
#
Timeout.timeout(240) do
loop do
break if page.has_css?('.application', wait: 10)
refresh
end
end
end
def sign_in_using_credentials
if page.has_content?('Change your password')
fill_in :user_password, with: Runtime::User.password
fill_in :user_password_confirmation, with: Runtime::User.password
click_button 'Change your password'
end
fill_in :user_login, with: Runtime::User.name
fill_in :user_password, with: Runtime::User.password
click_button 'Sign in'
end
end
end
end
end
|