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