Skip to content

Commit 947aea3

Browse files
test(mcp): retarget the step-number selector at the brand ramp
`numbersIn` located step markers by grepping the rendered markup for `border-violet-600`. Widgets now paint accents with the tenant brand ramp, so that class no longer exists and the matcher returned [] — the assertion failed even though step numbering (the #561 regression this guards) is unchanged. Anchor on `border-[var(--brand-600)]` instead, which follows the accent rather than a fixed hue. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017sLtN12VfnLziCpst3Pfo2
1 parent b494d52 commit 947aea3

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tests/unit/mcp-lesson-mdx.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,11 @@ describe('LessonBody', () => {
134134
' <Step title="Three">c</Step>',
135135
'</Steps>',
136136
].join('\n')
137+
// The step marker is the only element carrying the brand border colour.
138+
// It was `border-violet-600` until widgets moved to the tenant brand ramp
139+
// (`--brand-*`), so this selector tracks the accent, not a fixed hue.
137140
const numbersIn = (markup: string) =>
138-
[...markup.matchAll(/border-violet-600[^>]*>(\d+)</g)].map((m) => m[1])
141+
[...markup.matchAll(/border-\[var\(--brand-600\)\][^>]*>(\d+)</g)].map((m) => m[1])
139142

140143
// Rendering the same content twice must not drift: a counter incremented
141144
// during render double-counts under React's development double-invoke and

0 commit comments

Comments
 (0)