Commit 9b25302d authored by Sean McGivern's avatar Sean McGivern

Merge branch 'sh-rename-approve-additionally' into 'master'

Rename "Approve Additionally" to "Add approval"

See merge request gitlab-org/gitlab-ee!4717
parents 565b9786 df267104
......@@ -81,8 +81,8 @@ the following is possible:
![Approve](img/approve.png)
- If the required number of approvals has already been met, they can still
approve it by clicking the displayed **Approve additionally** button.
![Approve additionally](img/approve_additionally.png)
approve it by clicking the displayed **Add approval** button.
![Add approval](img/approve_additionally.png)
---
......
......@@ -55,7 +55,7 @@ export default {
approveButtonText() {
let approveButtonText = s__('mrWidget|Approve');
if (this.approvalsLeft <= 0) {
approveButtonText = s__('mrWidget|Approve additionally');
approveButtonText = s__('mrWidget|Add approval');
}
return approveButtonText;
},
......
---
title: Rename "Approve Additionally" to "Add approval"
merge_request:
author:
type: other
......@@ -42,13 +42,13 @@ describe 'User approves a merge request', :js do
sign_out(user)
sign_in_visit_merge_request(user2)
sign_in_visit_merge_request(user3)
sign_in_visit_merge_request(user2, true)
sign_in_visit_merge_request(user3, true)
expect(all('.js-approver-list-member').count).to eq(3)
end
it "doesn't show the approve additionally when a merge request is closed" do
it "doesn't show the add approval when a merge request is closed" do
merge_request_closed = create(:merge_request, :closed, source_project: project, target_project: project)
create(:approval, merge_request: merge_request_closed, user: user)
......@@ -58,13 +58,14 @@ describe 'User approves a merge request', :js do
wait_for_requests
expect(page).not_to have_button('Approve')
expect(page).not_to have_button('Approve additionally')
expect(page).not_to have_button('Add approval')
end
def sign_in_visit_merge_request(user)
def sign_in_visit_merge_request(user, additional_approver = false)
sign_in(user)
visit(merge_request_path(merge_request))
click_button('Approve')
button_text = additional_approver ? 'Add approval' : 'Approve'
click_button(button_text)
wait_for_requests
sign_out(user)
end
......
......@@ -4085,7 +4085,7 @@ msgstr ""
msgid "mrWidget|Approve"
msgstr ""
msgid "mrWidget|Approve additionally"
msgid "mrWidget|Add approval"
msgstr ""
msgid "mrWidget|Approved by"
......
......@@ -115,13 +115,13 @@ import ApprovalsBody from 'ee/vue_merge_request_widget/components/approvals/appr
});
});
it('The approve button should have the "Approve additionally" text', function (done) {
it('The approve button should have the "Add approval" text', function (done) {
this.approvalsBody.approvalsLeft = 0;
this.approvalsBody.userHasApproved = false;
this.approvalsBody.userCanApprove = true;
Vue.nextTick(() => {
expect(this.approvalsBody.approveButtonText).toBe('Approve additionally');
expect(this.approvalsBody.approveButtonText).toBe('Add approval');
done();
});
});
......
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