Commit 4b16cdf5 authored by Sanad Liaquat's avatar Sanad Liaquat

Merge branch 'qa-staging-61-fix-ee-project-templates-spec' into 'master'

Add assertions ee_project_templates_spec.rb to narrow down possible template selection saving issue

See merge request gitlab-org/gitlab-ee!14704
parents 4a696e66 b1e31c04
......@@ -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
......
......@@ -56,6 +56,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 +106,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