2013-07-29 10:07:03 -04:00
|
|
|
class Spinach::Features::PublicProjectsFeature < Spinach::FeatureSteps
|
|
|
|
include SharedPaths
|
|
|
|
|
|
|
|
step 'I should see project "Community"' do
|
|
|
|
page.should have_content "Community"
|
|
|
|
end
|
|
|
|
|
|
|
|
step 'I should not see project "Enterprise"' do
|
|
|
|
page.should_not have_content "Enterprise"
|
|
|
|
end
|
|
|
|
|
2013-09-20 11:39:12 -04:00
|
|
|
step 'I should see project "Empty Public Project"' do
|
|
|
|
page.should have_content "Empty Public Project"
|
|
|
|
puts page.save_page('foo.html')
|
|
|
|
end
|
|
|
|
|
2013-07-29 10:07:03 -04:00
|
|
|
step 'I should see public project details' do
|
|
|
|
page.should have_content '32 branches'
|
|
|
|
page.should have_content '16 tags'
|
|
|
|
end
|
|
|
|
|
|
|
|
step 'I should see project readme' do
|
|
|
|
page.should have_content 'README.md'
|
|
|
|
end
|
|
|
|
|
|
|
|
step 'public project "Community"' do
|
|
|
|
create :project_with_code, name: 'Community', public: true
|
|
|
|
end
|
|
|
|
|
2013-09-20 11:39:12 -04:00
|
|
|
step 'public empty project "Empty Public Project"' do
|
|
|
|
create :project, name: 'Empty Public Project', public: true
|
|
|
|
end
|
|
|
|
|
2013-09-24 15:14:28 -04:00
|
|
|
step 'I visit empty project page' do
|
2013-09-20 11:39:12 -04:00
|
|
|
project = Project.find_by_name('Empty Public Project')
|
2013-09-24 15:14:28 -04:00
|
|
|
visit project_path(project)
|
|
|
|
end
|
|
|
|
|
|
|
|
step 'I visit project "Community" page' do
|
|
|
|
project = Project.find_by_name('Community')
|
|
|
|
visit project_path(project)
|
2013-09-20 11:39:12 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
step 'I should see empty public project details' do
|
2013-09-24 15:14:28 -04:00
|
|
|
page.should have_content 'Git global setup'
|
2013-09-20 11:39:12 -04:00
|
|
|
end
|
|
|
|
|
2013-07-29 10:07:03 -04:00
|
|
|
step 'private project "Enterprise"' do
|
|
|
|
create :project, name: 'Enterprise'
|
|
|
|
end
|
|
|
|
|
2013-09-24 15:14:28 -04:00
|
|
|
step 'I should see project "Community" home page' do
|
|
|
|
page.should have_content 'Repo size is'
|
|
|
|
end
|
|
|
|
|
2013-07-29 10:07:03 -04:00
|
|
|
private
|
|
|
|
|
|
|
|
def project
|
|
|
|
@project ||= Project.find_by_name("Community")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|