Commit fa0cc35e authored by Phil Hughes's avatar Phil Hughes Committed by Natalia Tepluhina

Changed the wording for optional approvals

Closes https://gitlab.com/gitlab-org/gitlab/-/issues/231475
parent 22cdb0b1
<script> <script>
import { GlTooltipDirective, GlLink } from '@gitlab/ui'; import { GlTooltipDirective, GlLink } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue'; import Icon from '~/vue_shared/components/icon.vue';
import {
OPTIONAL,
OPTIONAL_CAN_APPROVE,
} from '~/vue_merge_request_widget/components/approvals/messages';
export default { export default {
components: { components: {
...@@ -25,17 +21,12 @@ export default { ...@@ -25,17 +21,12 @@ export default {
default: '', default: '',
}, },
}, },
computed: {
message() {
return this.canApprove ? OPTIONAL_CAN_APPROVE : OPTIONAL;
},
},
}; };
</script> </script>
<template> <template>
<div class="d-flex align-items-center"> <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 <gl-link
v-if="canApprove && helpPath" v-if="canApprove && helpPath"
v-gl-tooltip v-gl-tooltip
......
...@@ -7,5 +7,3 @@ export const FETCH_ERROR = s__( ...@@ -7,5 +7,3 @@ export const FETCH_ERROR = s__(
export const APPROVE_ERROR = s__('mrWidget|An error occurred while submitting your approval.'); 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 UNAPPROVE_ERROR = s__('mrWidget|An error occurred while removing your approval.');
export const APPROVED_MESSAGE = s__('mrWidget|Merge request approved.'); 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');
---
title: Changed wording for optional approvals
merge_request: 38393
author:
type: changed
...@@ -28754,6 +28754,9 @@ msgstr "" ...@@ -28754,6 +28754,9 @@ msgstr ""
msgid "mrWidget|An error occurred while submitting your approval." msgid "mrWidget|An error occurred while submitting your approval."
msgstr "" msgstr ""
msgid "mrWidget|Approval is optional"
msgstr ""
msgid "mrWidget|Approval password is invalid." msgid "mrWidget|Approval password is invalid."
msgstr "" msgstr ""
...@@ -28862,12 +28865,6 @@ msgstr "" ...@@ -28862,12 +28865,6 @@ msgstr ""
msgid "mrWidget|More information" msgid "mrWidget|More information"
msgstr "" msgstr ""
msgid "mrWidget|No approval required"
msgstr ""
msgid "mrWidget|No approval required; you can still approve"
msgstr ""
msgid "mrWidget|Open in Web IDE" msgid "mrWidget|Open in Web IDE"
msgstr "" msgstr ""
......
...@@ -22,7 +22,7 @@ RSpec.describe 'Merge request > User approves', :js do ...@@ -22,7 +22,7 @@ RSpec.describe 'Merge request > User approves', :js do
verify_approvals_count_on_index! verify_approvals_count_on_index!
click_approval_button('Revoke approval') 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 end
def verify_approvals_count_on_index! def verify_approvals_count_on_index!
......
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlLink } from '@gitlab/ui'; 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'; import ApprovalsSummaryOptional from '~/vue_merge_request_widget/components/approvals/approvals_summary_optional.vue';
const TEST_HELP_PATH = 'help/path'; const TEST_HELP_PATH = 'help/path';
...@@ -29,10 +25,6 @@ describe('MRWidget approvals summary optional', () => { ...@@ -29,10 +25,6 @@ describe('MRWidget approvals summary optional', () => {
createComponent({ canApprove: true, helpPath: TEST_HELP_PATH }); createComponent({ canApprove: true, helpPath: TEST_HELP_PATH });
}); });
it('shows optional can approve message', () => {
expect(wrapper.text()).toEqual(OPTIONAL_CAN_APPROVE);
});
it('shows help link', () => { it('shows help link', () => {
const link = findHelpLink(); const link = findHelpLink();
...@@ -46,10 +38,6 @@ describe('MRWidget approvals summary optional', () => { ...@@ -46,10 +38,6 @@ describe('MRWidget approvals summary optional', () => {
createComponent({ canApprove: false, helpPath: TEST_HELP_PATH }); createComponent({ canApprove: false, helpPath: TEST_HELP_PATH });
}); });
it('shows optional message', () => {
expect(wrapper.text()).toEqual(OPTIONAL);
});
it('does not show help link', () => { it('does not show help link', () => {
expect(findHelpLink().exists()).toBe(false); expect(findHelpLink().exists()).toBe(false);
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment