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
Tatuya Kamada
gitlab-ce
Commits
6755d990
Commit
6755d990
authored
Mar 12, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3196 from Undev/feature/broken-projects-search-23049
Broken projects search on dashboard
parents
147b93ee
fce22dfa
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
34 additions
and
5 deletions
+34
-5
app/controllers/dashboard_controller.rb
app/controllers/dashboard_controller.rb
+1
-0
app/views/dashboard/_filter.html.haml
app/views/dashboard/_filter.html.haml
+1
-1
app/views/dashboard/projects.html.haml
app/views/dashboard/projects.html.haml
+1
-1
features/dashboard/projects.feature
features/dashboard/projects.feature
+6
-2
features/steps/dashboard/dashboard_projects.rb
features/steps/dashboard/dashboard_projects.rb
+23
-0
features/steps/shared/project.rb
features/steps/shared/project.rb
+2
-1
No files found.
app/controllers/dashboard_controller.rb
View file @
6755d990
...
...
@@ -34,6 +34,7 @@ class DashboardController < ApplicationController
@projects
end
@projects
=
@projects
.
search
(
params
[
:search
])
if
params
[
:search
].
present?
@projects
=
@projects
.
page
(
params
[
:page
]).
per
(
30
)
end
...
...
app/views/dashboard/_filter.html.haml
View file @
6755d990
=
form_tag
dashboard_filter_path
(
entity
),
method:
'get'
do
%fieldset
.dashboard-search-filter
=
search_field_tag
"search"
,
params
[
:search
],
{
placeholder:
'Search'
,
class:
'search-text-input'
}
=
search_field_tag
"search"
,
params
[
:search
],
{
id:
'filter_search'
,
placeholder:
'Search'
,
class:
'search-text-input'
}
=
button_tag
type:
'submit'
,
class:
'btn'
do
%i
.icon-search
...
...
app/views/dashboard/projects.html.haml
View file @
6755d990
...
...
@@ -24,7 +24,7 @@
=
form_tag
projects_dashboard_path
,
method:
'get'
do
%fieldset
.dashboard-search-filter
=
hidden_field_tag
"scope"
,
params
[
:scope
]
=
search_field_tag
"search"
,
params
[
:search
],
{
placeholder:
'Search'
,
class:
'left input-xxlarge'
}
=
search_field_tag
"search"
,
params
[
:search
],
{
id:
'dashboard_projects_search'
,
placeholder:
'Search'
,
class:
'left input-xxlarge'
}
=
button_tag
type:
'submit'
,
class:
'btn'
do
%i
.icon-search
...
...
features/dashboard/projects.feature
View file @
6755d990
Feature
:
Dashboard
Feature
:
Dashboard
projects
Background
:
Given
I sign in as a user
And
I own project
"Shop"
And
I visit dashboard projects page
Scenario
:
I
should see
issue
s list
Scenario
:
I
should see
project
s list
Then
I should see projects list
Scenario
:
I
should see project I am looking for
Given
I search for
"Sho"
Then
I should see
"Shop"
project link
features/steps/dashboard/dashboard_projects.rb
0 → 100644
View file @
6755d990
class
Dashboard
<
Spinach
::
FeatureSteps
include
SharedAuthentication
include
SharedPaths
include
SharedProject
Then
'I should see projects list'
do
@user
.
authorized_projects
.
all
.
each
do
|
project
|
page
.
should
have_link
project
.
name_with_namespace
end
end
Given
'I search for "Sho"'
do
fill_in
"dashboard_projects_search"
,
with:
"Sho"
within
".dashboard-search-filter"
do
find
(
'button'
).
click
end
end
Then
'I should see "Shop" project link'
do
page
.
should
have_link
"Shop"
end
end
features/steps/shared/project.rb
View file @
6755d990
...
...
@@ -9,7 +9,8 @@ module SharedProject
# Create a specific project called "Shop"
And
'I own project "Shop"'
do
@project
=
create
(
:project
,
name:
"Shop"
)
@project
=
Project
.
find_by_name
"Shop"
@project
||=
create
(
:project
,
name:
"Shop"
)
@project
.
team
<<
[
@user
,
:master
]
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