summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2015-08-20 21:33:00 -0700
committerStan Hu <stanhu@gmail.com>2015-08-21 13:47:56 -0700
commit3715a0f29b6758b3075abb6f28ee24c4eb8ed427 (patch)
tree96675d33d770fd308c535a11bde4dad40cefadb0 /features
parent55fc58bda4a5592f2f8deaecec9526fbe4eecd6f (diff)
downloadgitlab-ce-3715a0f29b6758b3075abb6f28ee24c4eb8ed427.tar.gz
Fix bug preventing invite by e-mail
This was broken in 70f5291808 as a result of introducing the ability to filter by current user. Closes #2320
Diffstat (limited to 'features')
-rw-r--r--features/admin/groups.feature6
-rw-r--r--features/steps/admin/groups.rb15
2 files changed, 21 insertions, 0 deletions
diff --git a/features/admin/groups.feature b/features/admin/groups.feature
index aa365a6ea1a..973918086a3 100644
--- a/features/admin/groups.feature
+++ b/features/admin/groups.feature
@@ -27,3 +27,9 @@ Feature: Admin Groups
When I visit admin group page
And I remove user "John Doe" from group
Then I should not see "John Doe" in team list
+
+ @javascript
+ Scenario: Invite user to a group by e-mail
+ When I visit admin group page
+ When I select user "johndoe@gitlab.com" from user list as "Reporter"
+ Then I should see "johndoe@gitlab.com" in team list in every project as "Reporter"
diff --git a/features/steps/admin/groups.rb b/features/steps/admin/groups.rb
index 83a3f48abe3..d27634858a2 100644
--- a/features/steps/admin/groups.rb
+++ b/features/steps/admin/groups.rb
@@ -44,6 +44,14 @@ class Spinach::Features::AdminGroups < Spinach::FeatureSteps
click_button "Add users to group"
end
+ When 'I select user "johndoe@gitlab.com" from user list as "Reporter"' do
+ select2('johndoe@gitlab.com', from: "#user_ids", multiple: true)
+ page.within "#new_project_member" do
+ select "Reporter", from: "access_level"
+ end
+ click_button "Add users to group"
+ end
+
step 'I should see "John Doe" in team list in every project as "Reporter"' do
page.within ".group-users-list" do
expect(page).to have_content "John Doe"
@@ -51,6 +59,13 @@ class Spinach::Features::AdminGroups < Spinach::FeatureSteps
end
end
+ step 'I should see "johndoe@gitlab.com" in team list in every project as "Reporter"' do
+ page.within ".group-users-list" do
+ expect(page).to have_content "johndoe@gitlab.com (invited)"
+ expect(page).to have_content "Reporter"
+ end
+ end
+
step 'I should be all groups' do
Group.all.each do |group|
expect(page).to have_content group.name