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
489182e5
Commit
489182e5
authored
Jan 29, 2020
by
Zack Cuddy
Committed by
Douglas Barbosa Alexandre
Jan 29, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix incorrect controller import
Spec Tests and lint
parent
2e130476
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
1 deletion
+68
-1
ee/app/views/layouts/nav/ee/admin/_geo_sidebar.html.haml
ee/app/views/layouts/nav/ee/admin/_geo_sidebar.html.haml
+1
-1
ee/spec/features/admin/geo/admin_geo_sidebar_spec.rb
ee/spec/features/admin/geo/admin_geo_sidebar_spec.rb
+67
-0
No files found.
ee/app/views/layouts/nav/ee/admin/_geo_sidebar.html.haml
View file @
489182e5
=
nav_link
(
controller:
%w(admin/geo/nodes admin/geo/projects admin/geo/uploads admin/geo/settings admin/geo/
upload
s)
)
do
=
nav_link
(
controller:
%w(admin/geo/nodes admin/geo/projects admin/geo/uploads admin/geo/settings admin/geo/
design
s)
)
do
=
link_to
admin_geo_nodes_path
,
class:
"qa-link-geo-menu"
do
.nav-icon-container
=
sprite_icon
(
'location-dot'
)
...
...
ee/spec/features/admin/geo/admin_geo_sidebar_spec.rb
0 → 100644
View file @
489182e5
# frozen_string_literal: true
require
'spec_helper'
describe
'admin Geo Sidebar'
,
:js
,
:geo
do
include
::
EE
::
GeoHelpers
include
StubENV
let_it_be
(
:admin
)
{
create
(
:admin
)
}
before
do
stub_licensed_features
(
geo:
true
)
sign_in
(
admin
)
end
shared_examples
'active sidebar link'
do
|
link_name
|
before
do
visit
path
wait_for_requests
end
it
'has active class'
do
sidebar_link
=
page
.
find
(
"a[title=
\"
#{
link_name
}
\"
]"
).
find
(
:xpath
,
'..'
)
expect
(
sidebar_link
[
:class
]).
to
include
(
'active'
)
end
end
describe
'clicking the nodes link'
do
it_behaves_like
'active sidebar link'
,
'Nodes'
do
let
(
:path
)
{
admin_geo_nodes_path
}
end
end
describe
'clicking the settings link'
do
before
do
stub_env
(
'IN_MEMORY_APPLICATION_SETTINGS'
,
'false'
)
end
it_behaves_like
'active sidebar link'
,
'Settings'
do
let
(
:path
)
{
admin_geo_settings_path
}
end
end
context
'on secondary'
do
before
do
stub_secondary_node
end
describe
'clicking the projects link'
do
it_behaves_like
'active sidebar link'
,
'Projects'
do
let
(
:path
)
{
admin_geo_projects_path
}
end
end
describe
'clicking the designs link'
do
it_behaves_like
'active sidebar link'
,
'Designs'
do
let
(
:path
)
{
admin_geo_designs_path
}
end
end
describe
'clicking the uploads link'
do
it_behaves_like
'active sidebar link'
,
'Uploads'
do
let
(
:path
)
{
admin_geo_uploads_path
}
end
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