Merge branch 'sh-ldap-set-first-password-qa' into 'master'

Set initial password for instance in LDAP QA test

See merge request gitlab-org/gitlab-ce!17024
This commit is contained in:
Grzegorz Bizon 2018-02-09 09:06:01 +00:00
commit 7534f7a892

View file

@ -31,22 +31,29 @@ module QA
end
end
def set_initial_password_if_present
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
end
def sign_in_using_ldap_credentials
click_link 'LDAP'
using_wait_time 0 do
set_initial_password_if_present
fill_in :username, with: Runtime::User.name
fill_in :password, with: Runtime::User.password
click_link 'LDAP'
click_button 'Sign in'
fill_in :username, with: Runtime::User.name
fill_in :password, with: Runtime::User.password
click_button 'Sign in'
end
end
def sign_in_using_credentials
using_wait_time 0 do
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
set_initial_password_if_present
click_link 'Standard' if page.has_content?('LDAP')