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

add a test to check if the dates are visible for children

Behrokh Satarnejad7f37d8e2f14e
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 67672376a64..fbfa7e850e2 100644
--- a/spec/features/work_packages/details/relations/primerized_relations_spec.rb
+++ b/spec/features/work_packages/details/relations/primerized_relations_spec.rb
@@ -105,6 +105,7 @@ RSpec.describe "Primerized work package relations tab",
create(:work_package,
subject: "restricted_child_work_package",
parent: work_package,
+ start_date: Time.zone.today,
project: restricted_project)
end
shared_let(:restricted_relation_relates) do
@@ -155,6 +156,24 @@ RSpec.describe "Primerized work package relations tab",
relations_tab.expect_ghost_relation(restricted_relation_relates)
relations_tab.expect_ghost_relation(restricted_child_work_package)
end
+
+ it "renders ghost children" do
+ scroll_to_element relations_panel
+
+ wait_for_network_idle
+
+ restricted_child_row = relations_panel.find(
+ "[data-test-selector='op-relation-row-ghost-#{restricted_child_work_package.id}']"
+ )
+
+ within(restricted_child_row) do
+ expect(restricted_child_row).to have_no_css(
+ "[data-test-selector='op-relation-row-#{restricted_child_work_package.id}-action-menu']"
+ )
+
+ expect(restricted_child_row).to have_text(Time.zone.today.strftime("%m/%d/%Y").to_s)
+ end
+ end
end
describe "deletion" do