From c1698f4132526697d711c73ca507bba790f7824c Mon Sep 17 00:00:00 2001 From: Nick Kipling Date: Tue, 2 Jul 2019 10:00:07 +0100 Subject: Improving packages navigation in project sidebar Removed Registry from sidebar Created new Packages top level item Added Container Registry into packages Updated tests to support new layout --- spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'spec') diff --git a/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb b/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb index 2befbcb3370..b627b9dba59 100644 --- a/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb +++ b/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb @@ -21,7 +21,7 @@ describe 'layouts/nav/sidebar/_project' do end end - describe 'container registry tab' do + describe 'packages tab' do before do stub_container_registry_config(enabled: true) @@ -31,24 +31,17 @@ describe 'layouts/nav/sidebar/_project' do .and_return('projects/registry/repositories') end - it 'has both Registry and Repository tabs' do - render - - expect(rendered).to have_text 'Repository' - expect(rendered).to have_text 'Registry' - end - it 'highlights sidebar item and flyout' do render expect(rendered).to have_css('.sidebar-top-level-items > li.active', count: 1) - expect(rendered).to have_css('.is-fly-out-only > li.active', count: 1) + expect(rendered).to have_css('.sidebar-sub-level-items > li.fly-out-top-item.active', count: 1) end it 'highlights container registry tab' do render - expect(rendered).to have_css('.sidebar-top-level-items > li.active', text: 'Registry') + expect(rendered).to have_css('.sidebar-sub-level-items > li:not(.fly-out-top-item).active', text: 'Container Registry') end end -- cgit v1.2.1