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

fix failing tests due to number of relations in relations tab

Behrokh Satarnejad00efe01e1d23
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 333d6b1583c..d85d77005b9 100644
--- a/spec/features/work_packages/details/relations/primerized_relations_spec.rb
+++ b/spec/features/work_packages/details/relations/primerized_relations_spec.rb
@@ -146,7 +146,7 @@ RSpec.describe "Primerized work package relations tab",
expect(page).to have_css(relations_panel_selector)
- tabs.expect_counter("relations", 4)
+ tabs.expect_counter("relations", 6)
relations_tab.expect_relation(relation_follows)
relations_tab.expect_relation(relation_relates)
@@ -168,7 +168,7 @@ RSpec.describe "Primerized work package relations tab",
expect { relation_follows.reload }.to raise_error(ActiveRecord::RecordNotFound)
- tabs.expect_counter("relations", 3)
+ tabs.expect_counter("relations", 5)
# Relations not visible due to lack of permissions on the project
relations_tab.expect_ghost_relation(restricted_relation_relates)
@@ -183,7 +183,7 @@ RSpec.describe "Primerized work package relations tab",
relations_tab.remove_child(child_wp)
expect(child_wp.reload.parent).to be_nil
- tabs.expect_counter("relations", 3)
+ tabs.expect_counter("relations", 5)
# Relations not visible due to lack of permissions on the project
relations_tab.expect_ghost_relation(restricted_relation_relates)
@@ -208,7 +208,7 @@ RSpec.describe "Primerized work package relations tab",
expect(relation_row).to have_text("5 days")
# Unchanged
- tabs.expect_counter("relations", 4)
+ tabs.expect_counter("relations", 6)
relations_tab.expect_ghost_relation(restricted_relation_relates)
relations_tab.expect_ghost_relation(restricted_child_work_package)
@@ -219,7 +219,7 @@ RSpec.describe "Primerized work package relations tab",
expect(relation_row).to have_text("And they can be edited!")
# Unchanged
- tabs.expect_counter("relations", 4)
+ tabs.expect_counter("relations", 6)
# Relations not visible due to lack of permissions on the project
relations_tab.expect_ghost_relation(restricted_relation_relates)
@@ -293,7 +293,7 @@ RSpec.describe "Primerized work package relations tab",
relations_tab.expect_relation(wp_successor)
# Bumped by one
- tabs.expect_counter("relations", 5)
+ tabs.expect_counter("relations", 7)
# Relation is created
expect(Relation.follows.where(from: wp_successor, to: work_package)).to exist
@@ -330,13 +330,13 @@ RSpec.describe "Primerized work package relations tab",
wait_for_network_idle
- tabs.expect_counter("relations", 4)
+ tabs.expect_counter("relations", 6)
relations_tab.add_existing_child(not_child_yet_wp)
relations_tab.expect_child(not_child_yet_wp)
# Bumped by one
- tabs.expect_counter("relations", 5)
+ tabs.expect_counter("relations", 7)
# Child relation is created
expect(not_child_yet_wp.reload.parent).to eq work_package
@@ -397,7 +397,7 @@ RSpec.describe "Primerized work package relations tab",
wait_for_network_idle
- tabs.expect_counter("relations", 4)
+ tabs.expect_counter("relations", 6)
relations_tab.expect_no_add_relation_button
relations_tab.expect_no_relatable_action_menu(wp_related)
@@ -414,7 +414,7 @@ RSpec.describe "Primerized work package relations tab",
wait_for_network_idle
- tabs.expect_counter("relations", 4)
+ tabs.expect_counter("relations", 6)
# The menu is shown as the user can add a relation
relations_tab.expect_add_relation_button
@@ -437,7 +437,7 @@ RSpec.describe "Primerized work package relations tab",
wait_for_network_idle
- tabs.expect_counter("relations", 4)
+ tabs.expect_counter("relations", 6)
# The menu is shown as the user can add a child
relations_tab.expect_add_relation_button