summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorMark Lapierre <mlapierre@gitlab.com>2019-01-08 16:16:00 +0000
committerMark Lapierre <mlapierre@gitlab.com>2019-01-08 16:16:00 +0000
commit49f538c766f3b4f8fb7436afd472f88291a7c76e (patch)
treeea274ad445a6fd03384fdb7ce3b2499153e2ad84 /qa
parentabe4e325a20435b6cb1ce6d6ba1a8dcd0a82ea14 (diff)
parenta1ca9ad0f12a65009b309448d59dee3b255d8794 (diff)
downloadgitlab-ce-49f538c766f3b4f8fb7436afd472f88291a7c76e.tar.gz
Merge branch '6861-group-level-project-templates-QA-tests-take-2-ce' into 'master'
CE port of "e2e QA tests for Group level project templates" See merge request gitlab-org/gitlab-ce!23987
Diffstat (limited to 'qa')
-rw-r--r--qa/qa/page/component/select2.rb6
-rw-r--r--qa/qa/page/project/new.rb5
-rw-r--r--qa/qa/page/settings/common.rb2
3 files changed, 12 insertions, 1 deletions
diff --git a/qa/qa/page/component/select2.rb b/qa/qa/page/component/select2.rb
index 6d07d5a10e6..98bcb96b92c 100644
--- a/qa/qa/page/component/select2.rb
+++ b/qa/qa/page/component/select2.rb
@@ -6,6 +6,12 @@ module QA
find('.select2-result-label', text: item_text).click
end
+ def clear_current_selection_if_present
+ if has_css?('a > abbr.select2-search-choice-close', wait: 1.0)
+ find('a > abbr.select2-search-choice-close').click
+ end
+ end
+
def search_and_select(item_text)
find('.select2-input').set(item_text)
select_item(item_text)
diff --git a/qa/qa/page/project/new.rb b/qa/qa/page/project/new.rb
index 6acc413b586..a588af07e4a 100644
--- a/qa/qa/page/project/new.rb
+++ b/qa/qa/page/project/new.rb
@@ -5,6 +5,7 @@ module QA
include Page::Component::Select2
view 'app/views/projects/new.html.haml' do
+ element :project_create_from_template_tab
element :import_project_tab, "Import project" # rubocop:disable QA/ElementWithPattern
end
@@ -44,6 +45,10 @@ module QA
click_on 'Create project'
end
+ def go_to_create_from_template
+ click_element(:project_create_from_template_tab)
+ end
+
def set_visibility(visibility)
choose visibility
end
diff --git a/qa/qa/page/settings/common.rb b/qa/qa/page/settings/common.rb
index f9f71aa4a72..9fea74eabc9 100644
--- a/qa/qa/page/settings/common.rb
+++ b/qa/qa/page/settings/common.rb
@@ -11,7 +11,7 @@ module QA
wait(reload: false) do
click_button 'Expand' unless first('button', text: 'Collapse')
- page.has_content?('Collapse')
+ has_content?('Collapse')
end
yield if block_given?