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
43685720
Commit
43685720
authored
Mar 30, 2021
by
Tomislav Nikić
Committed by
Dan Davison
Mar 30, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding the page objects
Adding the page object to be able to interact with the cherry pick button.
parent
6a96e3a5
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
66 additions
and
1 deletion
+66
-1
app/assets/javascripts/projects/commit/components/form_modal.vue
...ets/javascripts/projects/commit/components/form_modal.vue
+1
-0
app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merged.vue
...rge_request_widget/components/states/mr_widget_merged.vue
+1
-0
qa/qa.rb
qa/qa.rb
+1
-0
qa/qa/page/component/commit_modal.rb
qa/qa/page/component/commit_modal.rb
+13
-0
qa/qa/page/merge_request/show.rb
qa/qa/page/merge_request/show.rb
+9
-0
qa/qa/resource/merge_request.rb
qa/qa/resource/merge_request.rb
+2
-1
qa/qa/specs/features/browser_ui/3_create/merge_request/cherry_pick_spec.rb
...res/browser_ui/3_create/merge_request/cherry_pick_spec.rb
+39
-0
No files found.
app/assets/javascripts/projects/commit/components/form_modal.vue
View file @
43685720
...
...
@@ -47,6 +47,7 @@ export default {
{
variant
:
'
success
'
},
{
category
:
'
primary
'
},
{
'
data-testid
'
:
'
submit-commit
'
},
{
'
data-qa-selector
'
:
'
submit_commit_button
'
},
],
},
actionCancel
:
{
...
...
app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merged.vue
View file @
43685720
...
...
@@ -151,6 +151,7 @@ export default {
v-gl-tooltip
.
hover
:title=
"cherryPickTitle"
size=
"small"
data-qa-selector=
"cherry_pick_button"
@
click=
"openCherryPickModal"
>
{{
cherryPickLabel
}}
...
...
qa/qa.rb
View file @
43685720
...
...
@@ -500,6 +500,7 @@ module QA
autoload
:Wiki
,
'qa/page/component/wiki'
autoload
:WikiSidebar
,
'qa/page/component/wiki_sidebar'
autoload
:WikiPageForm
,
'qa/page/component/wiki_page_form'
autoload
:CommitModal
,
'qa/page/component/commit_modal'
module
Issuable
autoload
:Common
,
'qa/page/component/issuable/common'
...
...
qa/qa/page/component/commit_modal.rb
0 → 100644
View file @
43685720
# frozen_string_literal: true
module
QA
module
Page
module
Component
class
CommitModal
<
Page
::
Base
view
'app/assets/javascripts/projects/commit/components/form_modal.vue'
do
element
:submit_commit_button
,
required:
true
end
end
end
end
end
qa/qa/page/merge_request/show.rb
View file @
43685720
...
...
@@ -107,6 +107,10 @@ module QA
element
:suggestion_button
end
view
'app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merged.vue'
do
element
:cherry_pick_button
end
def
start_review
click_element
(
:start_review_button
)
...
...
@@ -359,6 +363,11 @@ module QA
def
apply_suggestions_batch
all_elements
(
:apply_suggestions_batch_button
,
minimum:
1
).
first
.
click
end
def
cherry_pick!
click_element
(
:cherry_pick_button
,
Page
::
Component
::
CommitModal
)
click_element
(
:submit_commit_button
)
end
end
end
end
...
...
qa/qa/resource/merge_request.rb
View file @
43685720
...
...
@@ -35,7 +35,7 @@ module QA
attribute
:target
do
Repository
::
ProjectPush
.
fabricate!
do
|
resource
|
resource
.
project
=
project
resource
.
branch_name
=
project
.
defaul
t_branch
resource
.
branch_name
=
targe
t_branch
resource
.
new_branch
=
@target_new_branch
resource
.
remote_branch
=
target_branch
end
...
...
@@ -62,6 +62,7 @@ module QA
@labels
=
[]
@file_name
=
"added_file-
#{
SecureRandom
.
hex
(
8
)
}
.txt"
@file_content
=
"File Added"
@target_branch
=
"master"
@target_new_branch
=
true
@no_preparation
=
false
@wait_for_merge
=
true
...
...
qa/qa/specs/features/browser_ui/3_create/merge_request/cherry_pick_spec.rb
0 → 100644
View file @
43685720
# frozen_string_literal: true
module
QA
RSpec
.
describe
'Create'
do
describe
'Cherry picking from a merge request'
do
let
(
:project
)
do
Resource
::
Project
.
fabricate_via_api!
do
|
project
|
project
.
name
=
'project'
project
.
initialize_with_readme
=
true
end
end
let
(
:feature_mr
)
do
Resource
::
MergeRequest
.
fabricate_via_api!
do
|
merge_request
|
merge_request
.
project
=
project
merge_request
.
target_branch
=
'development'
merge_request
.
target_new_branch
=
true
end
end
before
do
Flow
::
Login
.
sign_in
end
it
'cherry picks a basic merge request'
,
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1616'
do
feature_mr
.
visit!
Page
::
MergeRequest
::
Show
.
perform
do
|
merge_request
|
merge_request
.
merge!
merge_request
.
cherry_pick!
end
Page
::
MergeRequest
::
New
.
perform
do
|
merge_request
|
expect
(
merge_request
).
to
have_content
(
'The merge request has been successfully cherry-picked'
)
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