Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kazuhiko Shiozaki
gitlab-ce
Commits
d79348ab
Commit
d79348ab
authored
Apr 30, 2015
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Error 500 when searching Wiki pages
Closes #1547
parent
39a55bdf
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
0 deletions
+34
-0
CHANGELOG
CHANGELOG
+1
-0
app/helpers/wiki_helper.rb
app/helpers/wiki_helper.rb
+2
-0
features/search.feature
features/search.feature
+6
-0
features/steps/project/wiki.rb
features/steps/project/wiki.rb
+5
-0
features/steps/search.rb
features/steps/search.rb
+20
-0
No files found.
CHANGELOG
View file @
d79348ab
Please view this file on the master branch, on stable branches it's out of date.
Please view this file on the master branch, on stable branches it's out of date.
v 7.11.0 (unreleased)
v 7.11.0 (unreleased)
- Fix Error 500 when searching Wiki pages (Stan Hu)
- Get Gitorious importer to work again.
- Get Gitorious importer to work again.
- Fix clone URL field and X11 Primary selection (Dmitry Medvinsky)
- Fix clone URL field and X11 Primary selection (Dmitry Medvinsky)
- Ignore invalid lines in .gitmodules
- Ignore invalid lines in .gitmodules
...
...
app/helpers/wiki_helper.rb
View file @
d79348ab
...
@@ -6,6 +6,8 @@ module WikiHelper
...
@@ -6,6 +6,8 @@ module WikiHelper
case
wiki_page
case
wiki_page
when
Symbol
when
Symbol
wiki_page
wiki_page
when
String
wiki_page
else
else
wiki_page
.
slug
wiki_page
.
slug
end
end
...
...
features/search.feature
View file @
d79348ab
...
@@ -44,3 +44,9 @@ Feature: Search
...
@@ -44,3 +44,9 @@ Feature: Search
Then
I should see
"Foo"
link in the search results
Then
I should see
"Foo"
link in the search results
And
I should not see
"Bar"
link in the search results
And
I should not see
"Bar"
link in the search results
Scenario
:
I
should see Wiki blobs
And
project has Wiki content
When
I click project
"Shop"
link
And
I search for
"Wiki content"
And
I click
"Wiki"
link
Then
I should see
"test_wiki"
link in the search results
features/steps/project/wiki.rb
View file @
d79348ab
...
@@ -159,6 +159,11 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps
...
@@ -159,6 +159,11 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps
page
.
should
have_content
(
'History for'
)
page
.
should
have_content
(
'History for'
)
end
end
step
'I search for Wiki content'
do
fill_in
"Search in this project"
,
with:
"wiki_content"
click_button
"Search"
end
def
wiki
def
wiki
@project_wiki
=
ProjectWiki
.
new
(
project
,
current_user
)
@project_wiki
=
ProjectWiki
.
new
(
project
,
current_user
)
end
end
...
...
features/steps/search.rb
View file @
d79348ab
...
@@ -18,6 +18,11 @@ class Spinach::Features::Search < Spinach::FeatureSteps
...
@@ -18,6 +18,11 @@ class Spinach::Features::Search < Spinach::FeatureSteps
click_button
"Search"
click_button
"Search"
end
end
step
'I search for "Wiki content"'
do
fill_in
"dashboard_search"
,
with:
"content"
click_button
"Search"
end
step
'I click "Issues" link'
do
step
'I click "Issues" link'
do
within
'.search-filter'
do
within
'.search-filter'
do
click_link
'Issues'
click_link
'Issues'
...
@@ -36,6 +41,12 @@ class Spinach::Features::Search < Spinach::FeatureSteps
...
@@ -36,6 +41,12 @@ class Spinach::Features::Search < Spinach::FeatureSteps
end
end
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
step
'I should see "Shop" project link'
do
page
.
should
have_link
"Shop"
page
.
should
have_link
"Shop"
end
end
...
@@ -66,4 +77,13 @@ class Spinach::Features::Search < Spinach::FeatureSteps
...
@@ -66,4 +77,13 @@ class Spinach::Features::Search < Spinach::FeatureSteps
step
'I should not see "Bar" link in the search results'
do
step
'I should not see "Bar" link in the search results'
do
find
(
:css
,
'.search-results'
).
should_not
have_link
'Bar'
find
(
:css
,
'.search-results'
).
should_not
have_link
'Bar'
end
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
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment