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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
6a0a5482
Commit
6a0a5482
authored
Apr 08, 2020
by
Gilang Gumilar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add navbar spec
parent
999f8da0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
app/views/layouts/nav/sidebar/_analytics_links.html.haml
app/views/layouts/nav/sidebar/_analytics_links.html.haml
+2
-2
ee/spec/features/groups/navbar_spec.rb
ee/spec/features/groups/navbar_spec.rb
+11
-0
No files found.
app/views/layouts/nav/sidebar/_analytics_links.html.haml
View file @
6a0a5482
-
navbar_links
=
links
.
sort_by
(
&
:title
)
-
all_paths
=
navbar_links
.
map
(
&
:path
)
-
analytics_link
=
navbar_links
.
select
{
|
link
|
link
.
title
==
_
(
'Value Stream'
)
}.
first
||
navbar_links
.
first
-
analytics_link
=
navbar_links
.
find
{
|
link
|
link
.
title
==
_
(
'Value Stream'
)
}
||
navbar_links
.
first
-
if
navbar_links
.
any?
=
nav_link
(
path:
all_paths
)
do
=
link_to
analytics_link
.
link
do
=
link_to
analytics_link
.
link
,
{
data:
{
qa_selector:
'analytics_anchor'
}
}
do
.nav-icon-container
=
sprite_icon
(
'chart'
)
%span
.nav-item-name
{
data:
{
qa_selector:
'analytics_link'
}
}
...
...
ee/spec/features/groups/navbar_spec.rb
View file @
6a0a5482
...
...
@@ -4,6 +4,7 @@ require 'spec_helper'
describe
'Group navbar'
do
include
NavbarStructureHelper
include
WaitForRequests
include_context
'group navbar structure'
...
...
@@ -45,6 +46,16 @@ describe 'Group navbar' do
end
it_behaves_like
'verified navigation bar'
it
'redirects to value stream when Analytics item is clicked'
do
page
.
within
(
'.sidebar-top-level-items'
)
do
find
(
'[data-qa-selector=analytics_anchor]'
).
click
end
wait_for_requests
expect
(
page
).
to
have_current_path
(
group_analytics_cycle_analytics_path
(
group
))
end
end
context
'when epics are available'
do
...
...
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