Add opt-in monthly email recaps with scheduling and delivery history
This commit is contained in:
@@ -92,6 +92,15 @@ const output = process.env.REVIEW_DIR
|
||||
await page.screenshot({ path: path.join(output, `monthly-report-${width}.png`), fullPage: true })
|
||||
}
|
||||
}
|
||||
const beforeLink = calls.length
|
||||
await page.goto(base + '/insights/reports?month=2026-07')
|
||||
await page.getByRole('heading', { name: 'July 2026', exact: true }).waitFor()
|
||||
const linkedCalls = calls.slice(beforeLink).filter((call) => call.path === '/api/insights/reports/monthly')
|
||||
assert.deepEqual(linkedCalls.map((call) => call.month), ['2026-07'])
|
||||
await page.reload()
|
||||
await page.getByRole('heading', { name: 'July 2026', exact: true }).waitFor()
|
||||
await page.goto(base + '/insights/reports')
|
||||
await page.getByRole('heading', { name: 'August 2026', exact: true }).waitFor()
|
||||
await page.getByRole('button', { name: 'Previous month', exact: true }).click()
|
||||
await page.getByRole('heading', { name: 'July 2026', exact: true }).waitFor()
|
||||
await page.getByRole('button', { name: 'Next month', exact: true }).click()
|
||||
@@ -126,7 +135,8 @@ const output = process.env.REVIEW_DIR
|
||||
assert.equal(await page.getByRole('link', { name: 'Connect Jellystat' }).count(), 0)
|
||||
mode = 'unauthorized'
|
||||
await page.reload()
|
||||
await page.waitForURL('**/login?next=%2Finsights%2Freports')
|
||||
await page.waitForURL(/\/login\?next=/)
|
||||
assert.equal(new URL(page.url()).searchParams.get('next'), `/insights/reports?month=${months.at(-1)}`)
|
||||
mode = 'ready'
|
||||
await page.goto(base + '/insights/reports')
|
||||
await page.getByRole('heading', { name: 'August 2026', exact: true }).waitFor()
|
||||
|
||||
Reference in New Issue
Block a user