feat(generation): resume manual summary jobs

This commit is contained in:
2026-11-23 17:42:30 +01:00
parent 6afe2bdee0
commit 61cc906e0a
22 changed files with 851 additions and 173 deletions

View File

@ -112,7 +112,14 @@ test('admin creates a user who follows a fake company and generates a private su
await test.step('fake scraper and Laya produce an aggregate summary', async () => {
await page.goto(new URL('/', baseURL).href)
const accepted = page.waitForResponse(response => response.url().endsWith('/api/summaries/generate') && response.request().method() === 'POST')
await page.getByRole('button', { name: 'Générer une synthèse' }).click()
const response = await accepted
expect(response.status()).toBe(202)
const { data: job } = await response.json()
expect(job.id).toBeTruthy()
await page.goto(new URL('/preferences', baseURL).href)
await page.goto(new URL('/', baseURL).href)
await expect(page.getByText(fixture.summarySentinel, { exact: false })).toBeVisible({ timeout: 90_000 })
await expect(page.getByText('Langue de cette synthèse : English', { exact: true })).toBeVisible()
for (const forbidden of [fixture.articleTitle, fixture.articleURL, fixture.articleContent, fixture.candidateID]) {