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

Wait longer for project include component

Dombi Attila4804473ab95f
diff --git a/modules/calendar/spec/features/calendar_project_include_spec.rb b/modules/calendar/spec/features/calendar_project_include_spec.rb
index f34008cb72a..b7bfe14b2ce 100644
--- a/modules/calendar/spec/features/calendar_project_include_spec.rb
+++ b/modules/calendar/spec/features/calendar_project_include_spec.rb
@@ -41,7 +41,7 @@ RSpec.describe 'Calendar project include', :js do
let(:dropdown) { Components::ProjectIncludeComponent.new }
it 'correctly filters work packages by project' do
- dropdown.expect_count 1
+ dropdown.expect_count 1, wait: 10
# Make sure the filter gets set once
dropdown.toggle!
diff --git a/spec/support/components/project_include_component.rb b/spec/support/components/project_include_component.rb
index 281f97096f0..552ff1ca0fb 100644
--- a/spec/support/components/project_include_component.rb
+++ b/spec/support/components/project_include_component.rb
@@ -45,8 +45,8 @@ module Components
expect(page).to have_css("[data-test-selector='project-include-list']")
end
- def expect_count(count)
- expect(page).to have_css("[data-test-selector='project-include-button'] .badge", text: count)
+ def expect_count(count, wait: 5)
+ expect(page).to have_css("[data-test-selector='project-include-button'] .badge", text: count, wait:)
end
def toggle_include_all_subprojects