From 8a4dd785ef08fe0c4635eafe05f98a472e6d873d Mon Sep 17 00:00:00 2001 From: Daniel Orner Date: Sun, 1 Dec 2024 09:52:39 -0500 Subject: [PATCH 1/2] move to delayed job (#4809) --- clock.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clock.rb b/clock.rb index fcf3e803b4..b19137dd1c 100644 --- a/clock.rb +++ b/clock.rb @@ -35,6 +35,6 @@ module Clockwork end every(1.day, "Send reminder emails", at: "12:00", if: lambda { |_| Rails.env.production? }) do - ReminderDeadlineJob.perform_now + ReminderDeadlineJob.perform_later end end From a93fd40e7a7037aaa2df90e9db4c8d87277c74d5 Mon Sep 17 00:00:00 2001 From: Cory Streiff <90390502+coalest@users.noreply.github.com> Date: Mon, 2 Dec 2024 02:44:10 +0100 Subject: [PATCH 2/2] Fix flaky distributions by county spec (#4816) --- .../distributions_by_county_system_spec.rb | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/spec/system/distributions_by_county_system_spec.rb b/spec/system/distributions_by_county_system_spec.rb index e0cc2188cf..82006de4a3 100644 --- a/spec/system/distributions_by_county_system_spec.rb +++ b/spec/system/distributions_by_county_system_spec.rb @@ -18,8 +18,9 @@ partner_1.profile.served_areas.each do |served_area| expect(page).to have_text(served_area.county.name) end - expect(page).to have_text("50", count: 4) - expect(page).to have_text("$525.00", count: 4) + + expect(page).to have_css("table tbody tr td", text: "50", exact_text: true, count: 4) + expect(page).to have_css("table tbody tr td", text: "$525.00", exact_text: true, count: 4) end it("works for this year") do @@ -31,8 +32,9 @@ partner_1.profile.served_areas.each do |served_area| expect(page).to have_text(served_area.county.name) end - expect(page).to have_text("25", count: 4) - expect(page).to have_text("$262.50", count: 4) + + expect(page).to have_css("table tbody tr td", text: "25", exact_text: true, count: 4) + expect(page).to have_css("table tbody tr td", text: "$262.50", exact_text: true, count: 4) end it("works for prior year") do @@ -53,8 +55,8 @@ partner_1.profile.served_areas.each do |served_area| expect(page).to have_text(served_area.county.name) end - expect(page).to have_text("25", count: 4) - expect(page).to have_text("$262.50", count: 4) + expect(page).to have_css("table tbody tr td", text: "25", exact_text: true, count: 4) + expect(page).to have_css("table tbody tr td", text: "$262.50", exact_text: true, count: 4) end it("works for last 12 months") do @@ -75,8 +77,8 @@ partner_1.profile.served_areas.each do |served_area| expect(page).to have_text(served_area.county.name) end - expect(page).to have_text("25", count: 4) - expect(page).to have_text("$262.50", count: 4) + expect(page).to have_css("table tbody tr td", text: "25", exact_text: true, count: 4) + expect(page).to have_css("table tbody tr td", text: "$262.50", exact_text: true, count: 4) end end