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>
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
......
......@@ -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');
---
title: Changed wording for optional approvals
merge_request: 38393
author:
type: changed
......@@ -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 ""
......
......@@ -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!
......
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);
});
......
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