From 36f2652648351140e4b5e9f8243cd82f74b40d4c Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 16 Sep 2026 17:36:55 +0200 Subject: [PATCH] test(e2e): the browser proves the slide count reaches sixty 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. --- e2e/tests/my-resources.spec.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/e2e/tests/my-resources.spec.js b/e2e/tests/my-resources.spec.js index dedfea06..10e766e0 100644 --- a/e2e/tests/my-resources.spec.js +++ b/e2e/tests/my-resources.spec.js @@ -246,6 +246,21 @@ test.describe('My Resources', () => { 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 }) => { const sent = await stub(page); await openTab(page);