diff --git a/app/helpers/vertical_nav_helper.rb b/app/helpers/vertical_nav_helper.rb index 5ac59c6aa1..c8a602b8db 100644 --- a/app/helpers/vertical_nav_helper.rb +++ b/app/helpers/vertical_nav_helper.rb @@ -5,7 +5,7 @@ module VerticalNavHelper def vertical_nav_data { - 'current-api': current_api.to_json(root: false, only: %i[name]), + 'current-api': (current_api.to_json(root: false, only: %i[name]) if %i[serviceadmin backend_api].include?(active_menu)), sections: vertical_nav_sections.to_json, 'active-section': active_submenu, 'active-item': active_sidebar diff --git a/features/menu/audience_menu.feature b/features/menu/audience_menu.feature new file mode 100644 index 0000000000..2bd1e2a4d7 --- /dev/null +++ b/features/menu/audience_menu.feature @@ -0,0 +1,13 @@ +Feature: Audience menu + In order to manage my audience + As a provider + I want to see a menu that lets me do that + + Background: + Given a provider is logged in + + @javascript + Scenario: Application overview + Given has an application + When I'm on that application page + Then I should see there is no current API diff --git a/features/old/menu/api_menu.feature b/features/old/menu/api_menu.feature index b22fc3b445..c891b4820a 100644 --- a/features/old/menu/api_menu.feature +++ b/features/old/menu/api_menu.feature @@ -12,6 +12,7 @@ Feature: API menu And I go to the provider dashboard And I follow "API" + @javascript Scenario: Current API title Then the name of the product can be seen on top of the menu diff --git a/features/step_definitions/menu_steps.rb b/features/step_definitions/menu_steps.rb index ab1ceb82aa..be654c2a3e 100644 --- a/features/step_definitions/menu_steps.rb +++ b/features/step_definitions/menu_steps.rb @@ -7,12 +7,6 @@ }) end -Then /^I should see there is no current API/ do - within '#mainmenu' do - assert_not has_css? '.pf-c-nav__section-title' - end -end - Then /^I should see menu items$/ do |items| items.raw.each do |item| within '#mainmenu' do @@ -76,6 +70,12 @@ end end +Then /^I should see there is no current API/ do + within '#mainmenu' do + assert_not has_css? '.pf-c-nav__section-title' + end +end + def help_menu_selector 'header .PopNavigation.PopNavigation--docs' end