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

Check if there is no loading indicator then test

bsatarnejad67b0c375cd06
diff --git a/spec/support/components/project_include_component.rb b/spec/support/components/project_include_component.rb
index e0d1f385d0a..e0245670340 100644
--- a/spec/support/components/project_include_component.rb
+++ b/spec/support/components/project_include_component.rb
@@ -56,6 +56,7 @@ module Components
end
def expect_checkbox(project_id, checked = false)
+ no_loading_indicator
page.find(
"[data-qa-project-include-id='#{project_id}'][data-qa-project-include-checked='#{checked ? '1' : '0'}']",
wait: 10
@@ -63,12 +64,14 @@ module Components
end
def expect_no_checkbox(project_id)
+ no_loading_indicator
unless page.has_no_selector?("[data-qa-project-include-id='#{project_id}']")
raise "Expected not to find #{project_id}"
end
end
def search(text)
+ no_loading_indicator
within_body do
fill_in "project-include-search",
with: text,
@@ -101,5 +104,9 @@ module Components
def selector
'.op-project-include'
end
+
+ def no_loading_indicator
+ expect(page).to have_no_selector("[data-qa-selector='op-project-include--loading']")
+ end
end
end