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

attempt to stabilize flickering spec

ulfertsf465cd263e7a
diff --git a/app/components/work_package_relations_tab/index_component.html.erb b/app/components/work_package_relations_tab/index_component.html.erb
index 2c063f7f633..45cf075a6b3 100644
--- a/app/components/work_package_relations_tab/index_component.html.erb
+++ b/app/components/work_package_relations_tab/index_component.html.erb
@@ -62,7 +62,7 @@
end
else
flex.with_row do
- render Primer::Beta::Blankslate.new(border: true) do |component|
+ render Primer::Beta::Blankslate.new(border: true, data: { test_selector: "no-relations-blankslate" }) do |component|
component.with_visual_icon(icon: "package-dependents")
component.with_heading(tag: :h4).with_content(t("#{I18N_NAMESPACE}.index.blankslate_heading"))
component.with_description { t("#{I18N_NAMESPACE}.index.blankslate_description") }
diff --git a/spec/features/notifications/notification_center/split_screen_spec.rb b/spec/features/notifications/notification_center/split_screen_spec.rb
index dc216f68abc..2b375b3e37e 100644
--- a/spec/features/notifications/notification_center/split_screen_spec.rb
+++ b/spec/features/notifications/notification_center/split_screen_spec.rb
@@ -67,7 +67,7 @@ RSpec.describe "Split screen in the notification center", :js do
split_screen.switch_to_tab tab: "relations"
split_screen.expect_tab :relations
relations_tab = Components::WorkPackages::Relations.new(work_package)
- relations_tab.expect_no_relation work_package
+ relations_tab.expect_no_relations
# Navigate to full view and back
wp_full = split_screen.switch_to_fullscreen
diff --git a/spec/support/components/work_packages/relations.rb b/spec/support/components/work_packages/relations.rb
index e7d33eefcea..afc62681472 100644
--- a/spec/support/components/work_packages/relations.rb
+++ b/spec/support/components/work_packages/relations.rb
@@ -282,6 +282,10 @@ module Components
expect_no_row(relatable)
end
+ def expect_no_relations
+ expect(page).to have_test_selector("no-relations-blankslate", text: "This work package does not have any relations yet.")
+ end
+
def add_parent(query, work_package)
# Open the parent edit
SeleniumHubWaiter.wait