diff options
author | Mark Lapierre <mlapierre@gitlab.com> | 2019-06-05 09:11:07 +1000 |
---|---|---|
committer | Mark Lapierre <mlapierre@gitlab.com> | 2019-06-05 09:11:07 +1000 |
commit | 7dcc4536444d77e6fa68de1e1214664cdc33f7ba (patch) | |
tree | a1326bc7b64d27339fd009b5be32f1d13df63e82 | |
parent | cfb01b041b8d2f9a9dd0d01d5610b1cea518cf00 (diff) | |
download | gitlab-ce-qa-ml-fix-add-file-template-tests.tar.gz |
Add option to init project with readme via UIqa-ml-fix-add-file-template-tests
Adds a QA selector and method to allow a project to be fabricated
via the browser with the "Initialize repository with a README"
checkbox checked.
-rw-r--r-- | app/views/projects/_new_project_fields.html.haml | 2 | ||||
-rw-r--r-- | qa/qa/page/project/new.rb | 5 | ||||
-rw-r--r-- | qa/qa/resource/project.rb | 1 |
3 files changed, 7 insertions, 1 deletions
diff --git a/app/views/projects/_new_project_fields.html.haml b/app/views/projects/_new_project_fields.html.haml index 1c1c7d832bd..9ae84a909a5 100644 --- a/app/views/projects/_new_project_fields.html.haml +++ b/app/views/projects/_new_project_fields.html.haml @@ -54,7 +54,7 @@ .form-group.row.initialize-with-readme-setting %div{ :class => "col-sm-12" } .form-check - = check_box_tag 'project[initialize_with_readme]', '1', false, class: 'form-check-input', data: { track_label: "#{track_label}", track_event: "activate_form_input", track_property: "init_with_readme" } + = check_box_tag 'project[initialize_with_readme]', '1', false, class: 'form-check-input qa-initialize-with-readme-checkbox', data: { track_label: "#{track_label}", track_event: "activate_form_input", track_property: "init_with_readme" } = label_tag 'project[initialize_with_readme]', class: 'form-check-label' do .option-title %strong Initialize repository with a README diff --git a/qa/qa/page/project/new.rb b/qa/qa/page/project/new.rb index 4f26ca5037c..defd85a5740 100644 --- a/qa/qa/page/project/new.rb +++ b/qa/qa/page/project/new.rb @@ -12,6 +12,7 @@ module QA end view 'app/views/projects/_new_project_fields.html.haml' do + element :initialize_with_readme_checkbox element :project_namespace_select element :project_namespace_field, 'namespaces_options' # rubocop:disable QA/ElementWithPattern element :project_name, 'text_field :name' # rubocop:disable QA/ElementWithPattern @@ -64,6 +65,10 @@ module QA def click_github_link click_link 'GitHub' end + + def enable_initialize_with_readme + check_element :initialize_with_readme_checkbox + end end end end diff --git a/qa/qa/resource/project.rb b/qa/qa/resource/project.rb index 39b8270a32c..d706439a891 100644 --- a/qa/qa/resource/project.rb +++ b/qa/qa/resource/project.rb @@ -52,6 +52,7 @@ module QA page.choose_name(@name) page.add_description(@description) page.set_visibility('Public') + page.enable_initialize_with_readme if @initialize_with_readme page.create_new_project end end |