summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
Diffstat (limited to 'features')
-rw-r--r--features/dashboard/search.feature5
-rw-r--r--features/steps/dashboard/dashboard_search.rb17
2 files changed, 22 insertions, 0 deletions
diff --git a/features/dashboard/search.feature b/features/dashboard/search.feature
index 91d870f46f3..9813d9d1e7c 100644
--- a/features/dashboard/search.feature
+++ b/features/dashboard/search.feature
@@ -2,8 +2,13 @@ Feature: Dashboard Search
Background:
Given I sign in as a user
And I own project "Shop"
+ And Project "Shop" has wiki page "Contibuting guide"
And I visit dashboard search page
Scenario: I should see project I am looking for
Given I search for "Sho"
Then I should see "Shop" project link
+
+ Scenario: I should see wiki page I am looking for
+ Given I search for "Contibuting"
+ Then I should see "Contibuting guide" wiki link \ No newline at end of file
diff --git a/features/steps/dashboard/dashboard_search.rb b/features/steps/dashboard/dashboard_search.rb
index e35858985d6..e902e40456f 100644
--- a/features/steps/dashboard/dashboard_search.rb
+++ b/features/steps/dashboard/dashboard_search.rb
@@ -15,4 +15,21 @@ class DashboardSearch < Spinach::FeatureSteps
@project = Factory :project, :name => "Shop"
@project.add_access(@user, :admin)
end
+
+ Given 'I search for "Contibuting"' do
+ fill_in "dashboard_search", :with => "Contibuting"
+ click_button "Search"
+ end
+
+ And 'Project "Shop" has wiki page "Contibuting guide"' do
+ @wiki_page = Factory :wiki, :project => @project,
+ :title => "Contibuting guide",
+ :slug => "contributing"
+ end
+
+ Then 'I should see "Contibuting guide" wiki link' do
+ page.should have_link "Contibuting guide"
+ end
+
+
end