diff options
author | Jason Hollingsworth <jhworth.developer@gmail.com> | 2013-11-06 09:13:21 -0600 |
---|---|---|
committer | Jason Hollingsworth <jhworth.developer@gmail.com> | 2013-11-26 22:22:07 -0600 |
commit | d9bb4230cc3aa161876df821c34d8e9c53d2e7a6 (patch) | |
tree | d9923bbf4ebe3f6cf96f71cdcfe4c07cc94b6752 /features/steps/public | |
parent | 51b5509bacdfba1d3ca84a4b56c6bd21942f1d2e (diff) | |
download | gitlab-ce-d9bb4230cc3aa161876df821c34d8e9c53d2e7a6.tar.gz |
Adding authenticated public mode (internal).
Added visibility_level icons to project view (rather than just text).
Added public projects to search results.
Added ability to restrict visibility levels standard users can set.
Diffstat (limited to 'features/steps/public')
-rw-r--r-- | features/steps/public/projects_feature.rb | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/features/steps/public/projects_feature.rb b/features/steps/public/projects_feature.rb index e5292380c55..8b61eba3ffb 100644 --- a/features/steps/public/projects_feature.rb +++ b/features/steps/public/projects_feature.rb @@ -1,5 +1,7 @@ class Spinach::Features::PublicProjectsFeature < Spinach::FeatureSteps + include SharedAuthentication include SharedPaths + include SharedProject step 'I should see project "Community"' do page.should have_content "Community" @@ -23,11 +25,11 @@ class Spinach::Features::PublicProjectsFeature < Spinach::FeatureSteps end step 'public project "Community"' do - create :project_with_code, name: 'Community', public: true + create :project_with_code, name: 'Community', visibility_level: Gitlab::VisibilityLevel::PUBLIC end step 'public empty project "Empty Public Project"' do - create :project, name: 'Empty Public Project', public: true + create :project, name: 'Empty Public Project', visibility_level: Gitlab::VisibilityLevel::PUBLIC end step 'I visit empty project page' do @@ -48,16 +50,38 @@ class Spinach::Features::PublicProjectsFeature < Spinach::FeatureSteps create :project, name: 'Enterprise' end + step 'I visit project "Enterprise" page' do + project = Project.find_by_name('Enterprise') + visit project_path(project) + end + step 'I should see project "Community" home page' do within '.project-home-title' do page.should have_content 'Community' end end - private + step 'internal project "Internal"' do + create :project_with_code, name: 'Internal', visibility_level: Gitlab::VisibilityLevel::INTERNAL + end - def project - @project ||= Project.find_by_name("Community") + step 'I should see project "Internal"' do + page.should have_content "Internal" + end + + step 'I should not see project "Internal"' do + page.should_not have_content "Internal" + end + + step 'I visit project "Internal" page' do + project = Project.find_by_name('Internal') + visit project_path(project) + end + + step 'I should see project "Internal" home page' do + within '.project-home-title' do + page.should have_content 'Internal' + end end end |