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

Merge obsolete "sidebar.sass" and "sidemenu.sass" files into one new "submenu_component.sass" and harmonize the selectors

Henriette Darge896dd8e7da50
diff --git a/app/components/_index.sass b/app/components/_index.sass
index a05d3e6b1e6..8c56eaf9738 100644
--- a/app/components/_index.sass
+++ b/app/components/_index.sass
@@ -2,6 +2,7 @@
@import "shares/invite_user_form_component"
@import "work_packages/progress/modal_body_component"
@import "open_project/common/attribute_component"
+@import "open_project/common/submenu_component"
@import "filter/filters_component"
@import "projects/row_component"
@import "settings/project_custom_fields/project_custom_field_mapping/new_project_mapping_component"
diff --git a/app/components/open_project/common/submenu_component.html.erb b/app/components/open_project/common/submenu_component.html.erb
index b3d1ea95b78..e41bcf201a9 100644
--- a/app/components/open_project/common/submenu_component.html.erb
+++ b/app/components/open_project/common/submenu_component.html.erb
@@ -1,22 +1,22 @@
-<div class="op-sidebar" data-controller="filter--filter-list" data-application-target="dynamic" data-test-selector="op-submenu">
+<div class="op-submenu" data-controller="filter--filter-list" data-application-target="dynamic" data-test-selector="op-submenu">
<% if @searchable %>
- <div class="op-sidebar--search">
+ <div class="op-submenu--search">
<%= render Primer::Alpha::TextField.new(name: "search",
label: I18n.t("label_search"),
placeholder: I18n.t("label_search"),
leading_visual: { icon: :search },
visually_hide_label: true,
- classes: "op-sidebar--search-input",
+ classes: "op-submenu--search-input",
data: {
action: "input->filter--filter-list#filterLists",
"filter--filter-list-target": "filter",
- "test-selector": "op-sidebar--search-input"
+ "test-selector": "op-submenu--search-input"
},) %>
<%= render Primer::Beta::Text.new(display: :none,
- classes: "op-sidebar--search-no-results-container",
+ classes: "op-submenu--search-no-results-container",
data: {
- "test-selector": "op-sidebar--search-no-results",
+ "test-selector": "op-submenu--search-no-results",
"filter--filter-list-target": "noResultsText",
}) do
I18n.t("js.autocompleter.notFoundText")
@@ -24,60 +24,57 @@
</div>
<% end %>
- <div class="op-sidebar--body" data-test-selector="op-sidebar--body">
+ <div class="op-submenu--body" data-test-selector="op-submenu--body">
<% if top_level_sidebar_menu_items.any? %>
- <div class="op-sidemenu">
- <ul class="op-sidemenu--items">
- <% top_level_sidebar_menu_items.first.children.each do |menu_item| %>
- <li class="op-sidemenu--item" data-filter--filter-list-target="searchItem">
- <% selected = menu_item.selected ? 'selected' : '' %>
- <a class="op-sidemenu--item-action <%= selected %>" href="<%= menu_item.href %>" data-test-selector="op-sidemenu--item-action">
- <% if menu_item.icon %>
- <%= render Primer::Beta::Octicon.new(icon: menu_item.icon, classes: "op-sidemenu--item-icon", mr: 2) %>
- <% end %>
- <span class="op-sidemenu--item-title">
- <%= menu_item.title %>
-
- <% if menu_item.show_enterprise_icon %>
- <%= render Primer::Beta::Octicon.new(icon: "op-enterprise-addons", "aria-label": I18n.t(:label_enterprise_edition), classes: "upsale-colored", ml: 2) %>
- <% end %>
- </span>
+ <ul class="op-submenu--items">
+ <% top_level_sidebar_menu_items.first.children.each do |menu_item| %>
+ <li class="op-submenu--item" data-filter--filter-list-target="searchItem">
+ <% selected = menu_item.selected ? 'selected' : '' %>
+ <a class="op-submenu--item-action <%= selected %>" href="<%= menu_item.href %>" data-test-selector="op-submenu--item-action">
+ <% if menu_item.icon %>
+ <%= render Primer::Beta::Octicon.new(icon: menu_item.icon, classes: "op-submenu--item-icon", mr: 2) %>
+ <% end %>
+ <span class="op-submenu--item-title">
+ <%= menu_item.title %>
- <% if menu_item.count %>
- <span class="op-bubble op-bubble_alt_highlighting" data-test-selector="op-sidemenu--item-count"><%= menu_item.count %></span>
+ <% if menu_item.show_enterprise_icon %>
+ <%= render Primer::Beta::Octicon.new(icon: "op-enterprise-addons", "aria-label": I18n.t(:label_enterprise_edition), classes: "upsale-colored", ml: 2) %>
<% end %>
- </a>
- </li>
- <% end %>
- </ul>
- </div>
+ </span>
+
+ <% if menu_item.count %>
+ <span class="op-bubble op-bubble_alt_highlighting" data-test-selector="op-submenu--item-count"><%= menu_item.count %></span>
+ <% end %>
+ </a>
+ </li>
+ <% end %>
+ </ul>
<% end %>
<% nested_sidebar_menu_items.each do |menu_item| %>
- <div class="op-sidemenu"
- data-controller="menus--expandable-sidemenu"
+ <div data-controller="menus--submenu"
data-application-target="dynamic">
- <button class="op-sidemenu--title"
+ <button class="op-submenu--title"
type="button"
- data-action="click->menus--expandable-sidemenu#toggleContainer">
+ data-action="click->menus--submenu#toggleContainer">
<%= menu_item.header %>
<span class="icon-small icon-arrow-up1"
aria-hidden="true"
- data-menus--expandable-sidemenu-target="indicator">
+ data-menus--submenu-target="indicator">
</span>
</button>
- <ul class="op-sidemenu--items"
- data-menus--expandable-sidemenu-target="container">
+ <ul class="op-submenu--items"
+ data-menus--submenu-target="container">
<% menu_item.children.each do |child_item| %>
- <li class="op-sidemenu--item" data-filter--filter-list-target="searchItem">
+ <li class="op-submenu--item" data-filter--filter-list-target="searchItem">
<% selected = child_item.selected ? 'selected' : '' %>
- <a class="op-sidemenu--item-action <%= selected %>" href="<%= child_item.href %>" data-test-selector="op-sidemenu--item-action">
+ <a class="op-submenu--item-action <%= selected %>" href="<%= child_item.href %>" data-test-selector="op-submenu--item-action">
<% if child_item.icon %>
- <%= render Primer::Beta::Octicon.new(icon: child_item.icon, classes: "op-sidemenu--item-icon", mr: 2) %>
+ <%= render Primer::Beta::Octicon.new(icon: child_item.icon, classes: "op-submenu--item-icon", mr: 2) %>
<% end %>
- <span class="op-sidemenu--item-title">
+ <span class="op-submenu--item-title">
<%= child_item.title %>
<% if child_item.show_enterprise_icon %>
@@ -85,12 +82,12 @@
<% end %>
<% if child_item.favored %>
- <%= render Primer::Beta::Octicon.new(icon: "star-fill", "aria-label": I18n.t(:label_favorite), classes: %w[op-sidemenu--item-mark op-primer--star-icon], ml: 2) %>
+ <%= render Primer::Beta::Octicon.new(icon: "star-fill", "aria-label": I18n.t(:label_favorite), classes: %w[op-submenu--item-mark op-primer--star-icon], ml: 2) %>
<% end %>
</span>
<% if child_item.count %>
- <span class="op-bubble op-bubble_alt_highlighting" data-test-selector="op-sidemenu--item-count"><%= child_item.count %></span>
+ <span class="op-bubble op-bubble_alt_highlighting" data-test-selector="op-submenu--item-count"><%= child_item.count %></span>
<% end %>
</a>
</li>
@@ -101,12 +98,12 @@
</div>
<% if @create_btn_options.present? %>
- <div class="op-sidebar--footer">
+ <div class="op-submenu--footer">
<%= render Primer::Beta::Button.new(scheme: :primary,
tag: :a,
href: @create_btn_options[:href],
test_selector: "#{@create_btn_options[:module_key]}--create-button",
- classes: "op-sidebar--footer-action") do |button|
+ classes: "op-submenu--footer-action") do |button|
button.with_leading_visual_icon(icon: "plus")
if @create_btn_options[:btn_text].present?
@create_btn_options[:btn_text]
diff --git a/frontend/src/global_styles/content/_sidemenu.sass b/app/components/open_project/common/submenu_component.sass
similarity index 62%
rename from frontend/src/global_styles/content/_sidemenu.sass
rename to app/components/open_project/common/submenu_component.sass
index a89ce71a616..75c6649e68c 100644
--- a/frontend/src/global_styles/content/_sidemenu.sass
+++ b/app/components/open_project/common/submenu_component.sass
@@ -1,4 +1,40 @@
-.op-sidemenu
+.op-submenu
+ height: 100%
+ display: flex
+ flex-direction: column
+ overflow: hidden
+
+ &--search
+ margin: 12px
+ color: var(--main-menu-font-color)
+ display: flex
+ flex-direction: column
+ row-gap: 16px
+
+ &--search-input
+ // Overriding the defult input styles, because of the default dark background of the sidebar
+ color: var(--main-menu-font-color) !important
+ border-color: var(--borderColor-muted) !important
+
+ &--body
+ flex-grow: 1
+ overflow: auto
+ @include styled-scroll-bar
+
+ &:only-child
+ padding-bottom: 10px
+
+ &--footer
+ display: grid
+ text-align: center
+ padding: 1rem
+
+ @supports (-webkit-touch-callout: none)
+ padding: 1rem 1rem 5rem
+
+ .button .spot-icon
+ margin-right: 0.5rem
+
&--title
display: flex
justify-content: space-between
diff --git a/frontend/src/app/core/setup/globals/onboarding/tours/boards_tour.ts b/frontend/src/app/core/setup/globals/onboarding/tours/boards_tour.ts
index 0e0d9e973f8..a8a62c72185 100644
--- a/frontend/src/app/core/setup/globals/onboarding/tours/boards_tour.ts
+++ b/frontend/src/app/core/setup/globals/onboarding/tours/boards_tour.ts
@@ -51,7 +51,7 @@ export function navigateToBoardStep(edition:'basic'|'enterprise'):OnboardingStep
onNext() {
jQuery('#boards-wrapper>.boards-menu-item ~ .toggler')[0].click();
waitForElement(
- '.op-sidemenu--item-action',
+ '.op-submenu--item-action',
'#main-menu',
(match) => match.click(),
(match) => !!match.textContent?.includes(boardName),
diff --git a/frontend/src/app/core/setup/globals/onboarding/tours/team_planners_tour.ts b/frontend/src/app/core/setup/globals/onboarding/tours/team_planners_tour.ts
index e529f78f1e0..4a83192669c 100644
--- a/frontend/src/app/core/setup/globals/onboarding/tours/team_planners_tour.ts
+++ b/frontend/src/app/core/setup/globals/onboarding/tours/team_planners_tour.ts
@@ -48,7 +48,7 @@ export function navigateToTeamPlannerStep():OnboardingStep {
jQuery('.team-planner-view-menu-item ~ .toggler')[0].click();
waitForElement(
- '.op-sidemenu--item-action',
+ '.op-submenu--item-action',
'#main-menu',
(match) => match.click(),
(match) => !!match.textContent?.includes('Team planner'),
diff --git a/frontend/src/global_styles/content/_index.sass b/frontend/src/global_styles/content/_index.sass
index d660f5644c3..b1e541c9226 100644
--- a/frontend/src/global_styles/content/_index.sass
+++ b/frontend/src/global_styles/content/_index.sass
@@ -73,8 +73,6 @@
@import resizer
@import version
@import project_status
-@import sidemenu
-@import sidebar
@import activity_list
@import activity_days
diff --git a/frontend/src/global_styles/content/_sidebar.sass b/frontend/src/global_styles/content/_sidebar.sass
deleted file mode 100644
index b59aec4d294..00000000000
--- a/frontend/src/global_styles/content/_sidebar.sass
+++ /dev/null
@@ -1,36 +0,0 @@
-.op-sidebar
- height: 100%
- display: flex
- flex-direction: column
- overflow: hidden
-
- &--search
- margin: 12px
- color: var(--main-menu-font-color)
- display: flex
- flex-direction: column
- row-gap: 16px
-
- &--search-input
- // Overriding the defult input styles, because of the default dark background of the sidebar
- color: var(--main-menu-font-color) !important
- border-color: var(--borderColor-muted) !important
-
- &--body
- flex-grow: 1
- overflow: auto
- @include styled-scroll-bar
-
- &:only-child
- padding-bottom: 10px
-
- &--footer
- display: grid
- text-align: center
- padding: 1rem
-
- @supports (-webkit-touch-callout: none)
- padding: 1rem 1rem 5rem
-
- .button .spot-icon
- margin-right: 0.5rem
diff --git a/frontend/src/stimulus/controllers/dynamic/menus/expandable-sidemenu.controller.ts b/frontend/src/stimulus/controllers/dynamic/menus/submenu.controller.ts
similarity index 70%
rename from frontend/src/stimulus/controllers/dynamic/menus/expandable-sidemenu.controller.ts
rename to frontend/src/stimulus/controllers/dynamic/menus/submenu.controller.ts
index ab54b4cd54d..6594a22360d 100644
--- a/frontend/src/stimulus/controllers/dynamic/menus/expandable-sidemenu.controller.ts
+++ b/frontend/src/stimulus/controllers/dynamic/menus/submenu.controller.ts
@@ -1,6 +1,6 @@
import { Controller } from '@hotwired/stimulus';
-export default class ExpandableSideMenuController extends Controller {
+export default class SubmenuController extends Controller {
static targets = [
'indicator',
'container',
@@ -22,12 +22,12 @@ export default class ExpandableSideMenuController extends Controller {
}
private expand() {
- this.containerTarget.classList.replace('op-sidemenu--items_collapsed', 'op-sidemenu--items');
+ this.containerTarget.classList.replace('op-submenu--items_collapsed', 'op-submenu--items');
this.indicatorTarget.classList.replace('icon-arrow-down1', 'icon-arrow-up1');
}
private collapse() {
- this.containerTarget.classList.replace('op-sidemenu--items', 'op-sidemenu--items_collapsed');
+ this.containerTarget.classList.replace('op-submenu--items', 'op-submenu--items_collapsed');
this.indicatorTarget.classList.replace('icon-arrow-up1', 'icon-arrow-down1');
}
}
diff --git a/modules/boards/spec/features/board_navigation_spec.rb b/modules/boards/spec/features/board_navigation_spec.rb
index 4a82058f93b..f5b7811f90f 100644
--- a/modules/boards/spec/features/board_navigation_spec.rb
+++ b/modules/boards/spec/features/board_navigation_spec.rb
@@ -106,7 +106,7 @@ RSpec.describe "Work Package boards spec", :js, with_ee: %i[board_view] do
page.find_test_selector("main-menu-toggler--boards", wait: 10).click
- subitem = page.find_test_selector("op-sidemenu--item-action", text: "My board", wait: 10)
+ subitem = page.find_test_selector("op-submenu--item-action", text: "My board", wait: 10)
# Ends with boards due to lazy route
expect(subitem[:href]).to end_with project_work_package_board_path(project, board_view.id)
diff --git a/modules/gantt/spec/features/menu/global_gantt_menu_spec.rb b/modules/gantt/spec/features/menu/global_gantt_menu_spec.rb
index 8d0631b0620..0587683ff1f 100644
--- a/modules/gantt/spec/features/menu/global_gantt_menu_spec.rb
+++ b/modules/gantt/spec/features/menu/global_gantt_menu_spec.rb
@@ -90,10 +90,10 @@ RSpec.describe "Gantt charts menu",
loading_indicator_saveguard
# Show global queries only
- expect(page).to have_css(".op-sidemenu--item-action", text: global_starred_query)
- expect(page).to have_css(".op-sidemenu--item-action", text: global_public_query)
- expect(page).to have_css(".op-sidemenu--item-action", text: global_private_query)
- expect(page).to have_no_css(".op-sidemenu--item-action", text: private_project_query)
+ expect(page).to have_css(".op-submenu--item-action", text: global_starred_query)
+ expect(page).to have_css(".op-submenu--item-action", text: global_public_query)
+ expect(page).to have_css(".op-submenu--item-action", text: global_private_query)
+ expect(page).to have_no_css(".op-submenu--item-action", text: private_project_query)
end
end
@@ -103,10 +103,10 @@ RSpec.describe "Gantt charts menu",
loading_indicator_saveguard
# Show project queries only
- expect(page).to have_no_css(".op-sidemenu--item-action", text: global_starred_query)
- expect(page).to have_no_css(".op-sidemenu--item-action", text: global_public_query)
- expect(page).to have_no_css(".op-sidemenu--item-action", text: global_private_query)
- expect(page).to have_css(".op-sidemenu--item-action", text: private_project_query)
+ expect(page).to have_no_css(".op-submenu--item-action", text: global_starred_query)
+ expect(page).to have_no_css(".op-submenu--item-action", text: global_public_query)
+ expect(page).to have_no_css(".op-submenu--item-action", text: global_private_query)
+ expect(page).to have_css(".op-submenu--item-action", text: private_project_query)
end
end
end
diff --git a/modules/reporting/spec/features/saving_spec.rb b/modules/reporting/spec/features/saving_spec.rb
index 4210d2f808b..a89d9a74806 100644
--- a/modules/reporting/spec/features/saving_spec.rb
+++ b/modules/reporting/spec/features/saving_spec.rb
@@ -21,9 +21,9 @@ RSpec.describe "Cost report saving", :js do
report_page.save as: "Testreport"
# Check if the category is displayed
- expect(page).to have_css(".op-sidemenu--title", text: I18n.t(:label_private_report_plural).upcase)
+ expect(page).to have_css(".op-submenu--title", text: I18n.t(:label_private_report_plural).upcase)
# Check if the new report is displayed
- expect(page).to have_css(".op-sidemenu--item-title", text: "Testreport")
+ expect(page).to have_css(".op-submenu--item-title", text: "Testreport")
report_page.expect_column_element "Work package"
report_page.expect_row_element "Project"
@@ -38,9 +38,9 @@ RSpec.describe "Cost report saving", :js do
report_page.save as: "Public report", public: true
# Check if the category is displayed
- expect(page).to have_css(".op-sidemenu--title", text: I18n.t(:label_public_report_plural).upcase)
+ expect(page).to have_css(".op-submenu--title", text: I18n.t(:label_public_report_plural).upcase)
# Check if the new report is displayed
- expect(page).to have_css(".op-sidemenu--item-title", text: "Public report")
+ expect(page).to have_css(".op-submenu--item-title", text: "Public report")
report_page.expect_column_element "Work package"
report_page.expect_row_element "Project"
diff --git a/modules/team_planner/spec/support/pages/team_planner.rb b/modules/team_planner/spec/support/pages/team_planner.rb
index 67272a78bb7..b126d1ec131 100644
--- a/modules/team_planner/spec/support/pages/team_planner.rb
+++ b/modules/team_planner/spec/support/pages/team_planner.rb
@@ -348,7 +348,7 @@ module Pages
end
def expect_no_menu_item(name)
- expect(page).to have_no_css(".op-sidemenu--item-title", text: name)
+ expect(page).to have_no_css(".op-submenu--item-title", text: name)
end
def y_distance(from:, to:)
diff --git a/spec/features/menu_items/query_menu_item_spec.rb b/spec/features/menu_items/query_menu_item_spec.rb
index f407fc85e04..967fa63503a 100644
--- a/spec/features/menu_items/query_menu_item_spec.rb
+++ b/spec/features/menu_items/query_menu_item_spec.rb
@@ -93,7 +93,7 @@ RSpec.describe "Query menu items", :js, :with_cuprite do
click_on "Save"
notification.expect_success("Successful update")
- expect(page).to have_css(".op-sidemenu--item", text: query.name)
+ expect(page).to have_css(".op-submenu--item", text: query.name)
end
end
@@ -135,7 +135,7 @@ RSpec.describe "Query menu items", :js, :with_cuprite do
it "is renaming and reordering the list" do
# Renaming the query should also reorder the queries. As it is renamed
# from zzzz to aaaa, it should now be the first query menu item.
- expect(page).to have_css(".op-sidemenu--items li:first-child", text: new_name)
+ expect(page).to have_css(".op-submenu--items li:first-child", text: new_name)
end
end
end
diff --git a/spec/features/work_packages/navigation_spec.rb b/spec/features/work_packages/navigation_spec.rb
index 3c281aa8c08..11feb0b536d 100644
--- a/spec/features/work_packages/navigation_spec.rb
+++ b/spec/features/work_packages/navigation_spec.rb
@@ -160,8 +160,8 @@ RSpec.describe "Work package navigation", :js, :selenium do
visit project_path(project)
page.find_test_selector("main-menu-toggler--work_packages").click
- expect(page).to have_test_selector("op-sidebar--body")
- find(".op-sidemenu--item-action", text: query.name).click
+ expect(page).to have_test_selector("op-submenu--body")
+ find(".op-submenu--item-action", text: query.name).click
expect(page).to have_no_css(".title-container", text: "Overview")
expect(page).to have_field("editable-toolbar-title", with: query.name)
diff --git a/spec/features/work_packages/select/select_query_spec.rb b/spec/features/work_packages/select/select_query_spec.rb
index 202d1dcaa52..cf5ca2c247d 100644
--- a/spec/features/work_packages/select/select_query_spec.rb
+++ b/spec/features/work_packages/select/select_query_spec.rb
@@ -106,7 +106,7 @@ RSpec.describe "Query selection" do
it "updates the page upon query switching", :js do
wp_page.expect_title query.name, editable: false
- find(".op-sidemenu--item-action", text: query2.name).click
+ find(".op-submenu--item-action", text: query2.name).click
end
end
end
diff --git a/spec/features/work_packages/table/queries/query_menu_refresh_spec.rb b/spec/features/work_packages/table/queries/query_menu_refresh_spec.rb
index f64e9764cc7..df3a105e39d 100644
--- a/spec/features/work_packages/table/queries/query_menu_refresh_spec.rb
+++ b/spec/features/work_packages/table/queries/query_menu_refresh_spec.rb
@@ -60,7 +60,7 @@ RSpec.describe "Refreshing query menu item", :js do
expect(url).not_to match(/query_props=.+/)
# Locate query and refresh
- query_item = page.find(".op-sidemenu--item-action", text: last_query.name)
+ query_item = page.find(".op-submenu--item-action", text: last_query.name)
query_item.click
wp_table.expect_work_package_listed work_package, other_work_package
diff --git a/spec/features/work_packages/table/queries/query_menu_spec.rb b/spec/features/work_packages/table/queries/query_menu_spec.rb
index ae11a7caedd..f46ebef406f 100644
--- a/spec/features/work_packages/table/queries/query_menu_spec.rb
+++ b/spec/features/work_packages/table/queries/query_menu_spec.rb
@@ -62,10 +62,10 @@ RSpec.describe "Query menu item", :js do
it "shows the query menu with queries stored for the global page" do
wp_table.visit!
- expect(page).to have_test_selector("op-sidebar--body")
- expect(page).to have_css(".op-sidemenu--item-action", wait: 20, minimum: 1)
+ expect(page).to have_test_selector("op-submenu--body")
+ expect(page).to have_css(".op-submenu--item-action", wait: 20, minimum: 1)
- within ".op-sidebar" do
+ within ".op-submenu" do
expect(page)
.to have_content(global_my_view.query.name, wait: 10)
expect(page)
@@ -100,7 +100,7 @@ RSpec.describe "Query menu item", :js do
find(".button", text: "Save").click
- expect(page).to have_css(".op-sidemenu--item-action", text: "Some query name", wait: 20)
+ expect(page).to have_css(".op-submenu--item-action", text: "Some query name", wait: 20)
last_query = Query.last
expect(last_query.public).to be_truthy
@@ -117,7 +117,7 @@ RSpec.describe "Query menu item", :js do
query_title.rename "My special query!123"
query_title.expect_title "My special query!123"
- expect(page).to have_css(".op-sidemenu--item-action", text: "My special query!123", wait: 20, count: 1)
+ expect(page).to have_css(".op-submenu--item-action", text: "My special query!123", wait: 20, count: 1)
end
it "allows filtering, saving, retrieving and altering the saved filter (Regression #25372)" do
@@ -153,7 +153,7 @@ RSpec.describe "Query menu item", :js do
wp_table.expect_work_package_listed work_package_with_version, work_package_without_version
# Locate query
- query_item = page.find(".op-sidemenu--item-action", text: "Some query name")
+ query_item = page.find(".op-submenu--item-action", text: "Some query name")
query_item.click
# Overrides the query_props
@@ -174,7 +174,7 @@ RSpec.describe "Query menu item", :js do
filters.expect_filter_count 1
expect(page.current_url).to include("query_props")
- query_item = page.find(".op-sidemenu--item-action", text: "Some query name")
+ query_item = page.find(".op-submenu--item-action", text: "Some query name")
query_item.click
retry_block do
diff --git a/spec/features/work_packages/table/queries/summary_spec.rb b/spec/features/work_packages/table/queries/summary_spec.rb
index 56bcbd4ac44..6f80bee14eb 100644
--- a/spec/features/work_packages/table/queries/summary_spec.rb
+++ b/spec/features/work_packages/table/queries/summary_spec.rb
@@ -44,7 +44,7 @@ RSpec.describe "Work package query summary item", :js do
end
it "allows users to visit the summary page" do
- find(".op-sidemenu--item-action", text: "Summary", wait: 10).click
+ find(".op-submenu--item-action", text: "Summary", wait: 10).click
expect(page).to have_css("h2", text: "Summary")
expect(page).to have_css("td", text: work_package.type.name)
end
diff --git a/spec/support/components/common/submenu.rb b/spec/support/components/common/submenu.rb
index 758a1d29c8b..4c597831f05 100644
--- a/spec/support/components/common/submenu.rb
+++ b/spec/support/components/common/submenu.rb
@@ -41,9 +41,9 @@ module Components
selected_specifier = selected ? ".selected" : ":not(.selected)"
if favored.nil?
- expect(page).to have_css(".op-sidemenu--item-action#{selected_specifier}", text: name, visible:)
+ expect(page).to have_css(".op-submenu--item-action#{selected_specifier}", text: name, visible:)
else
- item = page.find(".op-sidemenu--item-action#{selected_specifier}", text: name, visible:)
+ item = page.find(".op-submenu--item-action#{selected_specifier}", text: name, visible:)
if favored
expect(item).to have_css(".op-primer--star-icon")
@@ -56,18 +56,18 @@ module Components
def expect_no_item(name)
within "#main-menu" do
- expect(page).not_to have_test_selector("op-sidemenu--item-action", text: name)
+ expect(page).not_to have_test_selector("op-submenu--item-action", text: name)
end
end
def expect_item_with_count(item, count)
- within page.find_test_selector("op-sidemenu--item-action", text: item) do
+ within page.find_test_selector("op-submenu--item-action", text: item) do
expect_count count
end
end
def expect_item_with_no_count(item)
- within page.find_test_selector("op-sidemenu--item-action", text: item) do
+ within page.find_test_selector("op-submenu--item-action", text: item) do
expect_no_count
end
end
@@ -80,13 +80,13 @@ module Components
def expect_no_items
within "#main-menu" do
- expect(page).not_to have_test_selector("op-sidemenu--item-action")
+ expect(page).not_to have_test_selector("op-submenu--item-action")
end
end
def search_for_item(name)
within "#main-menu" do
- page.find_test_selector("op-sidebar--search-input").set(name)
+ page.find_test_selector("op-submenu--search-input").set(name)
end
end
@@ -96,16 +96,16 @@ module Components
def expect_no_results_text
within "#main-menu" do
- expect(page).to have_test_selector("op-sidebar--search-no-results", text: "No items found")
+ expect(page).to have_test_selector("op-submenu--search-no-results", text: "No items found")
end
end
def expect_count(count)
- expect(page).to have_test_selector("op-sidemenu--item-count", text: count)
+ expect(page).to have_test_selector("op-submenu--item-count", text: count)
end
def expect_no_count
- expect(page).not_to have_test_selector("op-sidemenu--item-count")
+ expect(page).not_to have_test_selector("op-submenu--item-count")
end
end
end
diff --git a/spec/support/pages/members.rb b/spec/support/pages/members.rb
index b879c76dff5..a59da8f4cec 100644
--- a/spec/support/pages/members.rb
+++ b/spec/support/pages/members.rb
@@ -65,9 +65,9 @@ module Pages
def expect_menu_item(text, selected: false)
if selected
- expect(page).to have_css(".op-sidemenu--item-action.selected", text:)
+ expect(page).to have_css(".op-submenu--item-action.selected", text:)
else
- expect(page).to have_css(".op-sidemenu--item-action", text:)
+ expect(page).to have_css(".op-submenu--item-action", text:)
end
end
diff --git a/spec/support/pages/work_packages/work_packages_table.rb b/spec/support/pages/work_packages/work_packages_table.rb
index 40086983365..7e2b702eaeb 100644
--- a/spec/support/pages/work_packages/work_packages_table.rb
+++ b/spec/support/pages/work_packages/work_packages_table.rb
@@ -189,8 +189,8 @@ module Pages
def expect_query_in_select_dropdown(name)
page.find(".title-container").click
- page.within('[data-test-selector="op-sidebar--body"]') do
- expect(page).to have_test_selector("op-sidemenu--item-action", text: name)
+ page.within('[data-test-selector="op-submenu--body"]') do
+ expect(page).to have_test_selector("op-submenu--item-action", text: name)
end
end