BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
b7835587
Commit
b7835587
authored
Oct 19, 2017
by
Eric Eastwood
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change default disabled merge request widget message to "Merge is not allowed yet"
Fix
https://gitlab.com/gitlab-org/gitlab-ce/issues/39188
parent
a1aa4f00
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
2 deletions
+54
-2
mr_widget_ready_to_merge.js
...uest_widget/components/states/mr_widget_ready_to_merge.js
+3
-2
39188-change-default-disabled-merge-message.yml
...nreleased/39188-change-default-disabled-merge-message.yml
+5
-0
mr_widget_ready_to_merge_spec.js
...widget/components/states/mr_widget_ready_to_merge_spec.js
+46
-0
No files found.
app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_ready_to_merge.js
View file @
b7835587
...
...
@@ -286,6 +286,7 @@ export default {
<input
id="remove-source-branch-input"
v-model="removeSourceBranch"
class="js-remove-source-branch-checkbox"
:disabled="isRemoveSourceBranchButtonDisabled"
type="checkbox"/> Remove source branch
</label>
...
...
@@ -311,8 +312,8 @@ export default {
</button>
</template>
<template v-else>
<span class="bold">
The pipeline for this merge request has not succeeded yet
<span class="bold
js-resolve-mr-widget-items-message
">
You can only merge once the items above are resolved
</span>
</template>
</div>
...
...
changelogs/unreleased/39188-change-default-disabled-merge-message.yml
0 → 100644
View file @
b7835587
---
title
:
Update default disabled merge request widget message to reflect a general failure
merge_request
:
14960
author
:
type
:
changed
spec/javascripts/vue_mr_widget/components/states/mr_widget_ready_to_merge_spec.js
View file @
b7835587
...
...
@@ -43,6 +43,10 @@ describe('MRWidgetReadyToMerge', () => {
vm
=
createComponent
();
});
afterEach
(()
=>
{
vm
.
$destroy
();
});
describe
(
'props'
,
()
=>
{
it
(
'should have props'
,
()
=>
{
const
{
mr
,
service
}
=
readyToMergeComponent
.
props
;
...
...
@@ -495,6 +499,48 @@ describe('MRWidgetReadyToMerge', () => {
});
});
describe
(
'Merge controls'
,
()
=>
{
describe
(
'when allowed to merge'
,
()
=>
{
beforeEach
(()
=>
{
vm
=
createComponent
({
mr
:
{
isMergeAllowed
:
true
},
});
});
it
(
'shows remove source branch checkbox'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'.js-remove-source-branch-checkbox'
)).
toBeDefined
();
});
it
(
'shows modify commit message button'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'.js-modify-commit-message-button'
)).
toBeDefined
();
});
it
(
'does not show message about needing to resolve items'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'.js-resolve-mr-widget-items-message'
)).
toBeNull
();
});
});
describe
(
'when not allowed to merge'
,
()
=>
{
beforeEach
(()
=>
{
vm
=
createComponent
({
mr
:
{
isMergeAllowed
:
false
},
});
});
it
(
'does not show remove source branch checkbox'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'.js-remove-source-branch-checkbox'
)).
toBeNull
();
});
it
(
'does not show modify commit message button'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'.js-modify-commit-message-button'
)).
toBeNull
();
});
it
(
'shows message to resolve all items before being allowed to merge'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'.js-resolve-mr-widget-items-message'
)).
toBeDefined
();
});
});
});
describe
(
'Commit message area'
,
()
=>
{
it
(
'when using merge commits, should show "Modify commit message" button'
,
()
=>
{
const
customVm
=
createComponent
({
...
...
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