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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
d12a6ac4
Commit
d12a6ac4
authored
Mar 11, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dashboard-restyle' into 'master'
Dashboard restyle For #2069 See merge request !1675
parents
c621a771
9ed71f77
Changes
28
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
126 additions
and
384 deletions
+126
-384
app/assets/javascripts/dashboard.js.coffee
app/assets/javascripts/dashboard.js.coffee
+0
-12
app/assets/stylesheets/pages/dashboard.scss
app/assets/stylesheets/pages/dashboard.scss
+0
-28
app/controllers/dashboard_controller.rb
app/controllers/dashboard_controller.rb
+0
-29
app/controllers/explore/projects_controller.rb
app/controllers/explore/projects_controller.rb
+3
-0
app/controllers/projects_controller.rb
app/controllers/projects_controller.rb
+1
-1
app/helpers/dashboard_helper.rb
app/helpers/dashboard_helper.rb
+0
-16
app/helpers/explore_helper.rb
app/helpers/explore_helper.rb
+17
-0
app/views/dashboard/_groups.html.haml
app/views/dashboard/_groups.html.haml
+0
-21
app/views/dashboard/_projects_filter.html.haml
app/views/dashboard/_projects_filter.html.haml
+0
-100
app/views/dashboard/_sidebar.html.haml
app/views/dashboard/_sidebar.html.haml
+1
-16
app/views/dashboard/_zero_authorized_projects.html.haml
app/views/dashboard/_zero_authorized_projects.html.haml
+3
-2
app/views/dashboard/groups/index.html.haml
app/views/dashboard/groups/index.html.haml
+1
-0
app/views/dashboard/projects.html.haml
app/views/dashboard/projects.html.haml
+0
-60
app/views/dashboard/show.html.haml
app/views/dashboard/show.html.haml
+1
-1
app/views/explore/projects/_filter.html.haml
app/views/explore/projects/_filter.html.haml
+67
-0
app/views/explore/projects/index.html.haml
app/views/explore/projects/index.html.haml
+1
-26
app/views/layouts/nav/_dashboard.html.haml
app/views/layouts/nav/_dashboard.html.haml
+1
-7
config/routes.rb
config/routes.rb
+0
-1
features/dashboard/archived_projects.feature
features/dashboard/archived_projects.feature
+0
-5
features/dashboard/group.feature
features/dashboard/group.feature
+8
-0
features/dashboard/projects.feature
features/dashboard/projects.feature
+0
-9
features/groups.feature
features/groups.feature
+0
-8
features/project/archived.feature
features/project/archived.feature
+0
-9
features/steps/dashboard/group.rb
features/steps/dashboard/group.rb
+19
-0
features/steps/dashboard/projects.rb
features/steps/dashboard/projects.rb
+0
-11
features/steps/groups.rb
features/steps/groups.rb
+0
-19
features/steps/shared/active_tab.rb
features/steps/shared/active_tab.rb
+1
-1
spec/features/security/dashboard_access_spec.rb
spec/features/security/dashboard_access_spec.rb
+2
-2
No files found.
app/assets/javascripts/dashboard.js.coffee
View file @
d12a6ac4
class
@
Dashboard
constructor
:
->
@
initSidebarTab
()
new
ProjectsList
()
initSidebarTab
:
->
key
=
"dashboard_sidebar_filter"
# store selection in cookie
$
(
'.dash-sidebar-tabs a'
).
on
'click'
,
(
e
)
->
$
.
cookie
(
key
,
$
(
e
.
target
).
attr
(
'id'
))
# show tab from cookie
sidebar_filter
=
$
.
cookie
(
key
)
$
(
"#"
+
sidebar_filter
).
tab
(
'show'
)
if
sidebar_filter
app/assets/stylesheets/pages/dashboard.scss
View file @
d12a6ac4
...
...
@@ -23,25 +23,6 @@
}
}
.dash-sidebar-tabs
{
margin-bottom
:
2px
;
border
:
none
;
margin
:
0
!
important
;
li
{
&
.active
{
a
{
background-color
:
whitesmoke
!
important
;
border-bottom
:
1px
solid
whitesmoke
!
important
;
}
}
a
{
border-color
:
#DDD
!
important
;
}
}
}
.project-row
,
.group-row
{
padding
:
0
!
important
;
font-size
:
14px
;
...
...
@@ -116,15 +97,6 @@
}
}
.dash-new-group
{
background
:
$gl-success
;
border
:
1px
solid
$gl-success
;
a
{
color
:
#FFF
;
}
}
.dash-list
.str-truncated
{
max-width
:
72%
;
}
app/controllers/dashboard_controller.rb
View file @
d12a6ac4
...
...
@@ -5,15 +5,9 @@ class DashboardController < ApplicationController
before_filter
:event_filter
,
only: :show
def
show
@projects_limit
=
20
@groups
=
current_user
.
authorized_groups
.
order_name_asc
@has_authorized_projects
=
@projects
.
count
>
0
@projects_count
=
@projects
.
count
@projects
=
@projects
.
includes
(
:namespace
)
@last_push
=
current_user
.
recent_push
@publicish_project_count
=
Project
.
publicish
(
current_user
).
count
respond_to
do
|
format
|
format
.
html
...
...
@@ -29,29 +23,6 @@ class DashboardController < ApplicationController
end
end
def
projects
@projects
=
case
params
[
:scope
]
when
'personal'
then
current_user
.
namespace
.
projects
when
'joined'
then
current_user
.
authorized_projects
.
joined
(
current_user
)
when
'owned'
then
current_user
.
owned_projects
else
current_user
.
authorized_projects
end
@projects
=
@projects
.
where
(
namespace_id:
Group
.
find_by
(
name:
params
[
:group
]))
if
params
[
:group
].
present?
@projects
=
@projects
.
where
(
visibility_level:
params
[
:visibility_level
])
if
params
[
:visibility_level
].
present?
@projects
=
@projects
.
includes
(
:namespace
,
:forked_from_project
,
:tags
)
@projects
=
@projects
.
tagged_with
(
params
[
:tag
])
if
params
[
:tag
].
present?
@projects
=
@projects
.
sort
(
@sort
=
params
[
:sort
])
@projects
=
@projects
.
page
(
params
[
:page
]).
per
(
30
)
@tags
=
current_user
.
authorized_projects
.
tags_on
(
:tags
)
@groups
=
current_user
.
authorized_groups
end
def
merge_requests
@merge_requests
=
get_merge_requests_collection
@merge_requests
=
@merge_requests
.
page
(
params
[
:page
]).
per
(
20
)
...
...
app/controllers/explore/projects_controller.rb
View file @
d12a6ac4
...
...
@@ -6,6 +6,9 @@ class Explore::ProjectsController < ApplicationController
def
index
@projects
=
ProjectsFinder
.
new
.
execute
(
current_user
)
@tags
=
@projects
.
tags_on
(
:tags
)
@projects
=
@projects
.
tagged_with
(
params
[
:tag
])
if
params
[
:tag
].
present?
@projects
=
@projects
.
where
(
visibility_level:
params
[
:visibility_level
])
if
params
[
:visibility_level
].
present?
@projects
=
@projects
.
search
(
params
[
:search
])
if
params
[
:search
].
present?
@projects
=
@projects
.
sort
(
@sort
=
params
[
:sort
])
@projects
=
@projects
.
includes
(
:namespace
).
page
(
params
[
:page
]).
per
(
20
)
...
...
app/controllers/projects_controller.rb
View file @
d12a6ac4
...
...
@@ -105,7 +105,7 @@ class ProjectsController < ApplicationController
if
request
.
referer
.
include?
(
'/admin'
)
redirect_to
admin_namespaces_projects_path
else
redirect_to
projects_
dashboard_path
redirect_to
dashboard_path
end
end
end
...
...
app/helpers/dashboard_helper.rb
View file @
d12a6ac4
module
DashboardHelper
def
projects_dashboard_filter_path
(
options
=
{})
exist_opts
=
{
sort:
params
[
:sort
],
scope:
params
[
:scope
],
group:
params
[
:group
],
tag:
params
[
:tag
],
visibility_level:
params
[
:visibility_level
],
}
options
=
exist_opts
.
merge
(
options
)
path
=
request
.
path
path
<<
"?
#{
options
.
to_param
}
"
path
end
def
assigned_issues_dashboard_path
issues_dashboard_path
(
assignee_id:
current_user
.
id
)
end
...
...
app/helpers/explore_helper.rb
0 → 100644
View file @
d12a6ac4
module
ExploreHelper
def
explore_projects_filter_path
(
options
=
{})
exist_opts
=
{
sort:
params
[
:sort
],
scope:
params
[
:scope
],
group:
params
[
:group
],
tag:
params
[
:tag
],
visibility_level:
params
[
:visibility_level
],
}
options
=
exist_opts
.
merge
(
options
)
path
=
request
.
path
path
<<
"?
#{
options
.
to_param
}
"
path
end
end
app/views/dashboard/_groups.html.haml
deleted
100644 → 0
View file @
c621a771
.panel.panel-default
.panel-heading.clearfix
.input-group
=
search_field_tag
:filter_group
,
nil
,
placeholder:
'Filter by name'
,
class:
'dash-filter form-control'
-
if
current_user
.
can_create_group?
.input-group-addon.dash-new-group
=
link_to
new_group_path
,
class:
""
do
%strong
New group
%ul
.well-list.dash-list
-
groups
.
each
do
|
group
|
%li
.group-row
=
link_to
group_path
(
id:
group
.
path
),
class:
dom_class
(
group
)
do
.dash-project-avatar
=
image_tag
group_icon
(
group
.
path
),
class:
"avatar s40"
%span
.group-name.filter-title
=
truncate
(
group
.
name
,
length:
35
)
%span
.arrow
%i
.fa.fa-angle-right
-
if
groups
.
blank?
%li
.nothing-here-block
You have no groups yet.
app/views/dashboard/_projects_filter.html.haml
deleted
100644 → 0
View file @
c621a771
.dash-projects-filters.append-bottom-20
.append-right-20
%ul
.nav.nav-tabs
=
nav_tab
:scope
,
nil
do
=
link_to
projects_dashboard_filter_path
(
scope:
nil
)
do
All
=
nav_tab
:scope
,
'personal'
do
=
link_to
projects_dashboard_filter_path
(
scope:
'personal'
)
do
Personal
=
nav_tab
:scope
,
'joined'
do
=
link_to
projects_dashboard_filter_path
(
scope:
'joined'
)
do
Joined
=
nav_tab
:scope
,
'owned'
do
=
link_to
projects_dashboard_filter_path
(
scope:
'owned'
)
do
Owned
.dropdown.inline.append-right-10
%a
.dropdown-toggle.btn
{
href:
'#'
,
"data-toggle"
=>
"dropdown"
}
%i
.fa.fa-globe
%span
.light
Visibility:
-
if
params
[
:visibility_level
].
present?
=
visibility_level_label
(
params
[
:visibility_level
].
to_i
)
-
else
Any
%b
.caret
%ul
.dropdown-menu
%li
=
link_to
projects_dashboard_filter_path
(
visibility_level:
nil
)
do
Any
-
Gitlab
::
VisibilityLevel
.
values
.
each
do
|
level
|
%li
{
class:
(
level
.
to_s
==
params
[
:visibility_level
])
?
'active'
:
'light'
}
=
link_to
projects_dashboard_filter_path
(
visibility_level:
level
)
do
=
visibility_level_icon
(
level
)
=
visibility_level_label
(
level
)
-
if
@groups
.
present?
.dropdown.inline.append-right-10
%a
.dropdown-toggle.btn
{
href:
'#'
,
"data-toggle"
=>
"dropdown"
}
%i
.fa.fa-group
%span
.light
Group:
-
if
params
[
:group
].
present?
=
Group
.
find_by
(
name:
params
[
:group
]).
name
-
else
Any
%b
.caret
%ul
.dropdown-menu
%li
=
link_to
projects_dashboard_filter_path
(
group:
nil
)
do
Any
-
@groups
.
each
do
|
group
|
%li
{
class:
(
group
.
name
==
params
[
:group
])
?
'active'
:
'light'
}
=
link_to
projects_dashboard_filter_path
(
group:
group
.
name
)
do
=
group
.
name
%small
.pull-right
=
group
.
projects
.
count
-
if
@tags
.
present?
.dropdown.inline.append-right-10
%a
.dropdown-toggle.btn
{
href:
'#'
,
"data-toggle"
=>
"dropdown"
}
%i
.fa.fa-tags
%span
.light
Tags:
-
if
params
[
:tag
].
present?
=
params
[
:tag
]
-
else
Any
%b
.caret
%ul
.dropdown-menu
%li
=
link_to
projects_dashboard_filter_path
(
tag:
nil
)
do
Any
-
@tags
.
each
do
|
tag
|
%li
{
class:
(
tag
.
name
==
params
[
:tag
])
?
'active'
:
'light'
}
=
link_to
projects_dashboard_filter_path
(
tag:
tag
.
name
)
do
%i
.fa.fa-tag
=
tag
.
name
.pull-right
.dropdown.inline
%a
.dropdown-toggle.btn
{
href:
'#'
,
"data-toggle"
=>
"dropdown"
}
%span
.light
sort:
-
if
@sort
.
present?
=
sort_options_hash
[
@sort
]
-
else
=
sort_title_recently_created
%b
.caret
%ul
.dropdown-menu
%li
=
link_to
projects_dashboard_filter_path
(
sort:
sort_value_recently_created
)
do
=
sort_title_recently_created
=
link_to
projects_dashboard_filter_path
(
sort:
sort_value_oldest_created
)
do
=
sort_title_oldest_created
=
link_to
projects_dashboard_filter_path
(
sort:
sort_value_recently_updated
)
do
=
sort_title_recently_updated
=
link_to
projects_dashboard_filter_path
(
sort:
sort_value_oldest_updated
)
do
=
sort_title_oldest_updated
=
link_to
projects_dashboard_filter_path
(
sort:
sort_value_name
)
do
=
sort_title_name
app/views/dashboard/_sidebar.html.haml
View file @
d12a6ac4
%ul
.nav.nav-tabs.dash-sidebar-tabs
%li
.active
=
link_to
'#projects'
,
'data-toggle'
=>
'tab'
,
id:
'sidebar-projects-tab'
do
Projects
%span
.badge
=
@projects_count
%li
=
link_to
'#groups'
,
'data-toggle'
=>
'tab'
,
id:
'sidebar-groups-tab'
do
Groups
%span
.badge
=
@groups
.
count
.tab-content
.tab-pane.active
#projects
=
render
"dashboard/projects"
,
projects:
@projects
.tab-pane
#groups
=
render
"dashboard/groups"
,
groups:
@groups
=
render
"dashboard/projects"
,
projects:
@projects
.prepend-top-20
=
render
'shared/promo'
app/views/dashboard/_zero_authorized_projects.html.haml
View file @
d12a6ac4
-
publicish_project_count
=
Project
.
publicish
(
current_user
).
count
%h3
.page-title
Welcome to GitLab!
%p
.light
Self hosted Git management application.
%hr
...
...
@@ -35,7 +36,7 @@
%i
.fa.fa-plus
New Group
-
if
@
publicish_project_count
>
0
-
if
publicish_project_count
>
0
%hr
%div
.dashboard-intro-icon
...
...
@@ -43,7 +44,7 @@
.dashboard-intro-text
%p
.slead
There are
%strong
=
@
publicish_project_count
%strong
=
publicish_project_count
public projects on this server.
%br
Public projects are an easy way to allow everyone to have read-only access.
...
...
app/views/dashboard/groups/index.html.haml
View file @
d12a6ac4
...
...
@@ -27,6 +27,7 @@
%i
.fa.fa-sign-out
Leave
=
image_tag
group_icon
(
group
.
path
),
class:
"avatar s40 avatar-tile"
=
link_to
group
,
class:
'group-name'
do
%strong
=
group
.
name
...
...
app/views/dashboard/projects.html.haml
deleted
100644 → 0
View file @
c621a771
%h3
.page-title
My Projects
=
link_to
new_project_path
,
class:
"btn btn-new pull-right"
do
%i
.fa.fa-plus
New Project
%p
.light
All projects you have access to are listed here. Public projects are not included here unless you are a member
%hr
.side-filters
=
render
"projects_filter"
.dash-projects
%ul
.bordered-list.my-projects.top-list
-
@projects
.
each
do
|
project
|
%li
.my-project-row
%h4
.project-title
.pull-left
=
project_icon
(
project
,
alt:
''
,
class:
'avatar project-avatar s60'
)
.project-access-icon
=
visibility_level_icon
(
project
.
visibility_level
)
=
link_to
project_path
(
project
),
class:
dom_class
(
project
)
do
%strong
=
project
.
name_with_namespace
-
if
project
.
forked_from_project
%small
%i
.fa.fa-code-fork
Forked from:
=
link_to
project
.
forked_from_project
.
name_with_namespace
,
namespace_project_path
(
project
.
namespace
,
project
.
forked_from_project
)
-
if
current_user
.
can_leave_project?
(
project
)
.pull-right
=
link_to
leave_namespace_project_team_members_path
(
project
.
namespace
,
project
),
data:
{
confirm:
"Leave project?"
},
method: :delete
,
remote:
true
,
class:
"btn-tiny btn remove-row"
,
title:
'Leave project'
do
%i
.fa.fa-sign-out
Leave
.project-info
.pull-right
-
if
project
.
archived?
%span
.label
%i
.fa.fa-archive
Archived
-
project
.
tags
.
each
do
|
tag
|
%span
.label.label-info
%i
.fa.fa-tag
=
tag
.
name
-
if
project
.
description
.
present?
%p
=
truncate
project
.
description
,
length:
100
.last-activity
%span
.light
Last activity:
%span
.date
=
project_last_activity
(
project
)
-
if
@projects
.
blank?
%li
.nothing-here-block
There are no projects here.
.bottom
=
paginate
@projects
,
theme:
"gitlab"
app/views/dashboard/show.html.haml
View file @
d12a6ac4
-
if
@
has_authorized_projects
-
if
@
projects
.
any?
.dashboard.row
%section
.activities.col-md-8
=
render
'activities'
...
...
app/views/explore/projects/_filter.html.haml
0 → 100644
View file @
d12a6ac4
.pull-left
=
form_tag
explore_projects_filter_path
,
method: :get
,
class:
'form-inline form-tiny'
do
|
f
|
.form-group
=
search_field_tag
:search
,
params
[
:search
],
placeholder:
"Filter by name"
,
class:
"form-control search-text-input input-mn-300"
,
id:
"projects_search"
.form-group
=
button_tag
'Search'
,
class:
"btn btn-primary wide"
.pull-right.hidden-sm.hidden-xs
-
if
current_user
.dropdown.inline.append-right-10
%a
.dropdown-toggle.btn
{
href:
'#'
,
"data-toggle"
=>
"dropdown"
}
%i
.fa.fa-globe
%span
.light
Visibility:
-
if
params
[
:visibility_level
].
present?
=
visibility_level_label
(
params
[
:visibility_level
].
to_i
)
-
else
Any
%b
.caret
%ul
.dropdown-menu
%li
=
link_to
explore_projects_filter_path
(
visibility_level:
nil
)
do
Any
-
Gitlab
::
VisibilityLevel
.
values
.
each
do
|
level
|
%li
{
class:
(
level
.
to_s
==
params
[
:visibility_level
])
?
'active'
:
'light'
}
=
link_to
explore_projects_filter_path
(
visibility_level:
level
)
do
=
visibility_level_icon
(
level
)
=
visibility_level_label
(
level
)
-
if
@tags
.
present?
.dropdown.inline.append-right-10
%a
.dropdown-toggle.btn
{
href:
'#'
,
"data-toggle"
=>
"dropdown"
}
%i
.fa.fa-tags
%span
.light
Tags:
-
if
params
[
:tag
].
present?
=
params
[
:tag
]
-
else
Any
%b
.caret
%ul
.dropdown-menu
%li
=
link_to
explore_projects_filter_path
(
tag:
nil
)
do
Any
-
@tags
.
each
do
|
tag
|
%li
{
class:
(
tag
.
name
==
params
[
:tag
])
?
'active'
:
'light'
}
=
link_to
explore_projects_filter_path
(
tag:
tag
.
name
)
do
%i
.fa.fa-tag
=
tag
.
name
.dropdown.inline
%button
.dropdown-toggle.btn
{
type:
'button'
,
'data-toggle'
=>
'dropdown'
}
%span
.light
sort:
-
if
@sort
.
present?
=
sort_options_hash
[
@sort
]
-
else
=
sort_title_recently_created
%b
.caret
%ul
.dropdown-menu
%li
=
link_to
explore_projects_filter_path
(
sort:
sort_value_recently_created
)
do
=
sort_title_recently_created
=
link_to
explore_projects_filter_path
(
sort:
sort_value_oldest_created
)
do
=
sort_title_oldest_created
=
link_to
explore_projects_filter_path
(
sort:
sort_value_recently_updated
)
do
=
sort_title_recently_updated
=
link_to
explore_projects_filter_path
(
sort:
sort_value_oldest_updated
)
do
=
sort_title_oldest_updated
app/views/explore/projects/index.html.haml
View file @
d12a6ac4
.clearfix
.pull-left
=
form_tag
explore_projects_path
,
method: :get
,
class:
'form-inline form-tiny'
do
|
f
|
.form-group
=
search_field_tag
:search
,
params
[
:search
],
placeholder:
"Filter by name"
,
class:
"form-control search-text-input input-mn-300"
,
id:
"projects_search"
.form-group
=
button_tag
'Search'
,
class:
"btn btn-primary wide"
.pull-right
.dropdown.inline
%button
.dropdown-toggle.btn
{
type:
'button'
,
'data-toggle'
=>
'dropdown'
}
%span
.light
sort:
-
if
@sort
.
present?
=
sort_options_hash
[
@sort
]
-
else
=
sort_title_recently_created
%b
.caret
%ul
.dropdown-menu
%li
=
link_to
explore_projects_path
(
sort:
sort_value_recently_created
)
do
=
sort_title_recently_created
=
link_to
explore_projects_path
(
sort:
sort_value_oldest_created
)
do
=
sort_title_oldest_created
=
link_to
explore_projects_path
(
sort:
sort_value_recently_updated
)
do
=
sort_title_recently_updated
=
link_to
explore_projects_path
(
sort:
sort_value_oldest_updated
)
do
=
sort_title_oldest_updated
=
render
'filter'
%hr
.public-projects
...
...
app/views/layouts/nav/_dashboard.html.haml
View file @
d12a6ac4
...
...
@@ -3,12 +3,7 @@
=
link_to
root_path
,
title:
'Home'
,
class:
'shortcuts-activity'
do
%i
.fa.fa-dashboard
%span
Activity
=
nav_link
(
path:
'dashboard#projects'
)
do
=
link_to
projects_dashboard_path
,
title:
'Projects'
,
class:
'shortcuts-projects'
do
%i
.fa.fa-cube
%span
Projects
Your Projects
=
nav_link
(
path:
'projects#starred'
)
do
=
link_to
starred_dashboard_projects_path
,
title:
'Starred Projects'
do
%i
.fa.fa-star
...
...
@@ -41,4 +36,3 @@
%i
.fa.fa-question-circle
%span
Help
config/routes.rb
View file @
d12a6ac4
...
...
@@ -208,7 +208,6 @@ Gitlab::Application.routes.draw do
#
resource
:dashboard
,
controller:
'dashboard'
,
only:
[
:show
]
do
member
do
get
:projects
get
:issues
get
:merge_requests
end
...
...
features/dashboard/archived_projects.feature
View file @
d12a6ac4
...
...
@@ -10,8 +10,3 @@ Feature: Dashboard Archived Projects
Scenario
:
I
should see non-archived projects on dashboard
Then
I should see
"Shop"
project link
And
I should not see
"Forum"
project link
Scenario
:
I
should see all projects on projects page
And
I visit dashboard projects page
Then
I should see
"Shop"
project link
And
I should see
"Forum"
project link
features/dashboard/group.feature
View file @
d12a6ac4
...
...
@@ -46,3 +46,11 @@ Feature: Dashboard Group
When
I visit dashboard groups page
Then
I should see group
"Owned"
in group list
Then
I should not see group
"Guest"
in group list
Scenario
:
Create a group from dasboard
And
I visit dashboard groups page
And
I click new group link
And
submit form with new group
"Samurai"
info
Then
I should be redirected to group
"Samurai"
page
And
I should see newly created group
"Samurai"
features/dashboard/projects.feature
deleted
100644 → 0
View file @
c621a771
@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 projects list
Then
I should see projects list
features/groups.feature
View file @
d12a6ac4
...
...
@@ -10,14 +10,6 @@ Feature: Groups
Then
I should see group
"Owned"
projects list
And
I should see projects activity feed
Scenario
:
Create a group from dasboard
When
I visit group
"Owned"
page
And
I visit dashboard page
And
I click new group link
And
submit form with new group
"Samurai"
info
Then
I should be redirected to group
"Samurai"
page
And
I should see newly created group
"Samurai"
Scenario
:
I
should see group
"Owned"
issues list
Given
project from group
"Owned"
has issues assigned to me
When
I visit group
"Owned"
issues page
...
...
features/project/archived.feature
View file @
d12a6ac4
...
...
@@ -14,15 +14,6 @@ Feature: Project Archived
And
I visit project
"Forum"
page
Then
I should see
"Archived"
Scenario
:
I
should not see archived on projects page with no archived projects
And
I visit dashboard projects page
Then
I should not see
"Archived"
Scenario
:
I
should see archived on projects page with archived projects
And
project
"Forum"
is archived
And
I visit dashboard projects page
Then
I should see
"Archived"
Scenario
:
I
archive project
When
project
"Shop"
has push event
And
I visit project
"Shop"
page
...
...
features/steps/dashboard/group.rb
View file @
d12a6ac4
...
...
@@ -41,4 +41,23 @@ class Spinach::Features::DashboardGroup < Spinach::FeatureSteps
step
'I should not see group "Guest" in group list'
do
page
.
should_not
have_content
(
"Guest"
)
end
step
'I click new group link'
do
click_link
"New Group"
end
step
'submit form with new group "Samurai" info'
do
fill_in
'group_path'
,
with:
'Samurai'
fill_in
'group_description'
,
with:
'Tokugawa Shogunate'
click_button
"Create group"
end
step
'I should be redirected to group "Samurai" page'
do
current_path
.
should
==
group_path
(
Group
.
find_by
(
name:
'Samurai'
))
end
step
'I should see newly created group "Samurai"'
do
page
.
should
have_content
"Samurai"
page
.
should
have_content
"Tokugawa Shogunate"
end
end
features/steps/dashboard/projects.rb
deleted
100644 → 0
View file @
c621a771
class
Spinach::Features::DashboardProjects
<
Spinach
::
FeatureSteps
include
SharedAuthentication
include
SharedPaths
include
SharedProject
step
'I should see projects list'
do
@user
.
authorized_projects
.
all
.
each
do
|
project
|
page
.
should
have_link
project
.
name_with_namespace
end
end
end
features/steps/groups.rb
View file @
d12a6ac4
...
...
@@ -72,25 +72,6 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
author:
current_user
end
When
'I click new group link'
do
click_link
"New group"
end
step
'submit form with new group "Samurai" info'
do
fill_in
'group_path'
,
with:
'Samurai'
fill_in
'group_description'
,
with:
'Tokugawa Shogunate'
click_button
"Create group"
end
step
'I should be redirected to group "Samurai" page'
do
current_path
.
should
==
group_path
(
Group
.
find_by
(
name:
'Samurai'
))
end
step
'I should see newly created group "Samurai"'
do
page
.
should
have_content
"Samurai"
page
.
should
have_content
"Tokugawa Shogunate"
end
step
'I change group "Owned" name to "new-name"'
do
fill_in
'group_name'
,
with:
'new-name'
fill_in
'group_path'
,
with:
'new-name'
...
...
features/steps/shared/active_tab.rb
View file @
d12a6ac4
...
...
@@ -26,7 +26,7 @@ module SharedActiveTab
end
step
'the active main tab should be Home'
do
ensure_active_main_tab
(
'
Activity
'
)
ensure_active_main_tab
(
'
Your Projects
'
)
end
step
'the active main tab should be Projects'
do
...
...
spec/features/security/dashboard_access_spec.rb
View file @
d12a6ac4
...
...
@@ -25,8 +25,8 @@ describe "Dashboard access", feature: true do
it
{
is_expected
.
to
be_denied_for
:visitor
}
end
describe
"GET /dashboard/projects"
do
subject
{
projects_dashboard
_path
}
describe
"GET /dashboard/projects
/starred
"
do
subject
{
starred_dashboard_projects
_path
}
it
{
is_expected
.
to
be_allowed_for
:admin
}
it
{
is_expected
.
to
be_allowed_for
:user
}
...
...
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