test: restore lazy split mutation coverage

Issue: #337
User-Visible: no
This commit is contained in:
Matysh
2026-08-28 05:40:28 +00:00
committed by claude[bot]
parent bd82a6709e
commit 165dabc5d7
2 changed files with 26 additions and 3 deletions
+23
View File
@@ -192,6 +192,29 @@ await settle();
await page.waitForTimeout(550);
out.outsideReleaseEndedDrag = await page.evaluate(() => window.__card._tabDrag === null);
out.outsideReleaseDidNotWrite = await writeCount() === writesBeforeOutside;
// Exercise the window-level release fallback independently. Real mouse input
// normally grants pointer capture, which would route pointerup back to the
// source tab and let a missing window listener pass this regression.
const fallbackIds = await ids();
const writesBeforeFallback = await writeCount();
await holdDrag(fallbackIds.at(-1), fallbackIds[0]);
out.outsideFallbackReleasedCapture = await page.evaluate(() => {
const c = window.__card;
const drag = c._tabDrag;
const source = [...c.renderRoot.querySelectorAll('[data-hp="space-tab"]')]
.find((tab) => tab.dataset.id === drag?.id);
if (!source || !drag || !source.hasPointerCapture(drag.pointerId)) return false;
source.releasePointerCapture(drag.pointerId);
return !source.hasPointerCapture(drag.pointerId);
});
await page.mouse.move(stagePoint.x, stagePoint.y, { steps: 3 });
await page.mouse.up();
await settle();
await page.waitForTimeout(550);
out.outsideFallbackReleaseEndedDrag = await page.evaluate(() => window.__card._tabDrag === null);
out.outsideFallbackReleaseDidNotWrite = await writeCount() === writesBeforeFallback;
const activeBeforeRecovery = await page.evaluate(() => window.__card._space);
const recoveryTarget = (await ids()).find((id) => id !== activeBeforeRecovery);
const recoveryPoint = await tabPoint(recoveryTarget);
+3 -3
View File
@@ -3330,9 +3330,9 @@ const MUTANT_DEFINITIONS = [
because: 'Plan architecture ink is visual chrome; leaving the wall outline at raw SVG units '
+ 'makes it five times thinner on a 1 cm grid (#239)',
patches: [{
file: 'src/houseplan-card.ts',
find: ' stroke="${stroke}" stroke-width="${gridVisualUnits(0.6, this._cellCm)}"',
replace: ' stroke="${stroke}" stroke-width="0.6"',
file: 'src/styles/plan.styles.ts',
find: ' stroke-width: calc(0.6px * var(--hp-cell-visual-scale, 1));',
replace: ' stroke-width: 0.6px;',
}],
},
{