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
55d69076
Commit
55d69076
authored
Nov 04, 2020
by
Tiffany Rea
Committed by
Sanad Liaquat
Nov 04, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
E2E can merge MR when pipeline is blocked
parent
c1b3a888
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
87 additions
and
0 deletions
+87
-0
qa/qa/page/merge_request/show.rb
qa/qa/page/merge_request/show.rb
+5
-0
qa/qa/specs/features/browser_ui/4_verify/pipeline/merge_mr_when_pipline_is_blocked_spec.rb
..._verify/pipeline/merge_mr_when_pipline_is_blocked_spec.rb
+82
-0
No files found.
qa/qa/page/merge_request/show.rb
View file @
55d69076
...
...
@@ -218,6 +218,11 @@ module QA
raise
"Merge did not appear to be successful"
unless
merged?
end
def
merge_immediately!
click_element
(
:merge_moment_dropdown
)
click_element
(
:merge_immediately_option
)
end
def
merged?
has_element?
(
:merged_status_content
,
text:
'The changes were merged into'
,
wait:
60
)
end
...
...
qa/qa/specs/features/browser_ui/4_verify/pipeline/merge_mr_when_pipline_is_blocked_spec.rb
0 → 100644
View file @
55d69076
# frozen_string_literal: true
require
'faker'
module
QA
RSpec
.
describe
'Verify'
,
:runner
do
context
'When pipeline is blocked'
do
let
(
:executor
)
{
"qa-runner-
#{
Faker
::
Alphanumeric
.
alphanumeric
(
8
)
}
"
}
let
(
:project
)
do
Resource
::
Project
.
fabricate_via_api!
do
|
project
|
project
.
name
=
'project-with-blocked-pipeline'
end
end
let!
(
:runner
)
do
Resource
::
Runner
.
fabricate!
do
|
runner
|
runner
.
project
=
project
runner
.
name
=
executor
runner
.
tags
=
[
executor
]
end
end
let!
(
:ci_file
)
do
Resource
::
Repository
::
Commit
.
fabricate_via_api!
do
|
commit
|
commit
.
project
=
project
commit
.
commit_message
=
'Add .gitlab-ci.yml'
commit
.
add_files
(
[
file_path:
'.gitlab-ci.yml'
,
content:
<<~
YAML
test_blocked_pipeline:
stage: build
tags: [
#{
executor
}
]
script: echo 'OK!'
manual_job:
stage: test
needs: [test_blocked_pipeline]
script: echo do not click me
when: manual
dummy_job:
stage: deploy
needs: [manual_job]
script: echo nothing
YAML
]
)
end
end
let
(
:merge_request
)
do
Resource
::
MergeRequest
.
fabricate_via_api!
do
|
merge_request
|
merge_request
.
project
=
project
merge_request
.
description
=
Faker
::
Lorem
.
sentence
merge_request
.
target_new_branch
=
false
merge_request
.
file_name
=
'custom_file.txt'
merge_request
.
file_content
=
Faker
::
Lorem
.
sentence
end
end
before
do
Flow
::
Login
.
sign_in
merge_request
.
visit!
end
after
do
runner
.
remove_via_api!
end
it
'can still merge MR successfully'
,
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/issues/971'
do
Page
::
MergeRequest
::
Show
.
perform
do
|
show
|
show
.
wait_until
(
reload:
false
)
{
show
.
has_pipeline_status?
(
'running'
)
}
show
.
merge_immediately!
expect
(
show
).
to
be_merged
end
end
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