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
5c5270ae
Commit
5c5270ae
authored
Mar 17, 2021
by
Tiffany Rea
Committed by
Sanad Liaquat
Mar 17, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix file commit error for system cancels merge train spec
parent
3611732d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
39 deletions
+34
-39
qa/qa/specs/features/ee/browser_ui/4_verify/system_cancels_merge_request_in_merge_trains_spec.rb
...rify/system_cancels_merge_request_in_merge_trains_spec.rb
+34
-39
No files found.
qa/qa/specs/features/ee/browser_ui/4_verify/system_cancels_merge_request_in_merge_trains_spec.rb
View file @
5c5270ae
...
...
@@ -5,7 +5,7 @@ require 'faker'
module
QA
RSpec
.
describe
'Verify'
do
describe
'Merge train'
,
:runner
,
:requires_admin
do
let
(
:file_name
)
{
'custom_file.txt'
}
let
(
:file_name
)
{
Faker
::
Lorem
.
word
}
let
(
:mr_title
)
{
Faker
::
Lorem
.
sentence
}
let
(
:executor
)
{
"qa-runner-
#{
Faker
::
Alphanumeric
.
alphanumeric
(
8
)
}
"
}
...
...
@@ -23,7 +23,7 @@ module QA
end
end
let!
(
:
ci_file
)
do
let!
(
:
original_files
)
do
Resource
::
Repository
::
Commit
.
fabricate_via_api!
do
|
commit
|
commit
.
project
=
project
commit
.
commit_message
=
'Add .gitlab-ci.yml'
...
...
@@ -41,6 +41,10 @@ module QA
only:
- merge_requests
YAML
},
{
file_path:
file_name
,
content:
Faker
::
Lorem
.
sentence
}
]
)
...
...
@@ -56,8 +60,15 @@ module QA
let
(
:user_api_client
)
{
Runtime
::
API
::
Client
.
new
(
:gitlab
,
user:
user
)
}
let
(
:admin_api_client
)
{
Runtime
::
API
::
Client
.
as_admin
}
let
(
:merge_request
)
do
Resource
::
MergeRequest
.
fabricate_via_api!
do
|
merge_request
|
before
do
Runtime
::
Feature
.
enable
(
:invite_members_group_modal
,
project:
project
)
Flow
::
Login
.
sign_in
project
.
visit!
Flow
::
MergeRequest
.
enable_merge_trains
project
.
add_member
(
user
,
Resource
::
Members
::
AccessLevel
::
MAINTAINER
)
merge_request
=
Resource
::
MergeRequest
.
fabricate_via_api!
do
|
merge_request
|
merge_request
.
api_client
=
user_api_client
merge_request
.
title
=
mr_title
merge_request
.
project
=
project
...
...
@@ -66,30 +77,20 @@ module QA
merge_request
.
file_name
=
file_name
merge_request
.
file_content
=
Faker
::
Lorem
.
sentence
end
end
before
do
Runtime
::
Feature
.
enable
(
:invite_members_group_modal
,
project:
project
)
Flow
::
Login
.
sign_in
project
.
visit!
Flow
::
MergeRequest
.
enable_merge_trains
project
.
add_member
(
user
,
Resource
::
Members
::
AccessLevel
::
MAINTAINER
)
create_user_personal_access_token
Flow
::
Login
.
sign_in
(
as:
user
)
merge_request
.
visit!
Page
::
MergeRequest
::
Show
.
perform
do
|
show
|
show
.
has_pipeline_status?
(
'passed'
)
show
.
try_to_merge!
show
.
wait_until
(
reload:
false
)
{
show
.
has_content?
'started a merge train'
}
end
end
after
do
runner
.
remove_via_api!
user
.
remove_via_api!
project
.
remove_via_api!
end
context
'when system cancels a merge request'
do
...
...
@@ -99,11 +100,11 @@ module QA
commit
.
api_client
=
user_api_client
commit
.
project
=
project
commit
.
commit_message
=
'changing text file'
commit
.
add
_files
(
commit
.
update
_files
(
[
{
file_path:
file_name
,
content:
Faker
::
Lorem
.
sentence
content:
'Has to be different than before.'
}
]
)
...
...
@@ -124,12 +125,6 @@ module QA
end
end
end
private
def
create_user_personal_access_token
user_api_client
.
personal_access_token
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