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

Use the filter loaded expectation on hidden elements for mobile view.

Dombi Attila0f8f9f162f05
diff --git a/spec/support/components/work_packages/filters.rb b/spec/support/components/work_packages/filters.rb
index d45bfd44ef3..672c31287dd 100644
--- a/spec/support/components/work_packages/filters.rb
+++ b/spec/support/components/work_packages/filters.rb
@@ -139,7 +139,12 @@ module Components
sleep 0.5
# Wait for the filters dropdown to be fully loaded.
- expect(page).to have_css("#{page.test_selector('wp-filter-button')} .badge")
+ # The .badge is hidden in mobile views, but
+ # we can still use the expectation on the hidden element.
+ expect(page).to have_css(
+ "#{page.test_selector('wp-filter-button')} .badge",
+ visible: :all
+ )
end
def expect_missing_filter(name)