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
063e081c
Commit
063e081c
authored
May 13, 2021
by
Marcel van Remmerden
Committed by
Ezekiel Kigbo
May 13, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve "Fix inconsistent cancel merge train button label"
parent
f963a7b0
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
29 additions
and
26 deletions
+29
-26
app/assets/javascripts/vue_merge_request_widget/mixins/auto_merge.js
...javascripts/vue_merge_request_widget/mixins/auto_merge.js
+1
-1
changelogs/unreleased/283903-fix-inconsistent-cancel-merge-train-button-label.yml
...3903-fix-inconsistent-cancel-merge-train-button-label.yml
+5
-0
ee/app/assets/javascripts/vue_merge_request_widget/mixins/auto_merge.js
...javascripts/vue_merge_request_widget/mixins/auto_merge.js
+1
-1
ee/spec/features/merge_trains/user_adds_to_merge_train_when_pipeline_succeeds_spec.rb
...s/user_adds_to_merge_train_when_pipeline_succeeds_spec.rb
+3
-3
ee/spec/frontend/vue_mr_widget/components/states/mr_widget_auto_merge_enabled_spec.js
...et/components/states/mr_widget_auto_merge_enabled_spec.js
+5
-5
locale/gitlab.pot
locale/gitlab.pot
+1
-1
spec/features/merge_request/user_merges_when_pipeline_succeeds_spec.rb
.../merge_request/user_merges_when_pipeline_succeeds_spec.rb
+3
-3
spec/features/merge_request/user_sees_merge_request_pipelines_spec.rb
...s/merge_request/user_sees_merge_request_pipelines_spec.rb
+4
-4
spec/frontend/vue_mr_widget/components/states/__snapshots__/mr_widget_auto_merge_enabled_spec.js.snap
...s/__snapshots__/mr_widget_auto_merge_enabled_spec.js.snap
+2
-2
spec/frontend/vue_mr_widget/components/states/mr_widget_auto_merge_enabled_spec.js
...et/components/states/mr_widget_auto_merge_enabled_spec.js
+4
-6
No files found.
app/assets/javascripts/vue_merge_request_widget/mixins/auto_merge.js
View file @
063e081c
...
@@ -9,7 +9,7 @@ export default {
...
@@ -9,7 +9,7 @@ export default {
return
s__
(
'
mrWidget|to be merged automatically when the pipeline succeeds
'
);
return
s__
(
'
mrWidget|to be merged automatically when the pipeline succeeds
'
);
},
},
cancelButtonText
()
{
cancelButtonText
()
{
return
s__
(
'
mrWidget|Cancel
automatic merge
'
);
return
s__
(
'
mrWidget|Cancel
'
);
},
},
},
},
};
};
changelogs/unreleased/283903-fix-inconsistent-cancel-merge-train-button-label.yml
0 → 100644
View file @
063e081c
---
title
:
Fix inconsistent cancel merge train button label
merge_request
:
61597
author
:
type
:
other
ee/app/assets/javascripts/vue_merge_request_widget/mixins/auto_merge.js
View file @
063e081c
...
@@ -32,7 +32,7 @@ export default {
...
@@ -32,7 +32,7 @@ export default {
return
s__
(
'
mrWidget|Remove from merge train
'
);
return
s__
(
'
mrWidget|Remove from merge train
'
);
}
}
return
s__
(
'
mrWidget|Cancel
automatic merge
'
);
return
s__
(
'
mrWidget|Cancel
'
);
},
},
},
},
};
};
ee/spec/features/merge_trains/user_adds_to_merge_train_when_pipeline_succeeds_spec.rb
View file @
063e081c
...
@@ -59,14 +59,14 @@ RSpec.describe 'User adds to merge train when pipeline succeeds', :js do
...
@@ -59,14 +59,14 @@ RSpec.describe 'User adds to merge train when pipeline succeeds', :js do
within
(
'.mr-widget-section'
)
do
within
(
'.mr-widget-section'
)
do
expect
(
page
).
to
have_content
(
"Set by
#{
user
.
name
}
to start a merge train when the pipeline succeeds"
)
expect
(
page
).
to
have_content
(
"Set by
#{
user
.
name
}
to start a merge train when the pipeline succeeds"
)
expect
(
page
).
to
have_content
(
'The source branch will not be deleted'
)
expect
(
page
).
to
have_content
(
'The source branch will not be deleted'
)
expect
(
page
).
to
have_link
(
'Cancel
automatic merge
'
)
expect
(
page
).
to
have_link
(
'Cancel'
)
expect
(
page
).
to
have_link
(
'Delete source branch'
)
expect
(
page
).
to
have_link
(
'Delete source branch'
)
end
end
end
end
context
"when user clicks 'Cancel
automatic merge
' button"
do
context
"when user clicks 'Cancel' button"
do
before
do
before
do
click_link
'Cancel
automatic merge
'
click_link
'Cancel'
end
end
it
'cancels automatic merge'
do
it
'cancels automatic merge'
do
...
...
ee/spec/frontend/vue_mr_widget/components/states/mr_widget_auto_merge_enabled_spec.js
View file @
063e081c
...
@@ -99,7 +99,7 @@ describe('MRWidgetAutoMergeEnabled', () => {
...
@@ -99,7 +99,7 @@ describe('MRWidgetAutoMergeEnabled', () => {
it
(
'
should return "Cancel start merge train" if MTWPS is selected
'
,
()
=>
{
it
(
'
should return "Cancel start merge train" if MTWPS is selected
'
,
()
=>
{
factory
({
autoMergeStrategy
:
MTWPS_MERGE_STRATEGY
});
factory
({
autoMergeStrategy
:
MTWPS_MERGE_STRATEGY
});
expect
(
vm
.
cancelButtonText
).
toBe
(
'
Cancel
automatic merge
'
);
expect
(
vm
.
cancelButtonText
).
toBe
(
'
Cancel
'
);
});
});
it
(
'
should return "Remove from merge train" if the pipeline has been added to the merge train
'
,
()
=>
{
it
(
'
should return "Remove from merge train" if the pipeline has been added to the merge train
'
,
()
=>
{
...
@@ -108,10 +108,10 @@ describe('MRWidgetAutoMergeEnabled', () => {
...
@@ -108,10 +108,10 @@ describe('MRWidgetAutoMergeEnabled', () => {
expect
(
vm
.
cancelButtonText
).
toBe
(
'
Remove from merge train
'
);
expect
(
vm
.
cancelButtonText
).
toBe
(
'
Remove from merge train
'
);
});
});
it
(
'
should return "Cancel
automatic merge
" if MWPS is selected
'
,
()
=>
{
it
(
'
should return "Cancel" if MWPS is selected
'
,
()
=>
{
factory
({
autoMergeStrategy
:
MWPS_MERGE_STRATEGY
});
factory
({
autoMergeStrategy
:
MWPS_MERGE_STRATEGY
});
expect
(
vm
.
cancelButtonText
).
toBe
(
'
Cancel
automatic merge
'
);
expect
(
vm
.
cancelButtonText
).
toBe
(
'
Cancel
'
);
});
});
});
});
});
});
...
@@ -139,12 +139,12 @@ describe('MRWidgetAutoMergeEnabled', () => {
...
@@ -139,12 +139,12 @@ describe('MRWidgetAutoMergeEnabled', () => {
expect
(
statusText
).
toBe
(
'
to be added to the merge train when the pipeline succeeds
'
);
expect
(
statusText
).
toBe
(
'
to be added to the merge train when the pipeline succeeds
'
);
});
});
it
(
'
should render the cancel button as "Cancel
automatic merge
" if MTWPS is selected
'
,
()
=>
{
it
(
'
should render the cancel button as "Cancel" if MTWPS is selected
'
,
()
=>
{
factory
({
autoMergeStrategy
:
MTWPS_MERGE_STRATEGY
});
factory
({
autoMergeStrategy
:
MTWPS_MERGE_STRATEGY
});
const
cancelButtonText
=
wrapper
.
find
(
'
.js-cancel-auto-merge
'
).
text
();
const
cancelButtonText
=
wrapper
.
find
(
'
.js-cancel-auto-merge
'
).
text
();
expect
(
cancelButtonText
).
toBe
(
'
Cancel
automatic merge
'
);
expect
(
cancelButtonText
).
toBe
(
'
Cancel
'
);
});
});
});
});
...
...
locale/gitlab.pot
View file @
063e081c
...
@@ -38600,7 +38600,7 @@ msgstr ""
...
@@ -38600,7 +38600,7 @@ msgstr ""
msgid "mrWidget|Are you adding technical debt or code vulnerabilities?"
msgid "mrWidget|Are you adding technical debt or code vulnerabilities?"
msgstr ""
msgstr ""
msgid "mrWidget|Cancel
automatic merge
"
msgid "mrWidget|Cancel"
msgstr ""
msgstr ""
msgid "mrWidget|Check out branch"
msgid "mrWidget|Check out branch"
...
...
spec/features/merge_request/user_merges_when_pipeline_succeeds_spec.rb
View file @
063e081c
...
@@ -64,7 +64,7 @@ RSpec.describe 'Merge request > User merges when pipeline succeeds', :js do
...
@@ -64,7 +64,7 @@ RSpec.describe 'Merge request > User merges when pipeline succeeds', :js do
context
'when enabled after it was previously canceled'
do
context
'when enabled after it was previously canceled'
do
before
do
before
do
click_button
"Merge when pipeline succeeds"
click_button
"Merge when pipeline succeeds"
click_link
"Cancel
automatic merge
"
click_link
"Cancel"
wait_for_requests
wait_for_requests
...
@@ -87,7 +87,7 @@ RSpec.describe 'Merge request > User merges when pipeline succeeds', :js do
...
@@ -87,7 +87,7 @@ RSpec.describe 'Merge request > User merges when pipeline succeeds', :js do
before
do
before
do
merge_request
.
merge_params
[
'force_remove_source_branch'
]
=
'0'
merge_request
.
merge_params
[
'force_remove_source_branch'
]
=
'0'
merge_request
.
save!
merge_request
.
save!
click_link
"Cancel
automatic merge
"
click_link
"Cancel"
end
end
it_behaves_like
'Merge when pipeline succeeds activator'
it_behaves_like
'Merge when pipeline succeeds activator'
...
@@ -114,7 +114,7 @@ RSpec.describe 'Merge request > User merges when pipeline succeeds', :js do
...
@@ -114,7 +114,7 @@ RSpec.describe 'Merge request > User merges when pipeline succeeds', :js do
end
end
it
'allows to cancel the automatic merge'
do
it
'allows to cancel the automatic merge'
do
click_link
"Cancel
automatic merge
"
click_link
"Cancel"
expect
(
page
).
to
have_button
"Merge when pipeline succeeds"
expect
(
page
).
to
have_button
"Merge when pipeline succeeds"
...
...
spec/features/merge_request/user_sees_merge_request_pipelines_spec.rb
View file @
063e081c
...
@@ -147,7 +147,7 @@ RSpec.describe 'Merge request > User sees pipelines triggered by merge request',
...
@@ -147,7 +147,7 @@ RSpec.describe 'Merge request > User sees pipelines triggered by merge request',
context
'when detached merge request pipeline is pending'
do
context
'when detached merge request pipeline is pending'
do
it
'waits the head pipeline'
do
it
'waits the head pipeline'
do
expect
(
page
).
to
have_content
(
'to be merged automatically when the pipeline succeeds'
)
expect
(
page
).
to
have_content
(
'to be merged automatically when the pipeline succeeds'
)
expect
(
page
).
to
have_link
(
'Cancel
automatic merge
'
)
expect
(
page
).
to
have_link
(
'Cancel'
)
end
end
end
end
...
@@ -174,7 +174,7 @@ RSpec.describe 'Merge request > User sees pipelines triggered by merge request',
...
@@ -174,7 +174,7 @@ RSpec.describe 'Merge request > User sees pipelines triggered by merge request',
it
'waits the head pipeline'
do
it
'waits the head pipeline'
do
expect
(
page
).
to
have_content
(
'to be merged automatically when the pipeline succeeds'
)
expect
(
page
).
to
have_content
(
'to be merged automatically when the pipeline succeeds'
)
expect
(
page
).
to
have_link
(
'Cancel
automatic merge
'
)
expect
(
page
).
to
have_link
(
'Cancel'
)
end
end
end
end
end
end
...
@@ -369,7 +369,7 @@ RSpec.describe 'Merge request > User sees pipelines triggered by merge request',
...
@@ -369,7 +369,7 @@ RSpec.describe 'Merge request > User sees pipelines triggered by merge request',
context
'when detached merge request pipeline is pending'
do
context
'when detached merge request pipeline is pending'
do
it
'waits the head pipeline'
do
it
'waits the head pipeline'
do
expect
(
page
).
to
have_content
(
'to be merged automatically when the pipeline succeeds'
)
expect
(
page
).
to
have_content
(
'to be merged automatically when the pipeline succeeds'
)
expect
(
page
).
to
have_link
(
'Cancel
automatic merge
'
)
expect
(
page
).
to
have_link
(
'Cancel'
)
end
end
end
end
...
@@ -395,7 +395,7 @@ RSpec.describe 'Merge request > User sees pipelines triggered by merge request',
...
@@ -395,7 +395,7 @@ RSpec.describe 'Merge request > User sees pipelines triggered by merge request',
it
'waits the head pipeline'
do
it
'waits the head pipeline'
do
expect
(
page
).
to
have_content
(
'to be merged automatically when the pipeline succeeds'
)
expect
(
page
).
to
have_content
(
'to be merged automatically when the pipeline succeeds'
)
expect
(
page
).
to
have_link
(
'Cancel
automatic merge
'
)
expect
(
page
).
to
have_link
(
'Cancel'
)
end
end
end
end
end
end
...
...
spec/frontend/vue_mr_widget/components/states/__snapshots__/mr_widget_auto_merge_enabled_spec.js.snap
View file @
063e081c
...
@@ -46,7 +46,7 @@ exports[`MRWidgetAutoMergeEnabled when graphql is disabled template should have
...
@@ -46,7 +46,7 @@ exports[`MRWidgetAutoMergeEnabled when graphql is disabled template should have
>
>
<!---->
<!---->
Cancel
automatic merge
Cancel
</a>
</a>
</h4>
</h4>
...
@@ -138,7 +138,7 @@ exports[`MRWidgetAutoMergeEnabled when graphql is enabled template should have c
...
@@ -138,7 +138,7 @@ exports[`MRWidgetAutoMergeEnabled when graphql is enabled template should have c
>
>
<!---->
<!---->
Cancel
automatic merge
Cancel
</a>
</a>
</h4>
</h4>
...
...
spec/frontend/vue_mr_widget/components/states/mr_widget_auto_merge_enabled_spec.js
View file @
063e081c
...
@@ -192,15 +192,13 @@ describe('MRWidgetAutoMergeEnabled', () => {
...
@@ -192,15 +192,13 @@ describe('MRWidgetAutoMergeEnabled', () => {
});
});
describe
(
'
cancelButtonText
'
,
()
=>
{
describe
(
'
cancelButtonText
'
,
()
=>
{
it
(
'
should return "Cancel
automatic merge
" if MWPS is selected
'
,
()
=>
{
it
(
'
should return "Cancel" if MWPS is selected
'
,
()
=>
{
factory
({
factory
({
...
defaultMrProps
(),
...
defaultMrProps
(),
autoMergeStrategy
:
MWPS_MERGE_STRATEGY
,
autoMergeStrategy
:
MWPS_MERGE_STRATEGY
,
});
});
expect
(
wrapper
.
findByTestId
(
'
cancelAutomaticMergeButton
'
).
text
()).
toBe
(
expect
(
wrapper
.
findByTestId
(
'
cancelAutomaticMergeButton
'
).
text
()).
toBe
(
'
Cancel
'
);
'
Cancel automatic merge
'
,
);
});
});
});
});
});
});
...
@@ -329,7 +327,7 @@ describe('MRWidgetAutoMergeEnabled', () => {
...
@@ -329,7 +327,7 @@ describe('MRWidgetAutoMergeEnabled', () => {
expect
(
statusText
).
toBe
(
'
to be merged automatically when the pipeline succeeds
'
);
expect
(
statusText
).
toBe
(
'
to be merged automatically when the pipeline succeeds
'
);
});
});
it
(
'
should render the cancel button as "Cancel
automatic merge
" if MWPS is selected
'
,
()
=>
{
it
(
'
should render the cancel button as "Cancel" if MWPS is selected
'
,
()
=>
{
factory
({
factory
({
...
defaultMrProps
(),
...
defaultMrProps
(),
autoMergeStrategy
:
MWPS_MERGE_STRATEGY
,
autoMergeStrategy
:
MWPS_MERGE_STRATEGY
,
...
@@ -337,7 +335,7 @@ describe('MRWidgetAutoMergeEnabled', () => {
...
@@ -337,7 +335,7 @@ describe('MRWidgetAutoMergeEnabled', () => {
const
cancelButtonText
=
trimText
(
wrapper
.
find
(
'
.js-cancel-auto-merge
'
).
text
());
const
cancelButtonText
=
trimText
(
wrapper
.
find
(
'
.js-cancel-auto-merge
'
).
text
());
expect
(
cancelButtonText
).
toBe
(
'
Cancel
automatic merge
'
);
expect
(
cancelButtonText
).
toBe
(
'
Cancel
'
);
});
});
});
});
});
});
...
...
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