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.
This commit is contained in:
parent
1a491d7367
commit
36f2652648
1 changed files with 15 additions and 0 deletions
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue