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 tests due to changes in rounding duration to minute
Christophe Bliarded9c63d2fdbf
diff --git a/spec/features/work_packages/progress_modal_spec.rb b/spec/features/work_packages/progress_modal_spec.rbindex 3e4b7b9f7fa..f1fb3f7ce36 100644--- a/spec/features/work_packages/progress_modal_spec.rb+++ b/spec/features/work_packages/progress_modal_spec.rb@@ -351,7 +351,7 @@ RSpec.describe "Progress modal", :js, :with_cuprite dowork_edit_field.activate!work_edit_field.expect_modal_field_value("1d 2h")- remaining_work_edit_field.expect_modal_field_value("2h 7m 12s")+ remaining_work_edit_field.expect_modal_field_value("2h 7m")percent_complete_edit_field.expect_modal_field_value("78", readonly: true)endend@@ -364,7 +364,7 @@ RSpec.describe "Progress modal", :js, :with_cuprite dowork_package.save(validate: false)end- it "does not lose precision due to conversion from ISO duration to hours" do+ it "does not lose precision due to conversion from ISO duration to hours (rounded to closest minute)" dowork_package_table.visit_query(progress_query)work_package_table.expect_work_package_listed(work_package)@@ -381,10 +381,11 @@ RSpec.describe "Progress modal", :js, :with_cuprite doexpect(work_package.estimated_hours).to eq(2.56)expect(work_package.remaining_hours).to eq(0.28)- # work should be displayed as "2h 33m 36s", and remaining work as "16m 48s"+ # work should be displayed as "2h 34m" ("2h 33m 36s" rounded to minutes),+ # and remaining work as "17m" ("16m 48s" rounded to minutes)work_edit_field.activate!- work_edit_field.expect_modal_field_value("2h 33m 36s")- remaining_work_edit_field.expect_modal_field_value("16m 48s")+ work_edit_field.expect_modal_field_value("2h 34m")+ remaining_work_edit_field.expect_modal_field_value("17m")endend