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

Validate behavior with a spec

Aaron Contreras403948e311ed
diff --git a/spec/features/admin/working_days_spec.rb b/spec/features/admin/working_days_spec.rb
index 516f5900b1f..b594f5b55c6 100644
--- a/spec/features/admin/working_days_spec.rb
+++ b/spec/features/admin/working_days_spec.rb
@@ -300,4 +300,15 @@ RSpec.describe "Working Days", :js, :with_cuprite do
expect(page).to have_css("tr", text: non_working_days.last.date.strftime("%B %-d, %Y"))
end
end
+
+ it "doesn't open a confirmation dialog if no working/non-working days have been modified" do
+ create(:non_working_day, date: Date.new(Date.current.year, 6, 10))
+ create(:non_working_day, date: Date.new(Date.current.year, 8, 20))
+ create(:non_working_day, date: Date.new(Date.current.year, 9, 25))
+
+ click_on "Apply changes"
+
+ # No dialog and saved successfully
+ expect(page).to have_css(".op-toast.-success")
+ end
end