summaryrefslogtreecommitdiff
path: root/features/steps/search.rb
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2015-04-30 08:40:21 -0700
committerStan Hu <stanhu@gmail.com>2015-04-30 08:54:08 -0700
commitd79348ab55c668883aa8d2a7fd5b59f28eb5118a (patch)
treef06a5c9b953d9650dd006d022af3d553ecb0e8cc /features/steps/search.rb
parent39a55bdf1a1613f362bcd7da444b291210454160 (diff)
downloadgitlab-ce-d79348ab55c668883aa8d2a7fd5b59f28eb5118a.tar.gz
Fix Error 500 when searching Wiki pages
Closes #1547
Diffstat (limited to 'features/steps/search.rb')
-rw-r--r--features/steps/search.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/features/steps/search.rb b/features/steps/search.rb
index 6f0e038c4d6..8197cd410aa 100644
--- a/features/steps/search.rb
+++ b/features/steps/search.rb
@@ -18,6 +18,11 @@ class Spinach::Features::Search < Spinach::FeatureSteps
click_button "Search"
end
+ step 'I search for "Wiki content"' do
+ fill_in "dashboard_search", with: "content"
+ click_button "Search"
+ end
+
step 'I click "Issues" link' do
within '.search-filter' do
click_link 'Issues'
@@ -36,6 +41,12 @@ class Spinach::Features::Search < Spinach::FeatureSteps
end
end
+ step 'I click "Wiki" link' do
+ within '.search-filter' do
+ click_link 'Wiki'
+ end
+ end
+
step 'I should see "Shop" project link' do
page.should have_link "Shop"
end
@@ -66,4 +77,13 @@ class Spinach::Features::Search < Spinach::FeatureSteps
step 'I should not see "Bar" link in the search results' do
find(:css, '.search-results').should_not have_link 'Bar'
end
+
+ step 'I should see "test_wiki" link in the search results' do
+ find(:css, '.search-results').should have_link 'test_wiki.md'
+ end
+
+ step 'project has Wiki content' do
+ @wiki = ::ProjectWiki.new(project, current_user)
+ @wiki.create_page("test_wiki", "Some Wiki content", :markdown, "first commit")
+ end
end