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
ba5e5f8a
Commit
ba5e5f8a
authored
Nov 30, 2018
by
ievgenChernikov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extended MR spec to set assignee
parent
c8fa8da2
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
2 deletions
+22
-2
app/views/shared/issuable/_sidebar.html.haml
app/views/shared/issuable/_sidebar.html.haml
+1
-1
app/views/shared/issuable/form/_metadata_merge_request_assignee.html.haml
.../issuable/form/_metadata_merge_request_assignee.html.haml
+1
-1
qa/qa/page/merge_request/new.rb
qa/qa/page/merge_request/new.rb
+8
-0
qa/qa/page/merge_request/show.rb
qa/qa/page/merge_request/show.rb
+7
-0
qa/qa/resource/merge_request.rb
qa/qa/resource/merge_request.rb
+1
-0
qa/qa/specs/features/browser_ui/3_create/merge_request/create_merge_request_spec.rb
...er_ui/3_create/merge_request/create_merge_request_spec.rb
+4
-0
No files found.
app/views/shared/issuable/_sidebar.html.haml
View file @
ba5e5f8a
...
...
@@ -16,7 +16,7 @@
-
if
current_user
.block.todo.hide-expanded
=
render
"shared/issuable/sidebar_todo"
,
todo:
todo
,
issuable:
issuable
,
is_collapsed:
true
.block.assignee
.block.assignee
.qa-assignee-block
=
render
"shared/issuable/sidebar_assignees"
,
issuable:
issuable
,
can_edit_issuable:
can_edit_issuable
,
signed_in:
current_user
.
present?
=
render_if_exists
'shared/issuable/sidebar_item_epic'
,
issuable:
issuable
...
...
app/views/shared/issuable/form/_metadata_merge_request_assignee.html.haml
View file @
ba5e5f8a
...
...
@@ -5,4 +5,4 @@
=
dropdown_tag
(
user_dropdown_label
(
issuable
.
assignee_id
,
"Assignee"
),
options:
{
toggle_class:
"js-dropdown-keep-input js-user-search js-issuable-form-dropdown js-assignee-search"
,
title:
"Select assignee"
,
filter:
true
,
dropdown_class:
"dropdown-menu-user dropdown-menu-selectable dropdown-menu-assignee js-filter-submit"
,
placeholder:
"Search assignee"
,
data:
{
first_user:
current_user
.
try
(
:username
),
null_user:
true
,
current_user:
true
,
project_id:
issuable
.
project
.
try
(
:id
),
selected:
issuable
.
assignee_id
,
field_name:
"
#{
issuable
.
class
.
model_name
.
param_key
}
[assignee_id]"
,
default_label:
"Assignee"
}
})
=
link_to
'Assign to me'
,
'#'
,
class:
"assign-to-me-link
#{
'hide'
if
issuable
.
assignee_id
==
current_user
.
id
}
"
=
link_to
'Assign to me'
,
'#'
,
class:
"assign-to-me-link
qa-assign-to-me-link
#{
'hide'
if
issuable
.
assignee_id
==
current_user
.
id
}
"
qa/qa/page/merge_request/new.rb
View file @
ba5e5f8a
...
...
@@ -26,6 +26,10 @@ module QA
element
:issuable_label
end
view
'app/views/shared/issuable/form/_metadata_merge_request_assignee.html.haml'
do
element
:assign_to_me_link
end
def
create_merge_request
click_element
:issuable_create_button
end
...
...
@@ -50,6 +54,10 @@ module QA
click_link
label
.
title
end
def
assign_to_me
click_element
:assign_to_me_link
end
end
end
end
...
...
qa/qa/page/merge_request/show.rb
View file @
ba5e5f8a
...
...
@@ -52,6 +52,7 @@ module QA
end
view
'app/views/shared/issuable/_sidebar.html.haml'
do
element
:assignee_block
element
:labels_block
end
...
...
@@ -100,6 +101,12 @@ module QA
end
end
def
has_assignee?
(
username
)
page
.
within
(
element_selector_css
(
:assignee_block
))
do
has_text?
(
username
)
end
end
def
has_label?
(
label
)
page
.
within
(
element_selector_css
(
:labels_block
))
do
element
=
find
(
'span'
,
text:
label
)
...
...
qa/qa/resource/merge_request.rb
View file @
ba5e5f8a
...
...
@@ -63,6 +63,7 @@ module QA
page
.
fill_title
(
@title
)
page
.
fill_description
(
@description
)
page
.
choose_milestone
(
@milestone
)
if
@milestone
page
.
assign_to_me
if
@assignee
==
'me'
labels
.
each
do
|
label
|
page
.
select_label
(
label
)
end
...
...
qa/qa/specs/features/browser_ui/3_create/merge_request/create_merge_request_spec.rb
View file @
ba5e5f8a
...
...
@@ -4,6 +4,8 @@ module QA
context
'Create'
do
describe
'Merge request creation'
do
it
'user creates a new merge request'
do
gitlab_account_username
=
"@
#{
Runtime
::
User
.
username
}
"
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Page
::
Main
::
Login
.
act
{
sign_in_using_credentials
}
...
...
@@ -27,6 +29,7 @@ module QA
merge_request
.
description
=
'Great feature with milestone'
merge_request
.
project
=
current_project
merge_request
.
milestone
=
current_milestone
merge_request
.
assignee
=
'me'
merge_request
.
labels
.
push
(
new_label
)
end
...
...
@@ -34,6 +37,7 @@ module QA
expect
(
merge_request
).
to
have_content
(
'This is a merge request with a milestone'
)
expect
(
merge_request
).
to
have_content
(
'Great feature with milestone'
)
expect
(
merge_request
).
to
have_content
(
/Opened [\w\s]+ ago/
)
expect
(
merge_request
).
to
have_assignee
(
gitlab_account_username
)
expect
(
merge_request
).
to
have_label
(
new_label
.
title
)
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