feat(mail): one layout for all mails with logo, greeting, cards and footer
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 2m1s
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 2m1s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
df06ab10c8
commit
46e1137f18
16 files changed
+475
-60
No files matched your search
@@ -167,12 +167,18 @@ func TestDailySummary(t *testing.T) {
|
||||
if len(*sent) != 1 {
|
||||
t.Fatalf("expected one summary, got %d", len(*sent))
|
||||
}
|
||||
text := (*sent)[0].text
|
||||
for _, want := range []string{"Überfällig", "Altlast", "Heute, 15:30 Uhr: Zahnarzt", "Morgen: Müll raus", "1 weitere"} {
|
||||
// Grouped into sections, the same in text and HTML; the logo travels inside the mail
|
||||
text, htmlBody := (*sent)[0].text, (*sent)[0].html
|
||||
for _, want := range []string{"Guten Morgen", "ÜBERFÄLLIG\n• Altlast (seit ", "HEUTE\n• Zahnarzt (15:30 Uhr)", "MORGEN\n• Müll raus", "1 weitere"} {
|
||||
if !strings.Contains(text, want) {
|
||||
t.Fatalf("summary lacks %q:\n%s", want, text)
|
||||
}
|
||||
}
|
||||
for _, want := range []string{"cid:" + mailLogoCID, ">Überfällig<", ">Zahnarzt<", "15:30 Uhr"} {
|
||||
if !strings.Contains(htmlBody, want) {
|
||||
t.Fatalf("summary HTML lacks %q", want)
|
||||
}
|
||||
}
|
||||
srv.sendDailySummaries(now.Add(5 * time.Minute))
|
||||
if len(*sent) != 1 {
|
||||
t.Fatal("only one summary per day")
|
||||
@@ -204,7 +210,7 @@ func TestDailySummaryIncludesGroupSharedLists(t *testing.T) {
|
||||
set.DailySummary = domain.DailySummary{Enabled: true, Time: "07:00", Email: true}
|
||||
_ = store.SetNotificationSettings(me.ID, set)
|
||||
srv.sendDailySummaries(time.Date(2026, 10, 30, 7, 1, 0, 0, time.Local))
|
||||
if len(*sent) != 1 || !strings.Contains((*sent)[0].text, "Bericht abgeben (Projekt)") {
|
||||
if len(*sent) != 1 || !strings.Contains((*sent)[0].text, "Bericht abgeben (10:00 Uhr · Projekt)") {
|
||||
t.Fatalf("group-shared task missing: %+v", *sent)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user