Repository navigation
In review
Description
Last of four. Depends on #323, #324 and #325. The feature is built; this issue tests it and writes it down.
What to build
- A spec,
e2e/specs/study-one-paragraph.spec.ts. Copy the login and course setup from an existing spec that plays a Study stage (searche2e/forstage-continue;e2e/lib/has the helpers). Use a stage whose first concept step has at least three blocks; if no fixture course has one, add a lesson to the test fixtures rather than changing a shipped course. Tests:- Off by default:
stage-one-paragraphhasaria-checked="false"and every block of the concept step is visible. - On: click the switch, reload.
aria-checked="true",#stage[data-one-paragraph="true"], the step hasdata-shown="1", its first block is visible and its second is not (toBeHidden()is true forvisibility: hidden). - Each click on
stage-continueraisesdata-shownby one and the step stays on screen; whendata-shownequalsdata-blocks, one more click shows the next step. - Pressing
ArrowRightreveals a block. - Turning the switch off mid-step makes every block visible.
- Use
page.emulateMedia({ reducedMotion: "reduce" })so no test waits on the animation. - Check how
scripts/e2e.shpicks specs and make sure this one runs in CI.
- Off by default:
- Docs:
docs/features.md: in the Study row of the feature table and in the Study bullet near the top, say what the switch does, that it is off until switched on, that it is remembered in the browser, and that a list or table counts as one block.docs/testing.md: in the test-id table, add to the Study stage's rowstage-one-paragraph([aria-checked]),stage[data-one-paragraph], andstage-step[data-blocks][data-shown].- User guides: one sentence where Study is explained to learners (search
docs/for where the Study steps are described;docs/faq.mdif there is a fitting question). Link to the features page instead of repeating it.
CHANGELOG.md: one entry under Unreleased (add the section above the newest release if it is missing), written for the person running the server: Study has a "One paragraph at a time" switch: a concept step shows its first paragraph and each tap drops in the next.
Done when
- The new spec passes in CI and no existing spec changed.
- The three docs places and the changelog say what the app now does, in the docs' own plain style.
Not in this issue
Any change to static/, templates/ or src/. If the spec shows a bug in the feature, say so in the PR and fix it there only if it is a one-line fix; otherwise open an issue. Don't run cargo fmt.
Checks
Run only the new spec locally while writing it (docs/testing.md says how to run one spec). Then push and read gh pr checks.
Metadata
Metadata
Assignees
Labels
No labels
Activity