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
Boxiang Sun
gitlab-ce
Commits
195c058c
Commit
195c058c
authored
Apr 07, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added keyboard shortcuts to signed out menu
parent
ce6a48cb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
16 deletions
+51
-16
app/views/layouts/nav/_explore.html.haml
app/views/layouts/nav/_explore.html.haml
+16
-3
spec/features/dashboard/shortcuts_spec.rb
spec/features/dashboard/shortcuts_spec.rb
+35
-13
No files found.
app/views/layouts/nav/_explore.html.haml
View file @
195c058c
%ul
=
nav_link
(
path:
[
'dashboard#show'
,
'root#show'
,
'projects#trending'
,
'projects#starred'
,
'projects#index'
],
html_options:
{
class:
'home'
})
do
=
link_to
explore_root_path
,
title:
'Projects'
do
=
link_to
explore_root_path
,
title:
'Projects'
,
class:
'dashboard-shortcuts-projects'
do
.shortcut-mappings
.key
=
icon
(
'arrow-up'
,
'aria-label'
=>
'hidden'
)
P
%span
Projects
=
nav_link
(
controller:
[
:groups
,
'groups/milestones'
,
'groups/group_members'
])
do
=
link_to
explore_groups_path
,
title:
'Groups'
do
=
link_to
explore_groups_path
,
title:
'Groups'
,
class:
'dashboard-shortcuts-groups'
do
.shortcut-mappings
.key
=
icon
(
'arrow-up'
,
'aria-label'
=>
'hidden'
)
G
%span
Groups
=
nav_link
(
controller: :snippets
)
do
=
link_to
explore_snippets_path
,
title:
'Snippets'
do
=
link_to
explore_snippets_path
,
title:
'Snippets'
,
class:
'dashboard-shortcuts-snippets'
do
.shortcut-mappings
.key
=
icon
(
'arrow-up'
,
'aria-label'
=>
'hidden'
)
S
%span
Snippets
%li
.divider
=
nav_link
(
controller: :help
)
do
=
link_to
help_path
,
title:
'Help'
do
%span
...
...
spec/features/dashboard/shortcuts_spec.rb
View file @
195c058c
require
'spec_helper'
feature
'Dashboard shortcuts'
,
feature:
true
,
js:
true
do
context
'logged in'
do
before
do
login_as
:user
visit
root_dashboard_path
...
...
@@ -23,6 +24,27 @@ feature 'Dashboard shortcuts', feature: true, js: true do
check_page_title
(
'Todos'
)
end
end
context
'logged out'
do
before
do
visit
explore_root_path
end
scenario
'Navigate to tabs'
do
find
(
'body'
).
native
.
send_keys
([
:shift
,
'P'
])
expect
(
page
).
to
have_content
(
'No projects found'
)
find
(
'body'
).
native
.
send_keys
([
:shift
,
'G'
])
expect
(
page
).
to
have_content
(
'No public groups'
)
find
(
'body'
).
native
.
send_keys
([
:shift
,
'S'
])
expect
(
page
).
to
have_selector
(
'.snippets-list-holder'
)
end
end
def
check_page_title
(
title
)
expect
(
find
(
'.header-content .title'
)).
to
have_content
(
title
)
...
...
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