From d24fd32aa5090e1f26f028921048e15f09f82323 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Sun, 27 Jan 2013 15:41:35 +0200 Subject: [PATCH] feature tests --- features/dashboard/projects.feature | 8 ++++++++ features/steps/dashboard/dashboard.rb | 6 ++++++ features/steps/shared/paths.rb | 4 ++++ 3 files changed, 18 insertions(+) create mode 100644 features/dashboard/projects.feature diff --git a/features/dashboard/projects.feature b/features/dashboard/projects.feature new file mode 100644 index 00000000..17022dab --- /dev/null +++ b/features/dashboard/projects.feature @@ -0,0 +1,8 @@ +Feature: Dashboard + Background: + Given I sign in as a user + And I own project "Shop" + And I visit dashboard projects page + + Scenario: I should see issues list + Then I should see projects list diff --git a/features/steps/dashboard/dashboard.rb b/features/steps/dashboard/dashboard.rb index 4bcefba7..8c13ad0e 100644 --- a/features/steps/dashboard/dashboard.rb +++ b/features/steps/dashboard/dashboard.rb @@ -63,6 +63,12 @@ class Dashboard < Spinach::FeatureSteps @project.team << [current_user, :master] end + Then 'I should see projects list' do + @user.authorized_projects.all.each do |project| + page.should have_link project.name_with_namespace + end + end + Then 'I should see groups list' do Group.all.each do |group| page.should have_link group.name diff --git a/features/steps/shared/paths.rb b/features/steps/shared/paths.rb index 0cfadfdf..42ef40d6 100644 --- a/features/steps/shared/paths.rb +++ b/features/steps/shared/paths.rb @@ -33,6 +33,10 @@ module SharedPaths visit dashboard_path end + Given 'I visit dashboard projects page' do + visit projects_dashboard_path + end + Given 'I visit dashboard issues page' do visit issues_dashboard_path end