diff options
author | Mark Chao <mchao@gitlab.com> | 2018-07-11 17:36:08 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2018-07-11 17:36:08 +0300 |
commit | a63bce1a4b55bc6cbafb9dec12d33028521489e9 (patch) | |
tree | ee9466e6b06536a65d4e851f4096679c6f968d1e /spec/features/projects/members | |
parent | 1bf54e092783f7ad388225d32ab79ac1e845559c (diff) |
Resolve "Rename the `Master` role to `Maintainer`" Backend
Diffstat (limited to 'spec/features/projects/members')
8 files changed, 39 insertions, 39 deletions
diff --git a/spec/features/projects/members/anonymous_user_sees_members_spec.rb b/spec/features/projects/members/anonymous_user_sees_members_spec.rb index 19e52294a38..b3ed725f602 100644 --- a/spec/features/projects/members/anonymous_user_sees_members_spec.rb +++ b/spec/features/projects/members/anonymous_user_sees_members_spec.rb @@ -6,7 +6,7 @@ describe 'Projects > Members > Anonymous user sees members' do let(:project) { create(:project, :public) } before do - project.add_master(user) + project.add_maintainer(user) create(:project_group_link, project: project, group: group) end diff --git a/spec/features/projects/members/group_member_cannot_request_access_to_his_group_project_spec.rb b/spec/features/projects/members/group_member_cannot_request_access_to_his_group_project_spec.rb index 7bc53345ddf..bb475ea95e5 100644 --- a/spec/features/projects/members/group_member_cannot_request_access_to_his_group_project_spec.rb +++ b/spec/features/projects/members/group_member_cannot_request_access_to_his_group_project_spec.rb @@ -12,8 +12,8 @@ describe 'Projects > Members > Group member cannot request access to his group p expect(page).not_to have_content 'Request Access' end - it 'master does not see the request access button' do - group.add_master(user) + it 'maintainer does not see the request access button' do + group.add_maintainer(user) login_and_visit_project_page(user) expect(page).not_to have_content 'Request Access' diff --git a/spec/features/projects/members/groups_with_access_list_spec.rb b/spec/features/projects/members/groups_with_access_list_spec.rb index b65c46b345f..c0b5d943e96 100644 --- a/spec/features/projects/members/groups_with_access_list_spec.rb +++ b/spec/features/projects/members/groups_with_access_list_spec.rb @@ -6,7 +6,7 @@ describe 'Projects > Members > Groups with access list', :js do let(:project) { create(:project, :public) } before do - project.add_master(user) + project.add_maintainer(user) @group_link = create(:project_group_link, project: project, group: group) sign_in(user) diff --git a/spec/features/projects/members/master_adds_member_with_expiration_date_spec.rb b/spec/features/projects/members/master_adds_member_with_expiration_date_spec.rb index 90f09bf6264..26de6fb33fd 100644 --- a/spec/features/projects/members/master_adds_member_with_expiration_date_spec.rb +++ b/spec/features/projects/members/master_adds_member_with_expiration_date_spec.rb @@ -1,16 +1,16 @@ require 'spec_helper' -describe 'Projects > Members > Master adds member with expiration date', :js do +describe 'Projects > Members > Maintainer adds member with expiration date', :js do include Select2Helper include ActiveSupport::Testing::TimeHelpers - let(:master) { create(:user) } + let(:maintainer) { create(:user) } let(:project) { create(:project) } let!(:new_member) { create(:user) } before do - project.add_master(master) - sign_in(master) + project.add_maintainer(maintainer) + sign_in(maintainer) end it 'expiration date is displayed in the members list' do diff --git a/spec/features/projects/members/master_manages_access_requests_spec.rb b/spec/features/projects/members/master_manages_access_requests_spec.rb index 112b06c047d..adc8202cde7 100644 --- a/spec/features/projects/members/master_manages_access_requests_spec.rb +++ b/spec/features/projects/members/master_manages_access_requests_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' -describe 'Projects > Members > Master manages access requests' do - it_behaves_like 'Master manages access requests' do +describe 'Projects > Members > Maintainer manages access requests' do + it_behaves_like 'Maintainer manages access requests' do let(:entity) { create(:project, :public, :access_requestable) } let(:members_page_path) { project_project_members_path(entity) } end diff --git a/spec/features/projects/members/share_with_group_spec.rb b/spec/features/projects/members/share_with_group_spec.rb index b126f0c6cb1..c6d85e5d22f 100644 --- a/spec/features/projects/members/share_with_group_spec.rb +++ b/spec/features/projects/members/share_with_group_spec.rb @@ -4,7 +4,7 @@ describe 'Project > Members > Share with Group', :js do include Select2Helper include ActionView::Helpers::DateHelper - let(:master) { create(:user) } + let(:maintainer) { create(:user) } describe 'Share with group lock' do shared_examples 'the project can be shared with groups' do @@ -27,8 +27,8 @@ describe 'Project > Members > Share with Group', :js do let(:project) { create(:project, namespace: create(:group)) } before do - project.add_master(master) - sign_in(master) + project.add_maintainer(maintainer) + sign_in(maintainer) end context 'when the group has "Share with group lock" disabled' do @@ -65,8 +65,8 @@ describe 'Project > Members > Share with Group', :js do let(:project) { create(:project, namespace: subgroup) } before do - project.add_master(master) - sign_in(master) + project.add_maintainer(maintainer) + sign_in(maintainer) end context 'when the root_group has "Share with group lock" disabled' do @@ -112,8 +112,8 @@ describe 'Project > Members > Share with Group', :js do end before do - project.add_master(master) - sign_in(master) + project.add_maintainer(maintainer) + sign_in(maintainer) visit project_settings_members_path(project) @@ -142,11 +142,11 @@ describe 'Project > Members > Share with Group', :js do let(:project) { create(:project) } before do - project.add_master(master) - sign_in(master) + project.add_maintainer(maintainer) + sign_in(maintainer) - create(:group).add_owner(master) - create(:group).add_owner(master) + create(:group).add_owner(maintainer) + create(:group).add_owner(maintainer) visit project_settings_members_path(project) @@ -174,10 +174,10 @@ describe 'Project > Members > Share with Group', :js do let!(:project) { create(:project, namespace: nested_group) } before do - project.add_master(master) - sign_in(master) - group.add_master(master) - group_to_share_with.add_master(master) + project.add_maintainer(maintainer) + sign_in(maintainer) + group.add_maintainer(maintainer) + group_to_share_with.add_maintainer(maintainer) end it 'the groups dropdown does not show ancestors', :nested_groups do diff --git a/spec/features/projects/members/sorting_spec.rb b/spec/features/projects/members/sorting_spec.rb index 1e1071348c3..220775b514d 100644 --- a/spec/features/projects/members/sorting_spec.rb +++ b/spec/features/projects/members/sorting_spec.rb @@ -1,20 +1,20 @@ require 'spec_helper' describe 'Projects > Members > Sorting' do - let(:master) { create(:user, name: 'John Doe') } + let(:maintainer) { create(:user, name: 'John Doe') } let(:developer) { create(:user, name: 'Mary Jane', last_sign_in_at: 5.days.ago) } - let(:project) { create(:project, namespace: master.namespace, creator: master) } + let(:project) { create(:project, namespace: maintainer.namespace, creator: maintainer) } before do create(:project_member, :developer, user: developer, project: project, created_at: 3.days.ago) - sign_in(master) + sign_in(maintainer) end it 'sorts alphabetically by default' do visit_members_list(sort: nil) - expect(first_member).to include(master.name) + expect(first_member).to include(maintainer.name) expect(second_member).to include(developer.name) expect(page).to have_css('.member-sort-dropdown .dropdown-toggle-text', text: 'Name, ascending') end @@ -23,14 +23,14 @@ describe 'Projects > Members > Sorting' do visit_members_list(sort: :access_level_asc) expect(first_member).to include(developer.name) - expect(second_member).to include(master.name) + expect(second_member).to include(maintainer.name) expect(page).to have_css('.member-sort-dropdown .dropdown-toggle-text', text: 'Access level, ascending') end it 'sorts by access level descending' do visit_members_list(sort: :access_level_desc) - expect(first_member).to include(master.name) + expect(first_member).to include(maintainer.name) expect(second_member).to include(developer.name) expect(page).to have_css('.member-sort-dropdown .dropdown-toggle-text', text: 'Access level, descending') end @@ -38,7 +38,7 @@ describe 'Projects > Members > Sorting' do it 'sorts by last joined' do visit_members_list(sort: :last_joined) - expect(first_member).to include(master.name) + expect(first_member).to include(maintainer.name) expect(second_member).to include(developer.name) expect(page).to have_css('.member-sort-dropdown .dropdown-toggle-text', text: 'Last joined') end @@ -47,14 +47,14 @@ describe 'Projects > Members > Sorting' do visit_members_list(sort: :oldest_joined) expect(first_member).to include(developer.name) - expect(second_member).to include(master.name) + expect(second_member).to include(maintainer.name) expect(page).to have_css('.member-sort-dropdown .dropdown-toggle-text', text: 'Oldest joined') end it 'sorts by name ascending' do visit_members_list(sort: :name_asc) - expect(first_member).to include(master.name) + expect(first_member).to include(maintainer.name) expect(second_member).to include(developer.name) expect(page).to have_css('.member-sort-dropdown .dropdown-toggle-text', text: 'Name, ascending') end @@ -63,14 +63,14 @@ describe 'Projects > Members > Sorting' do visit_members_list(sort: :name_desc) expect(first_member).to include(developer.name) - expect(second_member).to include(master.name) + expect(second_member).to include(maintainer.name) expect(page).to have_css('.member-sort-dropdown .dropdown-toggle-text', text: 'Name, descending') end it 'sorts by recent sign in', :clean_gitlab_redis_shared_state do visit_members_list(sort: :recent_sign_in) - expect(first_member).to include(master.name) + expect(first_member).to include(maintainer.name) expect(second_member).to include(developer.name) expect(page).to have_css('.member-sort-dropdown .dropdown-toggle-text', text: 'Recent sign in') end @@ -79,7 +79,7 @@ describe 'Projects > Members > Sorting' do visit_members_list(sort: :oldest_sign_in) expect(first_member).to include(developer.name) - expect(second_member).to include(master.name) + expect(second_member).to include(maintainer.name) expect(page).to have_css('.member-sort-dropdown .dropdown-toggle-text', text: 'Oldest sign in') end diff --git a/spec/features/projects/members/user_requests_access_spec.rb b/spec/features/projects/members/user_requests_access_spec.rb index 5599cc9bf1b..50ba67f0ffc 100644 --- a/spec/features/projects/members/user_requests_access_spec.rb +++ b/spec/features/projects/members/user_requests_access_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' describe 'Projects > Members > User requests access', :js do let(:user) { create(:user) } let(:project) { create(:project, :public, :access_requestable, :repository) } - let(:master) { project.owner } + let(:maintainer) { project.owner } before do sign_in(user) @@ -20,7 +20,7 @@ describe 'Projects > Members > User requests access', :js do it 'user can request access to a project' do perform_enqueued_jobs { click_link 'Request Access' } - expect(ActionMailer::Base.deliveries.last.to).to eq [master.notification_email] + expect(ActionMailer::Base.deliveries.last.to).to eq [maintainer.notification_email] expect(ActionMailer::Base.deliveries.last.subject).to eq "Request to join the #{project.full_name} project" expect(project.requesters.exists?(user_id: user)).to be_truthy |