Permette di scegliere 12 ore, 24 ore o la settimana nello storico invii.
CI / scan_ruby (push) Failing after 12m32s
CI / scan_js (push) Successful in 13m28s
CI / lint (push) Failing after 13m58s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-07 13:00:09 +02:00
co-authored by Cursor
parent 1c6b4bbabe
commit 353ace4d99
5 changed files with 138 additions and 26 deletions
@@ -36,6 +36,30 @@ class MailingsControllerTest < ActionDispatch::IntegrationTest
assert_match(/1 ultimi 15 min/, response.body)
assert_select "div", text: "Storico invio"
assert_match(/1 inviate · ultime 12 ore/, response.body)
assert_select "span", text: "12h"
assert_select "a", text: "24h"
assert_select "a", text: "7g"
end
test "dashboard history range can switch to the last week" do
login_as users(:admin)
follow_redirect! if response.redirect?
mailing = create_mailing(identity: @identity, audience: "to_send")
org = organizations(:acme)
mailing.mailing_recipients.create!(
organization: org,
contact: org.contacts.first,
email: org.email,
status: "sent",
sent_at: 2.days.ago
)
get dashboard_mailings_path(project_code: @project.code, history: "7d")
assert_response :success
assert_match(/1 inviate · ultima settimana/, response.body)
assert_select "span", text: "7g"
assert_select "a[href=?]", dashboard_mailings_path(project_code: @project.code, history: "24h")
end
test "creates a draft and opens audience filters" do