Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
2cae176d
Commit
2cae176d
authored
Oct 06, 2021
by
Tomislav Nikić
Committed by
Mark Lapierre
Oct 06, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing a fork based merge request test
parent
4fc1e318
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
13 deletions
+34
-13
qa/qa/resource/fork.rb
qa/qa/resource/fork.rb
+7
-0
qa/qa/resource/merge_request_from_fork.rb
qa/qa/resource/merge_request_from_fork.rb
+10
-3
qa/qa/specs/features/browser_ui/3_create/merge_request/merge_merge_request_from_fork_spec.rb
...reate/merge_request/merge_merge_request_from_fork_spec.rb
+17
-10
No files found.
qa/qa/resource/fork.rb
View file @
2cae176d
...
...
@@ -14,6 +14,7 @@ module QA
resource
.
add_name_uuid
=
false
resource
.
name
=
name
resource
.
path_with_namespace
=
"
#{
user
.
username
}
/
#{
name
}
"
resource
.
api_client
=
@api_client
end
end
...
...
@@ -69,6 +70,12 @@ module QA
populate
(
:project
)
end
def
remove_via_api!
project
.
remove_via_api!
upstream
.
remove_via_api!
user
.
remove_via_api!
unless
Specs
::
Helpers
::
ContextSelector
.
dot_com?
end
def
api_get_path
"/projects/
#{
CGI
.
escape
(
path_with_namespace
)
}
"
end
...
...
qa/qa/resource/merge_request_from_fork.rb
View file @
2cae176d
...
...
@@ -6,7 +6,7 @@ module QA
attr_accessor
:fork_branch
attribute
:fork
do
Fork
.
fabricate_via_
browser_u
i!
Fork
.
fabricate_via_
ap
i!
end
attribute
:push
do
...
...
@@ -23,8 +23,15 @@ module QA
fork
.
project
.
visit!
Page
::
Project
::
Show
.
perform
(
&
:new_merge_request
)
Page
::
MergeRequest
::
New
.
perform
(
&
:create_merge_request
)
mr_url
=
Flow
::
Login
.
while_signed_in
(
as:
fork
.
user
)
do
Page
::
Project
::
Show
.
perform
(
&
:new_merge_request
)
Page
::
MergeRequest
::
New
.
perform
(
&
:create_merge_request
)
current_url
end
Flow
::
Login
.
sign_in
visit
(
mr_url
)
end
def
fabricate_via_api!
...
...
qa/qa/specs/features/browser_ui/3_create/merge_request/merge_merge_request_from_fork_spec.rb
View file @
2cae176d
# frozen_string_literal: true
module
QA
RSpec
.
describe
'Create'
,
quarantine:
{
issue:
'https://gitlab.com/gitlab-org/gitlab/-/issues/332588'
,
type: :investigating
}
do
RSpec
.
describe
'Create'
do
describe
'Merge request creation from fork'
do
# TODO: Please add this back to :smoke suite as soon as https://gitlab.com/gitlab-org/gitlab/-/issues/332588 is addressed
it
'can merge feature branch fork to mainline'
,
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1305'
do
merge_request
=
Resource
::
MergeRequestFromFork
.
fabricate_via_browser_ui!
do
|
merge_request
|
let
(
:merge_request
)
do
Resource
::
MergeRequestFromFork
.
fabricate_via_browser_ui!
do
|
merge_request
|
merge_request
.
fork_branch
=
'feature-branch'
end
end
before
do
Flow
::
Login
.
sign_in
end
Flow
::
Login
.
while_signed_in
do
merge_request
.
visit!
after
do
merge_request
.
fork
.
remove_via_api!
end
it
'can merge feature branch fork to mainline'
,
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1305'
do
merge_request
.
visit!
Page
::
MergeRequest
::
Show
.
perform
do
|
merge_request
|
merge_request
.
merge!
Page
::
MergeRequest
::
Show
.
perform
do
|
merge_request
|
merge_request
.
merge!
expect
(
merge_request
).
to
have_content
(
'The changes were merged'
)
end
expect
(
merge_request
).
to
be_merged
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment