Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-03-10 00:25:14 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-03-10 00:25:14 +0300
commitb8d73315f5e094906111ab16607b5fa2685d2ea8 (patch)
tree59accab7de0cd0cf97e1ac0f25f1eb5cc0eb5009 /features
parentd36ee3190aa1fb8c1238967a3049d5b8271c9030 (diff)
Add tests for starred projects page
Diffstat (limited to 'features')
-rw-r--r--features/dashboard/starred_projects.feature12
-rw-r--r--features/steps/dashboard/starred_projects.rb15
-rw-r--r--features/steps/shared/paths.rb4
3 files changed, 31 insertions, 0 deletions
diff --git a/features/dashboard/starred_projects.feature b/features/dashboard/starred_projects.feature
new file mode 100644
index 00000000000..9dfd2fbab9c
--- /dev/null
+++ b/features/dashboard/starred_projects.feature
@@ -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"
diff --git a/features/steps/dashboard/starred_projects.rb b/features/steps/dashboard/starred_projects.rb
new file mode 100644
index 00000000000..b9ad2f13e29
--- /dev/null
+++ b/features/steps/dashboard/starred_projects.rb
@@ -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
diff --git a/features/steps/shared/paths.rb b/features/steps/shared/paths.rb
index db6417bf951..bb6c336d7cd 100644
--- a/features/steps/shared/paths.rb
+++ b/features/steps/shared/paths.rb
@@ -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
# ----------------------------------------