Add tests for starred projects page

This commit is contained in:
Dmitriy Zaporozhets
2015-03-09 14:25:14 -07:00
parent d36ee3190a
commit b8d73315f5
3 changed files with 31 additions and 0 deletions
@@ -0,0 +1,12 @@
@dashboard
Feature: Dashboard Starred Projects
Background:
Given I sign in as a user
And public project "Community"
And I starred project "Community"
And I own project "Shop"
And I visit dashboard starred projects page
Scenario: I should see projects list
Then I should see project "Community"
And I should not see project "Shop"
@@ -0,0 +1,15 @@
class Spinach::Features::DashboardStarredProjects < Spinach::FeatureSteps
include SharedAuthentication
include SharedPaths
include SharedProject
step 'I starred project "Community"' do
current_user.toggle_star(Project.find_by(name: 'Community'))
end
step 'I should not see project "Shop"' do
within 'aside' do
page.should_not have_content('Shop')
end
end
end
+4
View File
@@ -95,6 +95,10 @@ module SharedPaths
current_path.should == dashboard_groups_path
end
step 'I visit dashboard starred projects page' do
visit starred_dashboard_projects_path
end
# ----------------------------------------
# Profile
# ----------------------------------------