Commit 8359fece authored by Sanad Liaquat's avatar Sanad Liaquat

Fix & Un-quarantine project templates spec

Also Add steps to validate that template selection succeeded.
parent 391dfe76
......@@ -14,6 +14,14 @@ module QA
element :save_changes_button
end
def current_custom_project_template
expand_section(:custom_project_template_section)
within_element(:custom_project_template_select) do
current_selection
end
end
def choose_custom_project_template(path)
expand_section(:custom_project_template_section)
......
......@@ -15,6 +15,14 @@ module QA
element :save_changes_button
end
def current_custom_project_template
expand_section(:custom_project_templates)
within_element(:custom_project_template_select) do
current_selection
end
end
def choose_custom_project_template(path)
expand_section(:custom_project_templates)
......
......@@ -8,6 +8,10 @@ module QA
find('.select2-result-label', text: item_text, match: :prefer_exact).click
end
def current_selection
find('.select2-chosen').text
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
......
......@@ -2,8 +2,7 @@
require 'securerandom'
module QA
# Failure issue: https://gitlab.com/gitlab-org/quality/staging/issues/61
context :manage, :quarantine do
context :manage do
describe 'Project templates' do
before(:all) do
@files = [
......@@ -56,6 +55,12 @@ module QA
page.choose_custom_project_template("#{@template_container_group_name}")
end
Page::Admin::Menu.perform(&:go_to_template_settings)
EE::Page::Admin::Settings::Templates.perform do |page|
expect(page.current_custom_project_template).to include @template_container_group_name
end
group = Resource::Group.fabricate_via_api!
group.visit!
......@@ -100,6 +105,12 @@ module QA
settings.choose_custom_project_template("#{@template_container_group_name}")
end
Page::Project::Menu.perform(&:click_settings)
EE::Page::Group::Settings::General.perform do |settings|
expect(settings.current_custom_project_template).to include @template_container_group_name
end
group = Resource::Group.fabricate_via_api!
group.visit!
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment