Commit 69e9d32a authored by Tiffany Rea's avatar Tiffany Rea Committed by Mark Lapierre

Add new step enable mirror via UI

parent 2e417fd5
......@@ -4,7 +4,7 @@
.form-check.gl-mb-3
= f.check_box :mirror_trigger_builds, check_box_options.merge(class: "form-check-input")
= f.label :mirror_trigger_builds, _("Trigger pipelines for mirror updates"), class: "form-check-label"
= f.label :mirror_trigger_builds, _("Trigger pipelines for mirror updates"), class: "form-check-label", data: { qa_selector: 'mirror_trigger_builds_label' }
.form-text.text-muted
= _('Trigger pipelines when branches or tags are updated in the upstream repository. Depending on the activity of the upstream repository, this may greatly increase the load on your CI runners. Only enable this if you know they can handle the load.')
%strong= _('CI will run using the credentials assigned above.')
......
......@@ -24,8 +24,16 @@ module QA
element :updating_button
element :copy_public_key_button
end
view 'ee/app/views/shared/_mirror_trigger_builds_setting.html.haml' do
element :mirror_trigger_builds_label
end
end
end
def select_mirror_trigger_option
click_element(:mirror_trigger_builds_label)
end
end
end
end
......
......@@ -5,7 +5,7 @@ require 'faker'
require 'base64'
module QA
context 'Verify', :github, :requires_admin, only: { subdomain: :staging }, quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/335045', type: :bug } do
context 'Verify', :github, :requires_admin, only: { subdomain: :staging } do
include Support::Api
describe 'Pipeline for project mirrors Github' do
......@@ -44,7 +44,6 @@ module QA
Flow::Login.sign_in(as: user)
group.visit!
import_project
Page::Project::Menu.perform(&:click_ci_cd_pipelines)
end
after do
......@@ -54,6 +53,16 @@ module QA
end
it 'user commits to GitHub triggers CI pipeline', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/144' do
Page::Project::Menu.perform(&:go_to_repository_settings)
Page::Project::Settings::Repository.perform do |settings|
settings.expand_mirroring_repositories do |mirror_settings|
mirror_settings.repository_url = 'https://github.com/gitlab-qa-github/test-project.git'
mirror_settings.select_mirror_trigger_option
mirror_settings.mirror_repository
end
end
Page::Project::Menu.perform(&:click_ci_cd_pipelines)
Page::Project::Pipeline::Index.perform do |index|
expect(index).to have_no_pipeline, 'Expect to have NO pipeline before mirroring.'
......
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