diff options
author | Sanad Liaquat <sliaquat@gitlab.com> | 2019-07-24 13:01:45 +0500 |
---|---|---|
committer | Sanad Liaquat <sliaquat@gitlab.com> | 2019-07-24 13:01:45 +0500 |
commit | b31fe5c50be4756145af4cbca925b588c60ef795 (patch) | |
tree | 68d2b80b95859fc2a309845a12725f0790e17d88 | |
parent | 17fe03078d003dc61a456da8d3e41e3e52ba4f54 (diff) | |
download | gitlab-ce-qa-project-set-visibility-refactor.tar.gz |
Use click_element in project set_visibilityqa-project-set-visibility-refactor
-rw-r--r-- | app/views/shared/_visibility_radios.html.haml | 2 | ||||
-rw-r--r-- | qa/qa/page/project/new.rb | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/app/views/shared/_visibility_radios.html.haml b/app/views/shared/_visibility_radios.html.haml index 82ffdc9cd13..3e7148e841e 100644 --- a/app/views/shared/_visibility_radios.html.haml +++ b/app/views/shared/_visibility_radios.html.haml @@ -4,7 +4,7 @@ - next if disallowed || restricted .form-check - = form.radio_button model_method, level, checked: (selected_level == level), class: 'form-check-input', data: { track_label: "blank_project", track_event: "activate_form_input", track_property: "#{model_method}_#{level}", track_value: "" } + = form.radio_button model_method, level, checked: (selected_level == level), class: "form-check-input", data: { qa_selector: "#{visibility_level_label(level).downcase}_visibility_checkbox", track_label: "blank_project", track_event: "activate_form_input", track_property: "#{model_method}_#{level}", track_value: "" } = form.label "#{model_method}_#{level}", class: 'form-check-label' do = visibility_level_icon(level) .option-title diff --git a/qa/qa/page/project/new.rb b/qa/qa/page/project/new.rb index 0918445d119..99175bdeb38 100644 --- a/qa/qa/page/project/new.rb +++ b/qa/qa/page/project/new.rb @@ -26,6 +26,10 @@ module QA element :import_github, "icon('github', text: 'GitHub')" # rubocop:disable QA/ElementWithPattern end + view 'app/views/shared/_visibility_radios.html.haml' do + element :visibility_checkbox, 'data: { qa_selector: "#{visibility_level_label(level).downcase}_visibility_checkbox"' # rubocop:disable QA/ElementWithPattern, Lint/InterpolationCheck + end + def choose_test_namespace choose_namespace(Runtime::Namespace.path) end @@ -59,7 +63,7 @@ module QA end def set_visibility(visibility) - choose visibility + click_element("#{visibility.downcase}_visibility_checkbox") end def click_github_link |