Skip to content

Commit

Permalink
Current product showing in Vertical navigation when in Audience (#3015)
Browse files Browse the repository at this point in the history
🥒 Update cucumbers
  • Loading branch information
lvillen authored Sep 6, 2022
1 parent f4ca0f1 commit d4491d8
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/helpers/vertical_nav_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions features/menu/audience_menu.feature
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions features/old/menu/api_menu.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
12 changes: 6 additions & 6 deletions features/step_definitions/menu_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d4491d8

Please sign in to comment.