diff options
Diffstat (limited to 'spec/features/projects/members')
-rw-r--r-- | spec/features/projects/members/manage_members_spec.rb | 22 | ||||
-rw-r--r-- | spec/features/projects/members/sorting_spec.rb | 4 |
2 files changed, 9 insertions, 17 deletions
diff --git a/spec/features/projects/members/manage_members_spec.rb b/spec/features/projects/members/manage_members_spec.rb index 3ffa402dc2c..615ef1b03dd 100644 --- a/spec/features/projects/members/manage_members_spec.rb +++ b/spec/features/projects/members/manage_members_spec.rb @@ -139,17 +139,15 @@ RSpec.describe 'Projects > Members > Manage members', :js, feature_category: :on it 'can only remove non-Owner members' do page.within find_member_row(project_owner) do - expect(page).not_to have_button('Remove member') + expect(page).not_to have_selector user_action_dropdown end - # Open modal - page.within find_member_row(project_developer) do - click_button 'Remove member' - end + show_actions_for_username(project_developer) + click_button _('Remove member') within_modal do expect(page).to have_unchecked_field 'Also unassign this user from related issues and merge requests' - click_button('Remove member') + click_button _('Remove member') end wait_for_requests @@ -163,18 +161,12 @@ RSpec.describe 'Projects > Members > Manage members', :js, feature_category: :on let(:current_user) { group_owner } it 'can remove any direct member' do - page.within find_member_row(project_owner) do - expect(page).to have_button('Remove member') - end - - # Open modal - page.within find_member_row(project_owner) do - click_button 'Remove member' - end + show_actions_for_username(project_owner) + click_button _('Remove member') within_modal do expect(page).to have_unchecked_field 'Also unassign this user from related issues and merge requests' - click_button('Remove member') + click_button _('Remove member') end wait_for_requests diff --git a/spec/features/projects/members/sorting_spec.rb b/spec/features/projects/members/sorting_spec.rb index 5c72d9efeb3..6df1e974f42 100644 --- a/spec/features/projects/members/sorting_spec.rb +++ b/spec/features/projects/members/sorting_spec.rb @@ -48,7 +48,7 @@ RSpec.describe 'Projects > Members > Sorting', :js, feature_category: :subgroups expect(first_row.text).to have_content(maintainer.name) expect(second_row.text).to have_content(developer.name) - expect_sort_by('Created on', :asc) + expect_sort_by('User created', :asc) end it 'sorts by user created on descending' do @@ -57,7 +57,7 @@ RSpec.describe 'Projects > Members > Sorting', :js, feature_category: :subgroups expect(first_row.text).to have_content(developer.name) expect(second_row.text).to have_content(maintainer.name) - expect_sort_by('Created on', :desc) + expect_sort_by('User created', :desc) end it 'sorts by last activity ascending' do |