test_a_test_s_slices_are_playable¶
Tests › tests/test_wiki_testslices.py
What this test is for
Why it exists
W-6 (owner review 2026-11-22): "tests are not playable". The exercises section carries the player's controls and loads `clew-views.js`, whose slice player steps through the steps the test RAN (`g.st.ex`), in order, paced to reading speed like the flow player.
Given
monkeypatch.setattr(slices, "slice_svg", lambda flow, cut: "<svg class='seq'/>")page = SimpleNamespace(name="flow-a", title="a", steps=4, flow=None)
2 more
html = testpages._exercises("t", {"slices": {"t": [(page, SimpleNamespace(exercised=(1, 2)))]}})views = (Path(clew.wiki.__file__).parent / "themes/clew/static/clew-views.js").read_text()
When
- —
Then
- ✓ html contains 'data-slice-control="play"'
- ✓ html contains 'data-slice-control="step"'
- ✓ html contains "data-flow-speed"
- ✓ html contains "_static/clew-views.js"
- ✓ views contains "WPM = 238"
- ✓ views contains "g.st.ex"
What it exercises
The parts of the system's flows this test ran, measured by per-test coverage: lit steps ran in this test, dimmed ones did not, and ▶ marks where the test called in. Each title opens the whole flow with these steps lit.
Build this wiki from the index · 5 of 400 steps
… 332 earlier steps
… 59 later steps
tests/test_wiki_testslices.py:206 · its file's page
What it checks (3)
assert 'data-slice-control="play"' in html and 'data-slice-control="step"' in htmlobserves_exercisesviahtmlassert "data-flow-speed" in html and "_static/clew-views.js" in htmlobserves_exercisesviahtmlassert "WPM = 238" in views and "g.st.ex" in viewsnot attributed
Where the product reaches it
build_wiki→_build_site→test_pages→_exercises(flow)
Call flow
What it reaches
Each row runs from this test, through the calls it makes, to the code a requirement names. If that code breaks, the test's checks are what should catch it. Reaching is not proving: a check only proves what it observes. No mutation records were given, so these rows say what the test REACHES.
Also reaches 1 requirement
Its run touches their code; that is reach, not proof.
- REQ-DDB-WIKI-041 measured