summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorJames Lopez <james.lopez@vodafone.com>2015-10-29 16:10:27 +0000
committerJames Lopez <james.lopez@vodafone.com>2015-10-29 16:10:27 +0000
commitde990aa15829d0ab182ad5a55b4c527846c0d39c (patch)
tree8a4feb62b5f4b6f03d5fe03a0ff3ee9e99815f17 /features
parent0ea38dc519b86d2bd2e14f1df1baf0fffc043af6 (diff)
downloadgitlab-ce-de990aa15829d0ab182ad5a55b4c527846c0d39c.tar.gz
fixed last group owner issue and added test
Diffstat (limited to 'features')
-rw-r--r--features/groups.feature8
-rw-r--r--features/steps/groups.rb18
2 files changed, 26 insertions, 0 deletions
diff --git a/features/groups.feature b/features/groups.feature
index db37fa3b375..7777c0298a4 100644
--- a/features/groups.feature
+++ b/features/groups.feature
@@ -60,6 +60,14 @@ Feature: Groups
Then I should see "Mike" in team list as "Reporter"
@javascript
+ Scenario: Ignore add user to group when is already Owner
+ Given gitlab user "Mike"
+ When I visit group "Owned" members page
+ And I click link "Add members"
+ When I select "Mike" as "Reporter"
+ Then I should see "Mike" in team list as "Owner"
+
+ @javascript
Scenario: Invite user to group
When I visit group "Owned" members page
And I click link "Add members"
diff --git a/features/steps/groups.rb b/features/steps/groups.rb
index 69ddfa42c06..5fd4dea5cd6 100644
--- a/features/steps/groups.rb
+++ b/features/steps/groups.rb
@@ -48,6 +48,17 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
click_button "Add users to group"
end
+ step 'I select "Mike" as "Master"' do
+ user = User.find_by(name: "Mike")
+
+ page.within ".users-group-form" do
+ select2(user.id, from: "#user_ids", multiple: true)
+ select "Master", from: "access_level"
+ end
+
+ click_button "Add users to group"
+ end
+
step 'I should see "Mike" in team list as "Reporter"' do
page.within '.well-list' do
expect(page).to have_content('Mike')
@@ -55,6 +66,13 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
end
end
+ step 'I should see "Mike" in team list as "Owner"' do
+ page.within '.well-list' do
+ expect(page).to have_content('Mike')
+ expect(page).to have_content('Owner')
+ end
+ end
+
step 'I select "sjobs@apple.com" as "Reporter"' do
page.within ".users-group-form" do
select2("sjobs@apple.com", from: "#user_ids", multiple: true)