diff options
Diffstat (limited to 'qa/qa/page/main/login.rb')
-rw-r--r-- | qa/qa/page/main/login.rb | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/qa/qa/page/main/login.rb b/qa/qa/page/main/login.rb index bea01a5bbc7..3a836210dea 100644 --- a/qa/qa/page/main/login.rb +++ b/qa/qa/page/main/login.rb @@ -42,6 +42,7 @@ module QA element :saml_login_button element :github_login_button element :oidc_login_button + element :gitlab_oauth_login_button end view 'app/views/layouts/devise.html.haml' do @@ -108,6 +109,7 @@ module QA # Happens on clean GDK installations when seeded root admin password is expired # def set_up_new_password_if_required(user:, skip_page_validation:) + Support::WaitForRequests.wait_for_requests return unless has_content?('Set up new password', wait: 1) Profile::Password.perform do |new_password_page| @@ -189,11 +191,16 @@ module QA click_element :saml_login_button end - def sign_in_with_oidc + def sign_in_with_gitlab_oidc set_initial_password_if_present click_element :oidc_login_button end + def sign_in_with_gitlab_oauth + set_initial_password_if_present + click_element :gitlab_oauth_login_button + end + def sign_out_and_sign_in_as(user:) Menu.perform(&:sign_out_if_signed_in) has_sign_in_tab? @@ -238,9 +245,7 @@ module QA Support::WaitForRequests.wait_for_requests - wait_until(sleep_interval: 5, message: '502 - GitLab is taking too much time to respond') do - has_no_text?('GitLab is taking too much time to respond') - end + wait_for_gitlab_to_respond # For debugging invalid login attempts has_notice?('Invalid login or password') @@ -249,7 +254,14 @@ module QA terms.accept_terms if terms.visible? end + Flow::UserOnboarding.onboard_user + + wait_for_gitlab_to_respond + Page::Main::Menu.perform(&:enable_new_navigation) if Runtime::Env.super_sidebar_enabled? + + wait_for_gitlab_to_respond + Page::Main::Menu.validate_elements_present! unless skip_page_validation end |