From 5143dfec58b14250754f162574b7b7a07e85601d Mon Sep 17 00:00:00 2001 From: Sanad Liaquat Date: Thu, 31 Jan 2019 20:37:00 +0500 Subject: Implement review feedback --- qa/qa.rb | 1 + qa/qa/page/main/login.rb | 6 +++--- .../features/browser_ui/1_manage/login/login_via_oauth_spec.rb | 2 +- qa/qa/vendor/github/page/login.rb | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) (limited to 'qa') diff --git a/qa/qa.rb b/qa/qa.rb index 49cb32ddab9..b81c3e38bc5 100644 --- a/qa/qa.rb +++ b/qa/qa.rb @@ -342,6 +342,7 @@ module QA autoload :Login, 'qa/vendor/saml_idp/page/login' end end + module Github module Page autoload :Base, 'qa/vendor/github/page/base' diff --git a/qa/qa/page/main/login.rb b/qa/qa/page/main/login.rb index 5804c2517cb..a0a154c0344 100644 --- a/qa/qa/page/main/login.rb +++ b/qa/qa/page/main/login.rb @@ -31,9 +31,9 @@ module QA element :register_tab end - view 'app/views/devise/shared/_omniauth_box.html.haml' do - element :saml_login_button, 'qa-#{provider}-login-button' # rubocop:disable QA/ElementWithPattern, Lint/InterpolationCheck - element :github_login_button, 'qa-#{provider}-login-button' # rubocop:disable QA/ElementWithPattern, Lint/InterpolationCheck + view 'app/helpers/auth_helper.rb' do + element :saml_login_button + element :github_login_button end view 'app/views/layouts/devise.html.haml' do diff --git a/qa/qa/specs/features/browser_ui/1_manage/login/login_via_oauth_spec.rb b/qa/qa/specs/features/browser_ui/1_manage/login/login_via_oauth_spec.rb index 50e8423ee6f..a118176eb8a 100644 --- a/qa/qa/specs/features/browser_ui/1_manage/login/login_via_oauth_spec.rb +++ b/qa/qa/specs/features/browser_ui/1_manage/login/login_via_oauth_spec.rb @@ -3,7 +3,7 @@ module QA context 'Manage', :orchestrated, :oauth do describe 'OAuth login' do - it 'User logs in to gitlab with github oauth' do + it 'User logs in to GitLab with GitHub OAuth' do Runtime::Browser.visit(:gitlab, Page::Main::Login) Page::Main::Login.perform(&:sign_in_with_github) diff --git a/qa/qa/vendor/github/page/login.rb b/qa/qa/vendor/github/page/login.rb index d025887d7fc..f6dc408e248 100644 --- a/qa/qa/vendor/github/page/login.rb +++ b/qa/qa/vendor/github/page/login.rb @@ -12,7 +12,7 @@ module QA fill_in 'password', with: QA::Runtime::Env.github_password click_on 'Sign in' - if has_text?("Authorize GitLab-OAuth", wait: 2.0) + if has_text?("Authorize GitLab-OAuth", wait: 2) click_on 'Authorize gitlab-qa' if has_button?('Authorize gitlab-qa') end end -- cgit v1.2.1