docs(6209): lesson links, design roles, version readout and endpoint, timestamp filters, settings defaults, opened ledger, surfaces
Eight more test files state their properties without issue, milestone and rule numbers or dated regressions. The version tests describe what folding the channel into the version breaks instead of the date it did; the surface registry and settings-defaults tests state that floors move rather than quoting the decision that made them move. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
"""The starter role set (#2349).
|
||||
"""The starter role set.
|
||||
|
||||
The premise: a literal gets written when there is no role to reach for. This
|
||||
codebase demonstrated it — the house style had no "text on a filled colour"
|
||||
role, so 76 call sites wrote `color: #fff` (#2275). Naming the roles at
|
||||
creation removes the occasion.
|
||||
The premise: a literal gets written when there is no role to reach for. A
|
||||
house style with no "text on a filled colour" role collects `color: #fff` at
|
||||
every call site that needs one. Naming the roles at creation removes the
|
||||
occasion.
|
||||
|
||||
The tests that matter here are about the BOUNDARY, not the content. Roles ship
|
||||
with the product; values never do. A default palette would be one operator's
|
||||
taste shipped as product code (rule #115), and it would be very easy to add by
|
||||
taste shipped as product code, and it would be very easy to add by
|
||||
accident while "being helpful".
|
||||
"""
|
||||
import re
|
||||
@@ -28,9 +28,8 @@ def test_no_role_carries_a_VALUE():
|
||||
def _colour_literals(text: str) -> list[str]:
|
||||
"""Hex colours in `text`, NOT counting issue references.
|
||||
|
||||
`#2275` is four hex-valid digits and also how this codebase cites an issue —
|
||||
so the naive pattern flags its own documentation, which is the third time
|
||||
that has happened here (#2353). A real colour either contains a letter
|
||||
`#2275` is four hex-valid digits and also how an issue is cited — so the
|
||||
naive pattern flags documentation. A real colour either contains a letter
|
||||
a–f or is a full 6/8-digit value; an all-decimal 3- or 4-digit match is an
|
||||
issue number.
|
||||
"""
|
||||
@@ -64,7 +63,7 @@ def test_the_colour_check_does_not_flag_issue_references():
|
||||
|
||||
|
||||
def test_every_group_is_individually_selectable():
|
||||
"""Operator's call: one flat list, all skippable. An install that wants
|
||||
"""One flat list, all skippable. An install that wants
|
||||
three tokens must be able to get three."""
|
||||
only_text = roles.starter_tokens(["text"])
|
||||
assert {r["group_name"] for r in only_text} == {"text"}
|
||||
@@ -99,7 +98,7 @@ def test_text_on_action_is_in_the_starter_set():
|
||||
"""The specific role whose absence produced 76 literals. It is separate
|
||||
from text-primary on purpose: the surfaces it sits on do not change with
|
||||
the mode, while the page does — so reusing text-primary there passes in
|
||||
dark and fails contrast in light (#2275)."""
|
||||
dark and fails contrast in light."""
|
||||
names = {r["name"] for r in roles.starter_tokens(["text"])}
|
||||
assert "--ds-text-on-action" in names
|
||||
assert "--ds-text-primary" in names
|
||||
|
||||
Reference in New Issue
Block a user