Commit ebd44f30 authored by Mark Lapierre's avatar Mark Lapierre Committed by Ramya Authappan

Restore fabrication of fork MR via browser

Resource::MergeRequestFromFork can't fabricate via the API, so it was
fabricating a regular merge request instead.

This test _should_ fabricate via the browser anyway, because it is the
main test of the fork feature.
parent 6f360232
...@@ -28,6 +28,10 @@ module QA ...@@ -28,6 +28,10 @@ module QA
Page::Project::Show.perform(&:new_merge_request) Page::Project::Show.perform(&:new_merge_request)
Page::MergeRequest::New.perform(&:create_merge_request) Page::MergeRequest::New.perform(&:create_merge_request)
end end
def fabricate_via_api!
raise NotImplementedError
end
end end
end end
end end
...@@ -2,21 +2,23 @@ ...@@ -2,21 +2,23 @@
module QA module QA
RSpec.describe 'Create' do RSpec.describe 'Create' do
describe 'Merge request creation from fork' do describe 'Merge request creation from fork', :smoke do
let(:merge_request) do let!(:merge_request) do
Resource::MergeRequestFromFork.fabricate_via_api! do |merge_request| Resource::MergeRequestFromFork.fabricate_via_browser_ui! do |merge_request|
merge_request.fork_branch = 'feature-branch' merge_request.fork_branch = 'feature-branch'
end end
end end
it 'can merge feature branch fork to mainline', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/928' do it 'can merge feature branch fork to mainline', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/928' do
Flow::Login.sign_in Flow::Login.while_signed_in do
merge_request.visit!
merge_request.visit! Page::MergeRequest::Show.perform do |merge_request|
merge_request.merge!
Page::MergeRequest::Show.perform(&:merge!) expect(merge_request).to have_content('The changes were merged')
end
expect(page).to have_content('The changes were merged') end
end end
end end
end end
......
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