Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion packages/cli/src/phases/execute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,16 @@ async function executeUiTestInner(
}

const mutResult = await scope.evaluate(MUTATION_OBSERVER_STOP_SCRIPT).catch(() => null);
const mutWindowMs = (mutResult?.value as { durationMs?: number } | undefined)?.durationMs ?? 0;
const mutPayload = mutResult?.value as { durationMs?: number; mutations?: Array<{ type?: string; addedCount?: number; removedCount?: number }> } | undefined;
const mutWindowMs = mutPayload?.durationMs ?? 0;
// v0.53: count meaningful (childList) mutations so classifyMissingStateChange
// can distinguish "the action did nothing" from "the action mutated DOM but
// not URL/network/aria/portal". Spoonworks Remove-row case. Threading was
// dropped during PR #268's squash merge; restored here.
const mutations = Array.isArray(mutPayload?.mutations) ? mutPayload.mutations : [];
const domMutationCount = mutations.filter(m =>
(m.addedCount ?? 0) + (m.removedCount ?? 0) > 0,
).length;

const consoleResult = await scope.evaluate(
'(window.__bhConsoleErrors || []).map(e => ({ level: "error", text: e.text, stack: e.stack }))'
Expand Down Expand Up @@ -1232,6 +1241,7 @@ async function executeUiTestInner(
// V24: set the real value instead of hardcoded false, so classifyMissingStateChange sees it.
domErrorTextDetected: postDomErrFound,
mutationObserverWindowMs: mutWindowMs,
domMutationCount,
ariaSnapshot: postAriaSnapshot,
newPortalCount,
};
Expand Down
Loading