test(e2e): the browser proves the slide count reaches sixty
Some checks failed
Forgejo Docker Build / Root app tests (push) Successful in 48s
Forgejo Docker Build / Build Docker image (push) Successful in 6s
Forgejo Docker Build / End-to-end (browser) (push) Failing after 7s

The caps were raised to the schema's own limit, so the suite asserts it where a
person would: the form's max is 60, and 60 typed reaches the route as '60'
rather than being clamped back. 36 passed on the rebuilt stack.
This commit is contained in:
Daniel 2026-09-16 17:36:55 +02:00
parent 1a491d7367
commit 36f2652648

View file

@ -246,6 +246,21 @@ test.describe('My Resources', () => {
await expect(page.locator('#btn-mr-generate')).toBeEnabled(); await expect(page.locator('#btn-mr-generate')).toBeEnabled();
}); });
test('the slide count reaches the schema limit of 60 and is sent as typed', async ({ authedPage: _, page }) => {
// The three caps agree at 60 now — the form, both generation clamps and the
// review ceiling. Thirty was the form's old limit while the review stopped
// at twenty, so a deck in between was written and silently never reviewed.
const sent = await stub(page);
await openTab(page);
const count = page.locator('#mr-slide-count');
await expect(count).toHaveAttribute('max', '60');
await page.fill('#mr-topic', 'a long deck');
await count.fill('60');
await page.click('#btn-mr-generate');
await expect.poll(() => sent.length, { timeout: 15000 }).toBeGreaterThan(0);
expect(sent[0].body.slideCount).toBe('60', 'sent as typed, not clamped back');
});
test('unticking the library is sent as false, not omitted', async ({ authedPage: _, page }) => { test('unticking the library is sent as false, not omitted', async ({ authedPage: _, page }) => {
const sent = await stub(page); const sent = await stub(page);
await openTab(page); await openTab(page);