diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-11-13 08:58:20 +0100 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-11-13 09:42:49 +0100 |
commit | a591b1c3aca8587f4f3764fa01cd19f3372bb23f (patch) | |
tree | 112c412ee5fc69448cefc4cca9875cac121c5a6e /spec/features | |
parent | 65faebb95556809c5858347f1c24422505056827 (diff) | |
download | gitlab-ce-a591b1c3aca8587f4f3764fa01cd19f3372bb23f.tar.gz |
Don't perform a JS request when deleting a membership.bvl-refresh-member-listing-on-removal
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/groups/members/manage_members.rb | 6 | ||||
-rw-r--r-- | spec/features/projects/members/list_spec.rb | 16 |
2 files changed, 21 insertions, 1 deletions
diff --git a/spec/features/groups/members/manage_members.rb b/spec/features/groups/members/manage_members.rb index 9039b283393..da1e17225db 100644 --- a/spec/features/groups/members/manage_members.rb +++ b/spec/features/groups/members/manage_members.rb @@ -44,7 +44,11 @@ feature 'Groups > Members > Manage members' do visit group_group_members_path(group) - find(:css, '.project-members-page li', text: user2.name).find(:css, 'a.btn-remove').click + accept_confirm do + find(:css, '.project-members-page li', text: user2.name).find(:css, 'a.btn-remove').click + end + + wait_for_requests expect(page).not_to have_content(user2.name) expect(group.users).not_to include(user2) diff --git a/spec/features/projects/members/list_spec.rb b/spec/features/projects/members/list_spec.rb index 237c059e595..65b11a1d9e7 100644 --- a/spec/features/projects/members/list_spec.rb +++ b/spec/features/projects/members/list_spec.rb @@ -55,6 +55,22 @@ feature 'Project members list' do end end + scenario 'remove user from project', :js do + other_user = create(:user) + project.add_developer(other_user) + + visit_members_page + + accept_confirm do + find(:css, 'li.project_member', text: other_user.name).find(:css, 'a.btn-remove').click + end + + wait_for_requests + + expect(page).not_to have_content(other_user.name) + expect(project.users).not_to include(other_user) + end + scenario 'invite user to project', :js do visit_members_page |