Only send what is new, and lead with a picture
The window now starts at the last dispatch, so pressing send twice does not repeat a digest. Cards prefer entries that have a cover, the newest one of them opens the message as a full width image, and the page says when the last digest went out.
This commit is contained in:
@@ -133,3 +133,25 @@ describe('Karten', () => {
|
||||
expect(sections).toHaveLength(5)
|
||||
})
|
||||
})
|
||||
|
||||
describe('windowFor mit letztem Versand', () => {
|
||||
it('beginnt beim letzten Versand, wenn der jünger ist', () => {
|
||||
const { from } = windowFor(
|
||||
new Date('2026-08-03T06:00:00.000Z'),
|
||||
7,
|
||||
new Date('2026-08-01T09:00:00.000Z'),
|
||||
)
|
||||
|
||||
expect(from.toISOString()).toBe('2026-08-01T09:00:00.000Z')
|
||||
})
|
||||
|
||||
it('bleibt bei sieben Tagen, wenn der letzte Versand älter ist', () => {
|
||||
const { from } = windowFor(
|
||||
new Date('2026-08-03T06:00:00.000Z'),
|
||||
7,
|
||||
new Date('2026-06-01T09:00:00.000Z'),
|
||||
)
|
||||
|
||||
expect(from.toISOString()).toBe('2026-07-27T06:00:00.000Z')
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user