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
700d31da
Commit
700d31da
authored
Apr 26, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
9a322940
55767af4
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
1 deletion
+39
-1
app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue
...avascripts/vue_merge_request_widget/mr_widget_options.vue
+2
-1
app/assets/javascripts/vue_shared/components/notes/system_note.vue
...s/javascripts/vue_shared/components/notes/system_note.vue
+4
-0
changelogs/unreleased/60808-only-show-target-branch-advanced-error-before-merge.yml
...8-only-show-target-branch-advanced-error-before-merge.yml
+6
-0
changelogs/unreleased/60855-mr-popover-is-not-attached-in-system-notes.yml
...ased/60855-mr-popover-is-not-attached-in-system-notes.yml
+5
-0
spec/frontend/vue_shared/components/notes/system_note_spec.js
.../frontend/vue_shared/components/notes/system_note_spec.js
+6
-0
spec/javascripts/vue_mr_widget/mr_widget_options_spec.js
spec/javascripts/vue_mr_widget/mr_widget_options_spec.js
+16
-0
No files found.
app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue
View file @
700d31da
...
...
@@ -119,7 +119,8 @@ export default {
},
showTargetBranchAdvancedError
()
{
return
Boolean
(
this
.
mr
.
pipeline
&&
this
.
mr
.
isOpen
&&
this
.
mr
.
pipeline
&&
this
.
mr
.
pipeline
.
target_sha
&&
this
.
mr
.
pipeline
.
target_sha
!==
this
.
mr
.
targetBranchSha
,
);
...
...
app/assets/javascripts/vue_shared/components/notes/system_note.vue
View file @
700d31da
...
...
@@ -22,6 +22,7 @@ import noteHeader from '~/notes/components/note_header.vue';
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
import
TimelineEntryItem
from
'
./timeline_entry_item.vue
'
;
import
{
spriteIcon
}
from
'
../../../lib/utils/common_utils
'
;
import
initMRPopovers
from
'
~/mr_popover/
'
;
const
MAX_VISIBLE_COMMIT_LIST_COUNT
=
3
;
...
...
@@ -71,6 +72,9 @@ export default {
);
},
},
mounted
()
{
initMRPopovers
(
this
.
$el
.
querySelectorAll
(
'
.gfm-merge_request
'
));
},
};
</
script
>
...
...
changelogs/unreleased/60808-only-show-target-branch-advanced-error-before-merge.yml
0 → 100644
View file @
700d31da
---
title
:
Only show the "target branch has advanced" message when the merge request is
open
merge_request
:
27588
author
:
type
:
fixed
changelogs/unreleased/60855-mr-popover-is-not-attached-in-system-notes.yml
0 → 100644
View file @
700d31da
---
title
:
Fix bug where system note MR has no popover
merge_request
:
27589
author
:
type
:
fixed
spec/frontend/vue_shared/components/notes/system_note_spec.js
View file @
700d31da
...
...
@@ -5,8 +5,10 @@ import createStore from '~/notes/stores';
describe
(
'
system note component
'
,
()
=>
{
let
vm
;
let
props
;
let
initMRPopoversSpy
;
beforeEach
(()
=>
{
initMRPopoversSpy
=
spyOnDependency
(
issueSystemNote
,
'
initMRPopovers
'
);
props
=
{
note
:
{
id
:
'
1424
'
,
...
...
@@ -56,4 +58,8 @@ describe('system note component', () => {
it
(
'
removes wrapping paragraph from note HTML
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.system-note-message
'
).
innerHTML
).
toEqual
(
'
<span>closed</span>
'
);
});
it
(
'
should initMRPopovers onMount
'
,
()
=>
{
expect
(
initMRPopoversSpy
).
toHaveBeenCalled
();
});
});
spec/javascripts/vue_mr_widget/mr_widget_options_spec.js
View file @
700d31da
...
...
@@ -228,6 +228,7 @@ describe('mrWidgetOptions', () => {
describe
(
'
showTargetBranchAdvancedError
'
,
()
=>
{
describe
(
`when the pipeline's target_sha property doesn't exist`
,
()
=>
{
beforeEach
(
done
=>
{
Vue
.
set
(
vm
.
mr
,
'
isOpen
'
,
true
);
Vue
.
set
(
vm
.
mr
.
pipeline
,
'
target_sha
'
,
undefined
);
Vue
.
set
(
vm
.
mr
,
'
targetBranchSha
'
,
'
abcd
'
);
vm
.
$nextTick
(
done
);
...
...
@@ -240,6 +241,7 @@ describe('mrWidgetOptions', () => {
describe
(
`when the pipeline's target_sha matches the target branch's sha`
,
()
=>
{
beforeEach
(
done
=>
{
Vue
.
set
(
vm
.
mr
,
'
isOpen
'
,
true
);
Vue
.
set
(
vm
.
mr
.
pipeline
,
'
target_sha
'
,
'
abcd
'
);
Vue
.
set
(
vm
.
mr
,
'
targetBranchSha
'
,
'
abcd
'
);
vm
.
$nextTick
(
done
);
...
...
@@ -250,8 +252,22 @@ describe('mrWidgetOptions', () => {
});
});
describe
(
`when the merge request is not open`
,
()
=>
{
beforeEach
(
done
=>
{
Vue
.
set
(
vm
.
mr
,
'
isOpen
'
,
false
);
Vue
.
set
(
vm
.
mr
.
pipeline
,
'
target_sha
'
,
'
abcd
'
);
Vue
.
set
(
vm
.
mr
,
'
targetBranchSha
'
,
'
bcde
'
);
vm
.
$nextTick
(
done
);
});
it
(
'
should be false
'
,
()
=>
{
expect
(
vm
.
showTargetBranchAdvancedError
).
toEqual
(
false
);
});
});
describe
(
`when the pipeline's target_sha does not match the target branch's sha`
,
()
=>
{
beforeEach
(
done
=>
{
Vue
.
set
(
vm
.
mr
,
'
isOpen
'
,
true
);
Vue
.
set
(
vm
.
mr
.
pipeline
,
'
target_sha
'
,
'
abcd
'
);
Vue
.
set
(
vm
.
mr
,
'
targetBranchSha
'
,
'
bcde
'
);
vm
.
$nextTick
(
done
);
...
...
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