summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorMark Lapierre <mlapierre@gitlab.com>2019-06-05 09:11:07 +1000
committerMark Lapierre <mlapierre@gitlab.com>2019-06-05 09:11:07 +1000
commit7dcc4536444d77e6fa68de1e1214664cdc33f7ba (patch)
treea1326bc7b64d27339fd009b5be32f1d13df63e82 /qa
parentcfb01b041b8d2f9a9dd0d01d5610b1cea518cf00 (diff)
downloadgitlab-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.
Diffstat (limited to 'qa')
-rw-r--r--qa/qa/page/project/new.rb5
-rw-r--r--qa/qa/resource/project.rb1
2 files changed, 6 insertions, 0 deletions
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