Commit 07438f88 authored by Samantha Ming's avatar Samantha Ming Committed by Filipa Lacerda

Rename Approvers field and modal title

- Change approvers to "Approval rule"
- Change members to "Approvers"
parent 38ca8915
...@@ -49,7 +49,7 @@ export default { ...@@ -49,7 +49,7 @@ export default {
<gl-loading-icon v-if="isLoading" /> <gl-loading-icon v-if="isLoading" />
<div v-if="settings.allowMultiRule" class="d-flex"> <div v-if="settings.allowMultiRule" class="d-flex">
<gl-button class="ml-auto btn-info btn-inverted" @click="openCreateModal(null)">{{ <gl-button class="ml-auto btn-info btn-inverted" @click="openCreateModal(null)">{{
__('Add approvers') __('Add approval rule')
}}</gl-button> }}</gl-button>
</div> </div>
</div> </div>
......
...@@ -20,7 +20,7 @@ export default { ...@@ -20,7 +20,7 @@ export default {
rule: 'data', rule: 'data',
}), }),
title() { title() {
return this.rule ? __('Update approvers') : __('Add approvers'); return this.rule ? __('Update approval rule') : __('Add approval rule');
}, },
}, },
methods: { methods: {
......
...@@ -252,7 +252,7 @@ export default { ...@@ -252,7 +252,7 @@ export default {
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="label-bold">{{ s__('ApprovalRule|Members') }}</label> <label class="label-bold">{{ s__('ApprovalRule|Approvers') }}</label>
<div class="d-flex align-items-start"> <div class="d-flex align-items-start">
<div class="w-100"> <div class="w-100">
<approvers-select <approvers-select
......
...@@ -3,7 +3,7 @@ import { s__ } from '~/locale'; ...@@ -3,7 +3,7 @@ import { s__ } from '~/locale';
const HEADERS = { const HEADERS = {
name: s__('ApprovalRule|Name'), name: s__('ApprovalRule|Name'),
members: s__('ApprovalRule|Members'), members: s__('ApprovalRule|Approvers'),
approvalsRequired: s__('ApprovalRule|No. approvals required'), approvalsRequired: s__('ApprovalRule|No. approvals required'),
}; };
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
.form-group.row .form-group.row
.col-sm-2.col-form-label .col-sm-2.col-form-label
= form.label :approver_ids, "Approvers" = form.label :approver_ids, "Approval rules"
.col-sm-10 .col-sm-10
#js-mr-approvals-input{ data: { 'project_id': @target_project.id, #js-mr-approvals-input{ data: { 'project_id': @target_project.id,
'can_edit': can?(current_user, :update_approvers, issuable).to_s, 'can_edit': can?(current_user, :update_approvers, issuable).to_s,
......
---
title: Rename Approvers field and modal title
merge_request: 15461
author:
type: other
...@@ -51,13 +51,13 @@ describe 'Merge request > User edits MR with approval rules', :js do ...@@ -51,13 +51,13 @@ describe 'Merge request > User edits MR with approval rules', :js do
it "allows user to create approval rule" do it "allows user to create approval rule" do
rule_name = "Custom Approval Rule" rule_name = "Custom Approval Rule"
click_button "Add approvers" click_button "Add approval rule"
fill_in "Rule name", with: rule_name fill_in "Rule name", with: rule_name
add_approval_rule_member('user', approver.name) add_approval_rule_member('user', approver.name)
find("#{modal_id} button", text: 'Add approvers').click find("#{modal_id} button", text: 'Add approval rule').click
wait_for_requests wait_for_requests
expect(page_rule_names.last).to have_text(rule_name) expect(page_rule_names.last).to have_text(rule_name)
...@@ -69,7 +69,7 @@ describe 'Merge request > User edits MR with approval rules', :js do ...@@ -69,7 +69,7 @@ describe 'Merge request > User edits MR with approval rules', :js do
before do before do
group.add_developer create(:user) group.add_developer create(:user)
click_button "Add approvers" click_button "Add approval rule"
end end
it "with empty search, does not show public group" do it "with empty search, does not show public group" do
......
...@@ -83,7 +83,7 @@ describe 'Merge request > User sets approvers', :js do ...@@ -83,7 +83,7 @@ describe 'Merge request > User sets approvers', :js do
find('.select2-results .user-result', text: group.name).click find('.select2-results .user-result', text: group.name).click
close_approver_select close_approver_select
click_button 'Add' click_button 'Add'
click_button 'Update approvers' click_button 'Update approval rule'
click_on("Submit merge request") click_on("Submit merge request")
wait_for_all_requests wait_for_all_requests
...@@ -109,7 +109,7 @@ describe 'Merge request > User sets approvers', :js do ...@@ -109,7 +109,7 @@ describe 'Merge request > User sets approvers', :js do
expect(page).to have_css('.content-list li', count: 1) expect(page).to have_css('.content-list li', count: 1)
end end
click_button 'Update approvers' click_button 'Update approval rule'
click_on("Submit merge request") click_on("Submit merge request")
wait_for_all_requests wait_for_all_requests
click_on("View eligible approvers") if page.has_button?("View eligible approvers") click_on("View eligible approvers") if page.has_button?("View eligible approvers")
...@@ -150,7 +150,7 @@ describe 'Merge request > User sets approvers', :js do ...@@ -150,7 +150,7 @@ describe 'Merge request > User sets approvers', :js do
find('.select2-results .user-result', text: group.name).click find('.select2-results .user-result', text: group.name).click
close_approver_select close_approver_select
click_button 'Add' click_button 'Add'
click_button 'Update approvers' click_button 'Update approval rule'
click_on("Save changes") click_on("Save changes")
wait_for_all_requests wait_for_all_requests
...@@ -177,7 +177,7 @@ describe 'Merge request > User sets approvers', :js do ...@@ -177,7 +177,7 @@ describe 'Merge request > User sets approvers', :js do
expect(page).to have_css('.content-list li', count: 1) expect(page).to have_css('.content-list li', count: 1)
end end
click_button 'Update approvers' click_button 'Update approval rule'
click_on("Save changes") click_on("Save changes")
wait_for_all_requests wait_for_all_requests
...@@ -207,7 +207,7 @@ describe 'Merge request > User sets approvers', :js do ...@@ -207,7 +207,7 @@ describe 'Merge request > User sets approvers', :js do
fill_in 'No. approvals required', with: '3' fill_in 'No. approvals required', with: '3'
click_button 'Update approvers' click_button 'Update approval rule'
click_on('Save changes') click_on('Save changes')
wait_for_all_requests wait_for_all_requests
......
...@@ -40,7 +40,7 @@ describe 'Project settings > [EE] Merge Requests', :js do ...@@ -40,7 +40,7 @@ describe 'Project settings > [EE] Merge Requests', :js do
expect(find('.select2-results')).not_to have_content(user.name) expect(find('.select2-results')).not_to have_content(user.name)
close_approver_select close_approver_select
click_button 'Update approvers' click_button 'Update approval rule'
wait_for_requests wait_for_requests
expect_avatar(find('.js-members'), user) expect_avatar(find('.js-members'), user)
...@@ -60,7 +60,7 @@ describe 'Project settings > [EE] Merge Requests', :js do ...@@ -60,7 +60,7 @@ describe 'Project settings > [EE] Merge Requests', :js do
expect(find('.content-list')).to have_content(group.name) expect(find('.content-list')).to have_content(group.name)
click_button 'Update approvers' click_button 'Update approval rule'
wait_for_requests wait_for_requests
expect_avatar(find('.js-members'), group.users) expect_avatar(find('.js-members'), group.users)
...@@ -81,7 +81,7 @@ describe 'Project settings > [EE] Merge Requests', :js do ...@@ -81,7 +81,7 @@ describe 'Project settings > [EE] Merge Requests', :js do
open_modal open_modal
remove_approver(group.name) remove_approver(group.name)
click_button "Update approvers" click_button "Update approval rule"
wait_for_requests wait_for_requests
expect_avatar(find('.js-members'), [non_group_approver]) expect_avatar(find('.js-members'), [non_group_approver])
......
...@@ -135,7 +135,7 @@ describe('EE Approvals App', () => { ...@@ -135,7 +135,7 @@ describe('EE Approvals App', () => {
const button = findAddButton(); const button = findAddButton();
expect(button.exists()).toBe(true); expect(button.exists()).toBe(true);
expect(button.text()).toBe('Add approvers'); expect(button.text()).toBe('Add approval rule');
}); });
it('opens create modal when add button is clicked', () => { it('opens create modal when add button is clicked', () => {
......
...@@ -60,8 +60,8 @@ describe('Approvals ModalRuleCreate', () => { ...@@ -60,8 +60,8 @@ describe('Approvals ModalRuleCreate', () => {
expect(modal.props('modalModule')).toEqual(MODAL_MODULE); expect(modal.props('modalModule')).toEqual(MODAL_MODULE);
expect(modal.props('modalId')).toEqual(TEST_MODAL_ID); expect(modal.props('modalId')).toEqual(TEST_MODAL_ID);
expect(modal.attributes('title')).toEqual('Add approvers'); expect(modal.attributes('title')).toEqual('Add approval rule');
expect(modal.attributes('ok-title')).toEqual('Add approvers'); expect(modal.attributes('ok-title')).toEqual('Add approval rule');
}); });
it('renders form', () => { it('renders form', () => {
...@@ -99,8 +99,8 @@ describe('Approvals ModalRuleCreate', () => { ...@@ -99,8 +99,8 @@ describe('Approvals ModalRuleCreate', () => {
expect(modal.exists()).toBe(true); expect(modal.exists()).toBe(true);
expect(modal.attributes('title')).toEqual('Update approvers'); expect(modal.attributes('title')).toEqual('Update approval rule');
expect(modal.attributes('ok-title')).toEqual('Update approvers'); expect(modal.attributes('ok-title')).toEqual('Update approval rule');
}); });
it('renders form', () => { it('renders form', () => {
......
...@@ -866,6 +866,9 @@ msgstr "" ...@@ -866,6 +866,9 @@ msgstr ""
msgid "Add an issue" msgid "Add an issue"
msgstr "" msgstr ""
msgid "Add approval rule"
msgstr ""
msgid "Add approvers" msgid "Add approvers"
msgstr "" msgstr ""
...@@ -1650,7 +1653,7 @@ msgstr[1] "" ...@@ -1650,7 +1653,7 @@ msgstr[1] ""
msgid "ApprovalRule|All members with Developer role or higher and code owners (if any)" msgid "ApprovalRule|All members with Developer role or higher and code owners (if any)"
msgstr "" msgstr ""
msgid "ApprovalRule|Members" msgid "ApprovalRule|Approvers"
msgstr "" msgstr ""
msgid "ApprovalRule|Name" msgid "ApprovalRule|Name"
...@@ -16235,7 +16238,7 @@ msgstr "" ...@@ -16235,7 +16238,7 @@ msgstr ""
msgid "Update all" msgid "Update all"
msgstr "" msgstr ""
msgid "Update approvers" msgid "Update approval rule"
msgstr "" msgstr ""
msgid "Update failed" msgid "Update failed"
......
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