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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Fix backport of ruby-3.1 compatible commit
Oliver Güntherdc5d6089fae5
diff --git a/spec/features/work_packages/sorting/manual_sorting_spec.rb b/spec/features/work_packages/sorting/manual_sorting_spec.rbindex 5acea575024..5d383fa808a 100644--- a/spec/features/work_packages/sorting/manual_sorting_spec.rb+++ b/spec/features/work_packages/sorting/manual_sorting_spec.rb@@ -37,12 +37,12 @@ describe 'Manual sorting of WP table', type: :feature, js: true dolet(:type_bug) { create :type_bug }let(:project) { create(:project, types: [type_task, type_bug]) }let(:work_package1) do- create(:work_package, subject: 'WP1', project:, type: type_task, created_at: Time.zone.now)+ create(:work_package, subject: 'WP1', project: project, type: type_task, created_at: Time.zone.now)endlet(:work_package2) docreate(:work_package,subject: 'WP2',- project:,+ project: project,parent: work_package1,type: type_task,created_at: 1.minute.ago)@@ -50,7 +50,7 @@ describe 'Manual sorting of WP table', type: :feature, js: true dolet(:work_package3) docreate(:work_package,subject: 'WP3',- project:,+ project: project,parent: work_package2,type: type_bug,created_at: 2.minutes.ago)@@ -58,7 +58,7 @@ describe 'Manual sorting of WP table', type: :feature, js: true dolet(:work_package4) docreate(:work_package,subject: 'WP4',- project:,+ project: project,parent: work_package3,type: type_bug,created_at: 3.minutes.ago)@@ -156,10 +156,10 @@ describe 'Manual sorting of WP table', type: :feature, js: true docontext 'when dragging an element partly out of the hierarchy' dolet(:work_package5) do- create(:work_package, subject: 'WP5', project:, parent: work_package1)+ create(:work_package, subject: 'WP5', project: project, parent: work_package1)endlet(:work_package6) do- create(:work_package, subject: 'WP6', project:, parent: work_package1)+ create(:work_package, subject: 'WP6', project: project, parent: work_package1)endbefore do@@ -234,7 +234,7 @@ describe 'Manual sorting of WP table', type: :feature, js: true dodescribe 'with a saved query and positions increasing from zero' dolet(:query) do- create(:query, user:, project:, show_hierarchies: false).tap do |q|+ create(:query, user: user, project: project, show_hierarchies: false).tap do |q|q.sort_criteria = [[:manual_sorting, 'asc']]q.save!end@@ -243,10 +243,10 @@ describe 'Manual sorting of WP table', type: :feature, js: true dolet!(:priority) { create :default_priority }before do- ::OrderedWorkPackage.create(query:, work_package: work_package1, position: 0)- ::OrderedWorkPackage.create(query:, work_package: work_package2, position: 1)- ::OrderedWorkPackage.create(query:, work_package: work_package3, position: 2)- ::OrderedWorkPackage.create(query:, work_package: work_package4, position: 3)+ ::OrderedWorkPackage.create(query: query, work_package: work_package1, position: 0)+ ::OrderedWorkPackage.create(query: query, work_package: work_package2, position: 1)+ ::OrderedWorkPackage.create(query: query, work_package: work_package3, position: 2)+ ::OrderedWorkPackage.create(query: query, work_package: work_package4, position: 3)endit 'can inline create a work package and it is positioned to the bottom (Regression #31078)' do@@ -272,7 +272,7 @@ describe 'Manual sorting of WP table', type: :feature, js: true do# Wait until the order was saved, this might take a few momentsretry_block do- order = ::OrderedWorkPackage.find_by(query:, work_package: inline_created)+ order = ::OrderedWorkPackage.find_by(query: query, work_package: inline_created)unless order&.position == 8195raise "Expected order of #{inline_created.id} to be 8195. Was: #{order&.position}. Retrying"@@ -291,7 +291,7 @@ describe 'Manual sorting of WP table', type: :feature, js: true dodescribe 'with a saved query that is NOT manually sorted' dolet(:query) do- create(:query, user:, project:, show_hierarchies: false).tap do |q|+ create(:query, user: user, project: project, show_hierarchies: false).tap do |q|q.sort_criteria = [[:id, 'asc']]q.save!enddiff --git a/spec/support/pages/page.rb b/spec/support/pages/page.rbindex 2430fe1a47c..9f406f10d59 100644--- a/spec/support/pages/page.rb+++ b/spec/support/pages/page.rb@@ -102,9 +102,9 @@ module Pagesenddef expect_and_dismiss_toaster(message:, type: :success)- expect_toast(type:, message:)+ expect_toast(type: type, message: message)dismiss_toaster!- expect_no_toaster(type:, message:)+ expect_no_toaster(type: type, message: message)enddef dismiss_toaster!diff --git a/spec/support/pages/work_packages/work_package_cards.rb b/spec/support/pages/work_packages/work_package_cards.rbindex 25abd68c409..c595ef222a5 100644--- a/spec/support/pages/work_packages/work_package_cards.rb+++ b/spec/support/pages/work_packages/work_package_cards.rb@@ -82,7 +82,7 @@ module Pagesenddef drag_and_drop_work_package(from:, to:)- drag_and_drop_list(from:, to:, elements: 'wp-single-card', handler: '.op-wp-single-card--content')+ drag_and_drop_list(from: from, to: to, elements: 'wp-single-card', handler: '.op-wp-single-card--content')enddef select_work_package(work_package)diff --git a/spec/support/pages/work_packages/work_packages_table.rb b/spec/support/pages/work_packages/work_packages_table.rbindex 3cf463d2edd..f7274f279ed 100644--- a/spec/support/pages/work_packages/work_packages_table.rb+++ b/spec/support/pages/work_packages/work_packages_table.rb@@ -78,7 +78,7 @@ module Pagesdef expect_work_package_count(count)within(table_container) do- expect(page).to have_selector(".wp--row", count:, wait: 20)+ expect(page).to have_selector(".wp--row", count: count, wait: 20)endend@@ -172,7 +172,7 @@ module Pagesenddef drag_and_drop_work_package(from:, to:)- drag_and_drop_list(from:, to:, elements: '.wp-table--row', handler: '.wp-table--drag-and-drop-handle')+ drag_and_drop_list(from: from, to: to, elements: '.wp-table--row', handler: '.wp-table--drag-and-drop-handle')enddef row(work_package)