diff options
Diffstat (limited to 'spec/support/helpers/features/top_nav_spec_helpers.rb')
-rw-r--r-- | spec/support/helpers/features/top_nav_spec_helpers.rb | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/spec/support/helpers/features/top_nav_spec_helpers.rb b/spec/support/helpers/features/top_nav_spec_helpers.rb index 87ed897ec74..de495eceabc 100644 --- a/spec/support/helpers/features/top_nav_spec_helpers.rb +++ b/spec/support/helpers/features/top_nav_spec_helpers.rb @@ -8,38 +8,24 @@ module Spec module Features module TopNavSpecHelpers def open_top_nav - return unless Feature.enabled?(:combined_menu, default_enabled: :yaml) - find('.js-top-nav-dropdown-toggle').click end def within_top_nav - if Feature.enabled?(:combined_menu, default_enabled: :yaml) - within('.js-top-nav-dropdown-menu') do - yield - end - else - within('.navbar-sub-nav') do - yield - end + within('.js-top-nav-dropdown-menu') do + yield end end def open_top_nav_projects - if Feature.enabled?(:combined_menu, default_enabled: :yaml) - open_top_nav + open_top_nav - within_top_nav do - click_button('Projects') - end - else - find('#nav-projects-dropdown').click + within_top_nav do + click_button('Projects') end end def open_top_nav_groups - return unless Feature.enabled?(:combined_menu, default_enabled: :yaml) - open_top_nav within_top_nav do |