summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-07-22 13:19:45 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-07-22 13:19:45 +0300
commit6b4d5d21be69705f22cb2e848fdba9f182ef2bc5 (patch)
tree4d6d4e6f390dbc3b4fabfc1c108b997053f57a4c /features
parent68a9203bcef1e44bdf72acf4cc8d4977eec79b7a (diff)
parent1da2262efd272a4cf086f1cf1a033699a43df857 (diff)
downloadgitlab-ce-6b4d5d21be69705f22cb2e848fdba9f182ef2bc5.tar.gz
Merge branch 'public-groups' of https://github.com/innogames/gitlabhq into 7-2-dev
Diffstat (limited to 'features')
-rw-r--r--features/public/public_groups.feature32
-rw-r--r--features/steps/shared/group.rb8
-rw-r--r--features/steps/shared/paths.rb8
3 files changed, 48 insertions, 0 deletions
diff --git a/features/public/public_groups.feature b/features/public/public_groups.feature
index 8bbda8cb6d4..ff3e1e3e955 100644
--- a/features/public/public_groups.feature
+++ b/features/public/public_groups.feature
@@ -117,3 +117,35 @@ Feature: Public Projects Feature
And I visit group "TestGroup" members page
Then I should see group member "John Doe"
And I should not see member roles
+
+ Scenario: I should see group with public project in public groups area
+ Given group "TestGroup" has public project "Community"
+ When I visit the public groups area
+ Then I should see group "TestGroup"
+
+ Scenario: I should not see group with internal project in public groups area
+ Given group "TestGroup" has internal project "Internal"
+ When I visit the public groups area
+ Then I should not see group "TestGroup"
+
+ Scenario: I should not see group with private project in public groups area
+ When I visit the public groups area
+ Then I should not see group "TestGroup"
+
+ Scenario: I should see group with public project in public groups area as user
+ Given group "TestGroup" has public project "Community"
+ When I sign in as a user
+ And I visit the public groups area
+ Then I should see group "TestGroup"
+
+ Scenario: I should see group with internal project in public groups area as user
+ Given group "TestGroup" has internal project "Internal"
+ When I sign in as a user
+ And I visit the public groups area
+ Then I should see group "TestGroup"
+
+ Scenario: I should not see group with private project in public groups area as user
+ When I sign in as a user
+ And I visit the public groups area
+ Then I should not see group "TestGroup"
+
diff --git a/features/steps/shared/group.rb b/features/steps/shared/group.rb
index 6b4c47312a7..1b225dd61a6 100644
--- a/features/steps/shared/group.rb
+++ b/features/steps/shared/group.rb
@@ -21,6 +21,14 @@ module SharedGroup
is_member_of("Mary Jane", "Guest", Gitlab::Access::GUEST)
end
+ step 'I should see group "TestGroup"' do
+ page.should have_content "TestGroup"
+ end
+
+ step 'I should not see group "TestGroup"' do
+ page.should_not have_content "TestGroup"
+ end
+
protected
def is_member_of(username, groupname, role)
diff --git a/features/steps/shared/paths.rb b/features/steps/shared/paths.rb
index 2090b642059..d92c70c952e 100644
--- a/features/steps/shared/paths.rb
+++ b/features/steps/shared/paths.rb
@@ -332,6 +332,14 @@ module SharedPaths
end
# ----------------------------------------
+ # Public Groups
+ # ----------------------------------------
+
+ step 'I visit the public groups area' do
+ visit public_groups_path
+ end
+
+ # ----------------------------------------
# Snippets
# ----------------------------------------