Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

fixing admin menu specs

Jonas Jabari7071b5e75c05
diff --git a/spec/features/menu_items/admin_menu_item_spec.rb b/spec/features/menu_items/admin_menu_item_spec.rb
index 6067eb2bcb4..d3e62459356 100644
--- a/spec/features/menu_items/admin_menu_item_spec.rb
+++ b/spec/features/menu_items/admin_menu_item_spec.rb
@@ -45,8 +45,8 @@ RSpec.describe 'Admin menu items',
context 'without having any menu items hidden in configuration' do
it 'must display all menu items' do
expect(page).to have_test_selector('menu-blocks--container')
- expect(page).to have_test_selector('menu-block', count: 21)
- expect(page).to have_test_selector('op-menu--item-action', count: 22) # All plus 'overview'
+ expect(page).to have_test_selector('menu-block', count: 22)
+ expect(page).to have_test_selector('op-menu--item-action', count: 23) # All plus 'overview'
end
end
@@ -56,10 +56,10 @@ RSpec.describe 'Admin menu items',
} do
it 'must not display the hidden menu items and blocks' do
expect(page).to have_test_selector('menu-blocks--container')
- expect(page).to have_test_selector('menu-block', count: 20)
+ expect(page).to have_test_selector('menu-block', count: 21)
expect(page).not_to have_test_selector('menu-block', text: I18n.t(:label_color_plural))
- expect(page).to have_test_selector('op-menu--item-action', count: 21) # All plus 'overview'
+ expect(page).to have_test_selector('op-menu--item-action', count: 22) # All plus 'overview'
expect(page).not_to have_test_selector('op-menu--item-action', text: I18n.t(:label_color_plural))
end
end