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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
52c772f9
Commit
52c772f9
authored
Mar 07, 2019
by
Natalia Tepluhina
Committed by
Phil Hughes
Mar 07, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a condition on squash message display
- also added a caret back to GlDropdown
parent
5a82810f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
5 deletions
+23
-5
app/assets/javascripts/vue_merge_request_widget/components/states/commit_message_dropdown.vue
...uest_widget/components/states/commit_message_dropdown.vue
+0
-1
app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue
...merge_request_widget/components/states/ready_to_merge.vue
+1
-1
changelogs/unreleased/58369-hide-squash-commit.yml
changelogs/unreleased/58369-hide-squash-commit.yml
+5
-0
spec/javascripts/vue_mr_widget/components/states/mr_widget_ready_to_merge_spec.js
...widget/components/states/mr_widget_ready_to_merge_spec.js
+17
-3
No files found.
app/assets/javascripts/vue_merge_request_widget/components/states/commit_message_dropdown.vue
View file @
52c772f9
...
@@ -20,7 +20,6 @@ export default {
...
@@ -20,7 +20,6 @@ export default {
<div>
<div>
<gl-dropdown
<gl-dropdown
right
right
no-caret
text=
"Use an existing commit message"
text=
"Use an existing commit message"
variant=
"link"
variant=
"link"
class=
"mr-commit-dropdown"
class=
"mr-commit-dropdown"
...
...
app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue
View file @
52c772f9
...
@@ -329,7 +329,7 @@ export default {
...
@@ -329,7 +329,7 @@ export default {
>
>
<ul
class=
"border-top content-list commits-list flex-list"
>
<ul
class=
"border-top content-list commits-list flex-list"
>
<commit-edit
<commit-edit
v-if=
"squashBeforeMerge"
v-if=
"squashBeforeMerge
&& shouldShowSquashBeforeMerge
"
v-model=
"squashCommitMessage"
v-model=
"squashCommitMessage"
:label=
"__('Squash commit message')"
:label=
"__('Squash commit message')"
input-id=
"squash-message-edit"
input-id=
"squash-message-edit"
...
...
changelogs/unreleased/58369-hide-squash-commit.yml
0 → 100644
View file @
52c772f9
---
title
:
Resolve showing squash commit edit issue when only single commit is present
merge_request
:
25807
author
:
type
:
fixed
spec/javascripts/vue_mr_widget/components/states/mr_widget_ready_to_merge_spec.js
View file @
52c772f9
...
@@ -673,7 +673,7 @@ describe('ReadyToMerge', () => {
...
@@ -673,7 +673,7 @@ describe('ReadyToMerge', () => {
.
at
(
0
)
.
at
(
0
)
.
props
(
'
label
'
);
.
props
(
'
label
'
);
it
(
'
should have two edit components when squash is enabled
'
,
()
=>
{
it
(
'
should have two edit components when squash is enabled
and there is more than 1 commit
'
,
()
=>
{
createLocalComponent
({
createLocalComponent
({
mr
:
{
mr
:
{
commitsCount
:
2
,
commitsCount
:
2
,
...
@@ -685,6 +685,18 @@ describe('ReadyToMerge', () => {
...
@@ -685,6 +685,18 @@ describe('ReadyToMerge', () => {
expect
(
findCommitEditElements
().
length
).
toBe
(
2
);
expect
(
findCommitEditElements
().
length
).
toBe
(
2
);
});
});
it
(
'
should have one edit components when squash is enabled and there is 1 commit only
'
,
()
=>
{
createLocalComponent
({
mr
:
{
commitsCount
:
1
,
squash
:
true
,
enableSquashBeforeMerge
:
true
,
},
});
expect
(
findCommitEditElements
().
length
).
toBe
(
1
);
});
it
(
'
should have correct edit merge commit label
'
,
()
=>
{
it
(
'
should have correct edit merge commit label
'
,
()
=>
{
createLocalComponent
();
createLocalComponent
();
...
@@ -711,8 +723,10 @@ describe('ReadyToMerge', () => {
...
@@ -711,8 +723,10 @@ describe('ReadyToMerge', () => {
expect
(
findCommitDropdownElement
().
exists
()).
toBeFalsy
();
expect
(
findCommitDropdownElement
().
exists
()).
toBeFalsy
();
});
});
it
(
'
should be rendered if squash is enabled
'
,
()
=>
{
it
(
'
should be rendered if squash is enabled and there is more than 1 commit
'
,
()
=>
{
createLocalComponent
({
mr
:
{
squash
:
true
}
});
createLocalComponent
({
mr
:
{
enableSquashBeforeMerge
:
true
,
squash
:
true
,
commitsCount
:
2
},
});
expect
(
findCommitDropdownElement
().
exists
()).
toBeTruthy
();
expect
(
findCommitDropdownElement
().
exists
()).
toBeTruthy
();
});
});
...
...
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