diff options
author | Mark Lapierre <mlapierre@gitlab.com> | 2019-07-17 07:07:06 +0300 |
---|---|---|
committer | Mark Lapierre <mlapierre@gitlab.com> | 2019-07-17 07:07:06 +0300 |
commit | aafa6a116f2e0cf48e231dd5dac1feb487805090 (patch) | |
tree | e13112b5d3f2b1d5d14404f2580cc0c09b7f0a7b /qa | |
parent | e468067a89e5940502423ed8dabbe0dc74e251f8 (diff) | |
parent | 119be7ffd12d72b0871357330145efbacef4d4e6 (diff) |
Merge branch 'qa-selector-uniformization-common-2' into 'master'
Refactor common Page Objects to use data tags (No. 2 Contd.)
See merge request gitlab-org/gitlab-ce!30763
Diffstat (limited to 'qa')
-rw-r--r-- | qa/qa/page/main/oauth.rb | 4 | ||||
-rw-r--r-- | qa/qa/page/main/sign_up.rb | 26 |
2 files changed, 15 insertions, 15 deletions
diff --git a/qa/qa/page/main/oauth.rb b/qa/qa/page/main/oauth.rb index 5f6ddb9a114..2b1a9ab2b6a 100644 --- a/qa/qa/page/main/oauth.rb +++ b/qa/qa/page/main/oauth.rb @@ -5,7 +5,7 @@ module QA module Main class OAuth < Page::Base view 'app/views/doorkeeper/authorizations/new.html.haml' do - element :authorization_button, 'submit_tag _("Authorize")' # rubocop:disable QA/ElementWithPattern + element :authorization_button end def needs_authorization? @@ -13,7 +13,7 @@ module QA end def authorize! - click_button 'Authorize' + click_element :authorization_button end end end diff --git a/qa/qa/page/main/sign_up.rb b/qa/qa/page/main/sign_up.rb index 46a105003d0..c47d2ce9c74 100644 --- a/qa/qa/page/main/sign_up.rb +++ b/qa/qa/page/main/sign_up.rb @@ -5,28 +5,28 @@ module QA module Main class SignUp < Page::Base view 'app/views/devise/shared/_signup_box.html.haml' do - element :new_user_name - element :new_user_username - element :new_user_email - element :new_user_email_confirmation - element :new_user_password + element :new_user_name_field + element :new_user_username_field + element :new_user_email_field + element :new_user_email_confirmation_field + element :new_user_password_field element :new_user_register_button - element :new_user_accept_terms + element :new_user_accept_terms_checkbox end def sign_up!(user) - fill_element :new_user_name, user.name - fill_element :new_user_username, user.username - fill_element :new_user_email, user.email - fill_element :new_user_email_confirmation, user.email - fill_element :new_user_password, user.password + fill_element :new_user_name_field, user.name + fill_element :new_user_username_field, user.username + fill_element :new_user_email_field, user.email + fill_element :new_user_email_confirmation_field, user.email + fill_element :new_user_password_field, user.password - check_element :new_user_accept_terms if has_element?(:new_user_accept_terms) + check_element :new_user_accept_terms_checkbox if has_element?(:new_user_accept_terms_checkbox) signed_in = retry_until do click_element :new_user_register_button - Page::Main::Menu.act { has_personal_area? } + Page::Main::Menu.perform(&:has_personal_area?) end raise "Failed to register and sign in" unless signed_in |