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

stabilize flickering spec

ulfertsa6dc310122d7
diff --git a/spec/support/pages/admin/placeholder_users/index.rb b/spec/support/pages/admin/placeholder_users/index.rb
index 6176b4183ca..27939b60f99 100644
--- a/spec/support/pages/admin/placeholder_users/index.rb
+++ b/spec/support/pages/admin/placeholder_users/index.rb
@@ -37,8 +37,9 @@ module Pages
end
def expect_listed(*placeholder_users)
- rows = page.all "td.name"
- expect(rows.map(&:text)).to include(*placeholder_users.map(&:name))
+ placeholder_users.each do |user|
+ expect(page).to have_css("td.name", text: user.name)
+ end
end
def expect_ordered(*placeholder_users)
@@ -47,8 +48,9 @@ module Pages
end
def expect_not_listed(*users)
- rows = page.all "td.name"
- expect(rows.map(&:text)).not_to include(*users.map(&:name))
+ users.each do |user|
+ expect(page).to have_no_css("td.name", text: user.name)
+ end
end
def expect_non_listed