fix(voyage): dashboard reads fm.plan_critic + orchestrator doc-consistency (906f155d, bee33a69)
This commit is contained in:
parent
4910999198
commit
9909ce1066
3 changed files with 30 additions and 1 deletions
|
|
@ -483,6 +483,24 @@ test('voyage-playground.html renderArtifact strips comments before md.render (v4
|
|||
assert.ok(stripIdx > 0 && stripIdx < renderIdx, 'stripUnsafeComments must run before md.render');
|
||||
});
|
||||
|
||||
// v4.3 Step 7 — buildArtifactKeyStat reads fm.plan_critic (not fm.profile)
|
||||
// for the 'plan' key. Regression guard for finding bee33a69.
|
||||
test('voyage-playground.html buildArtifactKeyStat reads fm.plan_critic for plan key (v4.3 Step 7, finding bee33a69)', () => {
|
||||
const text = readFileSync(HTML, 'utf-8');
|
||||
// Locate the buildArtifactKeyStat function body.
|
||||
const fnStart = text.indexOf('function buildArtifactKeyStat');
|
||||
assert.ok(fnStart > 0, 'buildArtifactKeyStat() must exist');
|
||||
// Slice the function body: up to the next top-level closing brace at the same indent.
|
||||
// Use a generous end marker — next `function` declaration that starts a new function.
|
||||
const nextFn = text.indexOf('\n function ', fnStart + 1);
|
||||
const fnEnd = nextFn > 0 ? nextFn : fnStart + 800;
|
||||
const body = text.slice(fnStart, fnEnd);
|
||||
// Positive: fm.plan_critic literal present
|
||||
assert.match(body, /fm\.plan_critic/, 'buildArtifactKeyStat must read fm.plan_critic for the plan key');
|
||||
// Regression: fm.profile must NOT appear inside this function body (was the old field)
|
||||
assert.doesNotMatch(body, /\bfm\.profile\b/, 'fm.profile must not appear inside buildArtifactKeyStat (use fm.plan_critic instead)');
|
||||
});
|
||||
|
||||
// v4.3 Step 3 — sidebar-toggle button must be a sibling of <aside aria-hidden="true">,
|
||||
// not a descendant (finding 09132940 a11y). Hidden-state must not occlude the toggle.
|
||||
test('voyage-playground.html sidebar-toggle is outside aria-hidden region (v4.3 Step 3, finding 09132940)', () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue