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

Expect closest in Primerized relations tab feature

Alexander Brandon Colesc598898a99cf
diff --git a/spec/features/work_packages/details/relations/primerized_relations_spec.rb b/spec/features/work_packages/details/relations/primerized_relations_spec.rb
index 38670b78f1f..8f2886c242e 100644
--- a/spec/features/work_packages/details/relations/primerized_relations_spec.rb
+++ b/spec/features/work_packages/details/relations/primerized_relations_spec.rb
@@ -148,7 +148,7 @@ RSpec.describe "Primerized work package relations tab",
tabs.expect_counter("relations", 6)
- relations_tab.expect_relation(relation_follows)
+ relations_tab.expect_closest_relation(relation_follows)
relations_tab.expect_relation(relation_relates)
relations_tab.expect_relation(relation_blocked)
diff --git a/spec/support/components/work_packages/relations.rb b/spec/support/components/work_packages/relations.rb
index 31f38e7f356..7450e6b70d4 100644
--- a/spec/support/components/work_packages/relations.rb
+++ b/spec/support/components/work_packages/relations.rb
@@ -256,6 +256,15 @@ module Components
find_row(relatable)
end
+ def expect_closest_relation(relatable)
+ actual_relatable = find_relatable(relatable)
+ relation_row = find_row(actual_relatable)
+
+ within relation_row do
+ expect(it).to have_css(".Label", text: "Closest")
+ end
+ end
+
def expect_ghost_relation(relatable)
find_ghost_row(relatable)
end