8000 Study "One paragraph at a time": e2e spec, docs and changelog · Issue #326 · alexbeeken/skrongle-mini · GitHub
[go: up one dir, main page]

Skip to content

Study "One paragraph at a time": e2e spec, docs and changelog #326

In review

Description

@alexbeeken

Last of four. Depends on #323, #324 and #325. The feature is built; this issue tests it and writes it down.

What to build

  1. A spec, e2e/specs/study-one-paragraph.spec.ts. Copy the login and course setup from an existing spec that plays a Study stage (search e2e/ for stage-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-paragraph has aria-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 has data-shown="1", its first block is visible and its second is not (toBeHidden() is true for visibility: hidden).
    • Each click on stage-continue raises data-shown by one and the step stays on screen; when data-shown equals data-blocks, one more click shows the next step.
    • Pressing ArrowRight reveals 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.sh picks specs and make sure this one runs in CI.
  2. 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 row stage-one-paragraph ([aria-checked]), stage[data-one-paragraph], and stage-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.md if there is a fitting question). Link to the features page instead of repeating it.
  3. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0