Commit a654676c authored by Annabel Gray's avatar Annabel Gray

Merge branch '5439-approved-is-confusing-wrong-wording-in-merge-request-widget' into 'master'

Resolve ""Approved" is confusing / wrong wording in merge request widget"

Closes #5439

See merge request gitlab-org/gitlab-ee!6635
parents 4f991989 027c8c36
...@@ -71,7 +71,9 @@ export default { ...@@ -71,7 +71,9 @@ export default {
} }
if (this.approvalsLeft === 0) { if (this.approvalsLeft === 0) {
return s__('mrWidget|Approved'); return this.userCanApprove ?
s__('mrWidget|Merge request approved; you can approve additionally') :
s__('mrWidget|Merge request approved');
} }
if (this.suggestedApprovers.length >= 1) { if (this.suggestedApprovers.length >= 1) {
...@@ -126,7 +128,7 @@ export default { ...@@ -126,7 +128,7 @@ export default {
}) })
.catch(() => { .catch(() => {
this.approving = false; this.approving = false;
Flash(s__('mrWidget|An error occured while submitting your approval.')); Flash(s__('mrWidget|An error occurred while submitting your approval.'));
}); });
}, },
}, },
......
---
title: Changed copy for "Approved" state in merge request widget
merge_request: 6635
author: Constance Okoghenun
type: changed
...@@ -83,11 +83,22 @@ describe('Approvals Body Component', () => { ...@@ -83,11 +83,22 @@ describe('Approvals Body Component', () => {
}); });
}); });
it('shows the "Approved" text message when there is enough approvals in place', done => { it('shows the "Merge request approved" copy when there are enough approvals in place', done => {
vm.approvalsLeft = 0; vm.approvalsLeft = 0;
Vue.nextTick(() => { Vue.nextTick(() => {
expect(vm.approvalsRequiredStringified).toBe('Approved'); expect(vm.approvalsRequiredStringified).toBe('Merge request approved');
done();
});
});
it('shows the correct copy when there are enough approvals in place but user can approve', done => {
vm.approvalsLeft = 0;
vm.userCanApprove = true;
Vue.nextTick(() => {
expect(vm.approvalsRequiredStringified)
.toBe('Merge request approved; you can approve additionally');
done(); done();
}); });
}); });
......
...@@ -7545,15 +7545,12 @@ msgstr "" ...@@ -7545,15 +7545,12 @@ msgstr ""
msgid "mrWidget|An error occured while removing your approval." msgid "mrWidget|An error occured while removing your approval."
msgstr "" msgstr ""
msgid "mrWidget|An error occured while submitting your approval." msgid "mrWidget|An error occurred while submitting your approval."
msgstr "" msgstr ""
msgid "mrWidget|Approve" msgid "mrWidget|Approve"
msgstr "" msgstr ""
msgid "mrWidget|Approved"
msgstr ""
msgid "mrWidget|Approved by" msgid "mrWidget|Approved by"
msgstr "" msgstr ""
...@@ -7617,6 +7614,12 @@ msgstr "" ...@@ -7617,6 +7614,12 @@ msgstr ""
msgid "mrWidget|Merge locally" msgid "mrWidget|Merge locally"
msgstr "" msgstr ""
msgid "mrWidget|Merge request approved"
msgstr ""
msgid "mrWidget|Merge request approved; you can approve additionally"
msgstr ""
msgid "mrWidget|Merged by" msgid "mrWidget|Merged by"
msgstr "" msgstr ""
......
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