summaryrefslogtreecommitdiff
path: root/features/steps/admin
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2015-12-01 19:45:58 -0200
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2015-12-01 20:53:43 -0200
commit9ab7bdf7739935bf79c2e033212726a4be421a26 (patch)
tree968d6b8307ae59ca46e8865a49c52f4d08f02d04 /features/steps/admin
parent1ad8b73121c93570bde08ce6fa58b5e50f771603 (diff)
downloadgitlab-ce-9ab7bdf7739935bf79c2e033212726a4be421a26.tar.gz
Signed in admin should be able to add/remove himself to a group
Diffstat (limited to 'features/steps/admin')
-rw-r--r--features/steps/admin/groups.rb29
1 files changed, 29 insertions, 0 deletions
diff --git a/features/steps/admin/groups.rb b/features/steps/admin/groups.rb
index d27634858a2..43fd91d0d4c 100644
--- a/features/steps/admin/groups.rb
+++ b/features/steps/admin/groups.rb
@@ -1,5 +1,6 @@
class Spinach::Features::AdminGroups < Spinach::FeatureSteps
include SharedAuthentication
+ include SharedGroup
include SharedPaths
include SharedUser
include SharedActiveTab
@@ -88,6 +89,34 @@ class Spinach::Features::AdminGroups < Spinach::FeatureSteps
end
end
+ step 'I select current user as "Developer"' do
+ page.within ".users-group-form" do
+ select2(current_user.id, from: "#user_ids", multiple: true)
+ select "Developer", from: "access_level"
+ end
+
+ click_button "Add users to group"
+ end
+
+ step 'I should see current user as "Developer"' do
+ page.within '.content-list' do
+ expect(page).to have_content(current_user.name)
+ expect(page).to have_content('Developer')
+ end
+ end
+
+ step 'I click on the "Remove User From Group" button for current user' do
+ find(:css, 'li', text: current_user.name).find(:css, 'a.btn-remove').click
+ # poltergeist always confirms popups.
+ end
+
+ step 'I should not see current user as "Developer"' do
+ page.within '.content-list' do
+ expect(page).not_to have_content(current_user.name)
+ expect(page).not_to have_content('Developer')
+ end
+ end
+
protected
def current_group