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
fa0cc35e
Commit
fa0cc35e
authored
Aug 10, 2020
by
Phil Hughes
Committed by
Natalia Tepluhina
Aug 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed the wording for optional approvals
Closes
https://gitlab.com/gitlab-org/gitlab/-/issues/231475
parent
22cdb0b1
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
31 deletions
+10
-31
app/assets/javascripts/vue_merge_request_widget/components/approvals/approvals_summary_optional.vue
...idget/components/approvals/approvals_summary_optional.vue
+1
-10
app/assets/javascripts/vue_merge_request_widget/components/approvals/messages.js
...vue_merge_request_widget/components/approvals/messages.js
+0
-2
changelogs/unreleased/ph-231475-fixedApprovalsText.yml
changelogs/unreleased/ph-231475-fixedApprovalsText.yml
+5
-0
locale/gitlab.pot
locale/gitlab.pot
+3
-6
spec/features/merge_request/user_approves_spec.rb
spec/features/merge_request/user_approves_spec.rb
+1
-1
spec/frontend/vue_mr_widget/components/approvals/approvals_summary_optional_spec.js
...t/components/approvals/approvals_summary_optional_spec.js
+0
-12
No files found.
app/assets/javascripts/vue_merge_request_widget/components/approvals/approvals_summary_optional.vue
View file @
fa0cc35e
<
script
>
import
{
GlTooltipDirective
,
GlLink
}
from
'
@gitlab/ui
'
;
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
import
{
OPTIONAL
,
OPTIONAL_CAN_APPROVE
,
}
from
'
~/vue_merge_request_widget/components/approvals/messages
'
;
export
default
{
components
:
{
...
...
@@ -25,17 +21,12 @@ export default {
default
:
''
,
},
},
computed
:
{
message
()
{
return
this
.
canApprove
?
OPTIONAL_CAN_APPROVE
:
OPTIONAL
;
},
},
};
</
script
>
<
template
>
<div
class=
"d-flex align-items-center"
>
<span
class=
"text-muted"
>
{{
message
}}
</span>
<span
class=
"text-muted"
>
{{
s__
(
'
mrWidget|Approval is optional
'
)
}}
</span>
<gl-link
v-if=
"canApprove && helpPath"
v-gl-tooltip
...
...
app/assets/javascripts/vue_merge_request_widget/components/approvals/messages.js
View file @
fa0cc35e
...
...
@@ -7,5 +7,3 @@ export const FETCH_ERROR = s__(
export
const
APPROVE_ERROR
=
s__
(
'
mrWidget|An error occurred while submitting your approval.
'
);
export
const
UNAPPROVE_ERROR
=
s__
(
'
mrWidget|An error occurred while removing your approval.
'
);
export
const
APPROVED_MESSAGE
=
s__
(
'
mrWidget|Merge request approved.
'
);
export
const
OPTIONAL_CAN_APPROVE
=
s__
(
'
mrWidget|No approval required; you can still approve
'
);
export
const
OPTIONAL
=
s__
(
'
mrWidget|No approval required
'
);
changelogs/unreleased/ph-231475-fixedApprovalsText.yml
0 → 100644
View file @
fa0cc35e
---
title
:
Changed wording for optional approvals
merge_request
:
38393
author
:
type
:
changed
locale/gitlab.pot
View file @
fa0cc35e
...
...
@@ -28754,6 +28754,9 @@ msgstr ""
msgid "mrWidget|An error occurred while submitting your approval."
msgstr ""
msgid "mrWidget|Approval is optional"
msgstr ""
msgid "mrWidget|Approval password is invalid."
msgstr ""
...
...
@@ -28862,12 +28865,6 @@ msgstr ""
msgid "mrWidget|More information"
msgstr ""
msgid "mrWidget|No approval required"
msgstr ""
msgid "mrWidget|No approval required; you can still approve"
msgstr ""
msgid "mrWidget|Open in Web IDE"
msgstr ""
...
...
spec/features/merge_request/user_approves_spec.rb
View file @
fa0cc35e
...
...
@@ -22,7 +22,7 @@ RSpec.describe 'Merge request > User approves', :js do
verify_approvals_count_on_index!
click_approval_button
(
'Revoke approval'
)
expect
(
page
).
to
have_content
(
'
No approval required; you can still approve
'
)
expect
(
page
).
to
have_content
(
'
Approval is optional
'
)
end
def
verify_approvals_count_on_index!
...
...
spec/frontend/vue_mr_widget/components/approvals/approvals_summary_optional_spec.js
View file @
fa0cc35e
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
GlLink
}
from
'
@gitlab/ui
'
;
import
{
OPTIONAL
,
OPTIONAL_CAN_APPROVE
,
}
from
'
~/vue_merge_request_widget/components/approvals/messages
'
;
import
ApprovalsSummaryOptional
from
'
~/vue_merge_request_widget/components/approvals/approvals_summary_optional.vue
'
;
const
TEST_HELP_PATH
=
'
help/path
'
;
...
...
@@ -29,10 +25,6 @@ describe('MRWidget approvals summary optional', () => {
createComponent
({
canApprove
:
true
,
helpPath
:
TEST_HELP_PATH
});
});
it
(
'
shows optional can approve message
'
,
()
=>
{
expect
(
wrapper
.
text
()).
toEqual
(
OPTIONAL_CAN_APPROVE
);
});
it
(
'
shows help link
'
,
()
=>
{
const
link
=
findHelpLink
();
...
...
@@ -46,10 +38,6 @@ describe('MRWidget approvals summary optional', () => {
createComponent
({
canApprove
:
false
,
helpPath
:
TEST_HELP_PATH
});
});
it
(
'
shows optional message
'
,
()
=>
{
expect
(
wrapper
.
text
()).
toEqual
(
OPTIONAL
);
});
it
(
'
does not show help link
'
,
()
=>
{
expect
(
findHelpLink
().
exists
()).
toBe
(
false
);
});
...
...
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