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
9100cefd
Commit
9100cefd
authored
Dec 28, 2018
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
e0cf5941
4d6fe39a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
63 additions
and
2 deletions
+63
-2
app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue
...avascripts/vue_merge_request_widget/mr_widget_options.vue
+4
-1
app/assets/stylesheets/pages/pipelines.scss
app/assets/stylesheets/pages/pipelines.scss
+0
-1
changelogs/unreleased/allow_collaboration_status_work.yml
changelogs/unreleased/allow_collaboration_status_work.yml
+5
-0
changelogs/unreleased/ci-dropdown-hidden-bug.yml
changelogs/unreleased/ci-dropdown-hidden-bug.yml
+5
-0
spec/javascripts/vue_mr_widget/mr_widget_options_spec.js
spec/javascripts/vue_mr_widget/mr_widget_options_spec.js
+49
-0
No files found.
app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue
View file @
9100cefd
...
...
@@ -106,6 +106,9 @@ export default {
(
!
this
.
mr
.
isNothingToMergeState
&&
!
this
.
mr
.
isMergedState
)
);
},
shouldRenderCollaborationStatus
()
{
return
this
.
mr
.
allowCollaboration
&&
this
.
mr
.
isOpen
;
},
shouldRenderMergedPipeline
()
{
return
this
.
mr
.
state
===
'
merged
'
&&
!
_
.
isEmpty
(
this
.
mr
.
mergePipeline
);
},
...
...
@@ -316,7 +319,7 @@ export default {
<div
class=
"mr-widget-section"
>
<component
:is=
"componentName"
:mr=
"mr"
:service=
"service"
/>
<section
v-if=
"
mr.allowCollaboration
"
class=
"mr-info-list mr-links"
>
<section
v-if=
"
shouldRenderCollaborationStatus
"
class=
"mr-info-list mr-links"
>
{{
s__
(
'
mrWidget|Allows commits from members who can merge to the target branch
'
)
}}
</section>
...
...
app/assets/stylesheets/pages/pipelines.scss
View file @
9100cefd
...
...
@@ -980,7 +980,6 @@ button.mini-pipeline-graph-dropdown-toggle {
* Top arrow in the dropdown in the mini pipeline graph
*/
.mini-pipeline-graph-dropdown-menu
{
z-index
:
200
;
&
:
:
before
,
&::
after
{
...
...
changelogs/unreleased/allow_collaboration_status_work.yml
0 → 100644
View file @
9100cefd
---
title
:
Update a condition to visibility a merge request collaboration message
merge_request
:
23104
author
:
Harry Kiselev
type
:
other
changelogs/unreleased/ci-dropdown-hidden-bug.yml
0 → 100644
View file @
9100cefd
---
title
:
Don't hide CI dropdown behind diff summary
merge_request
:
author
:
gfyoung
type
:
fixed
spec/javascripts/vue_mr_widget/mr_widget_options_spec.js
View file @
9100cefd
...
...
@@ -18,6 +18,8 @@ describe('mrWidgetOptions', () => {
let
vm
;
let
MrWidgetOptions
;
const
COLLABORATION_MESSAGE
=
'
Allows commits from members who can merge to the target branch
'
;
beforeEach
(()
=>
{
// Prevent component mounting
delete
mrWidgetOptions
.
el
;
...
...
@@ -132,6 +134,53 @@ describe('mrWidgetOptions', () => {
expect
(
vm
.
shouldRenderSourceBranchRemovalStatus
).
toEqual
(
false
);
});
});
describe
(
'
shouldRenderCollaborationStatus
'
,
()
=>
{
describe
(
'
when collaboration is allowed
'
,
()
=>
{
beforeEach
(()
=>
{
vm
.
mr
.
allowCollaboration
=
true
;
});
describe
(
'
when merge request is opened
'
,
()
=>
{
beforeEach
(
done
=>
{
vm
.
mr
.
isOpen
=
true
;
vm
.
$nextTick
(
done
);
});
it
(
'
should render collaboration status
'
,
()
=>
{
expect
(
vm
.
$el
.
textContent
).
toContain
(
COLLABORATION_MESSAGE
);
});
});
describe
(
'
when merge request is not opened
'
,
()
=>
{
beforeEach
(
done
=>
{
vm
.
mr
.
isOpen
=
false
;
vm
.
$nextTick
(
done
);
});
it
(
'
should not render collaboration status
'
,
()
=>
{
expect
(
vm
.
$el
.
textContent
).
not
.
toContain
(
COLLABORATION_MESSAGE
);
});
});
});
describe
(
'
when collaboration is not allowed
'
,
()
=>
{
beforeEach
(()
=>
{
vm
.
mr
.
allowCollaboration
=
false
;
});
describe
(
'
when merge request is opened
'
,
()
=>
{
beforeEach
(
done
=>
{
vm
.
mr
.
isOpen
=
true
;
vm
.
$nextTick
(
done
);
});
it
(
'
should not render collaboration status
'
,
()
=>
{
expect
(
vm
.
$el
.
textContent
).
not
.
toContain
(
COLLABORATION_MESSAGE
);
});
});
});
});
});
describe
(
'
methods
'
,
()
=>
{
...
...
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