fix(07): WR-06 correct misleading 'remove by reload' comments to describe evaluate(remove)

This commit is contained in:
Lucas Berger
2026-06-11 07:51:45 -04:00
parent 2b745adb29
commit 5322cfc2b0
+4 -3
View File
@@ -206,8 +206,8 @@ test.describe('harness self-validation — injected defects', () => {
'Height must be < 44px with 20px injection (proving measurement tracks rendered geometry)', 'Height must be < 44px with 20px injection (proving measurement tracks rendered geometry)',
).toBeLessThan(44) ).toBeLessThan(44)
// REMOVE the injected style by navigating (page.reload drops inline style tags) // REMOVE the injected style by deleting the <style> element via evaluate
// then re-measure — must be ≥ 44px again // (styleHandle.evaluate(el => el.remove()) — no page reload), then re-measure — must be ≥ 44px again
await styleHandle.evaluate((el) => (el as Element).remove()) await styleHandle.evaluate((el) => (el as Element).remove())
const boxAfterRemoval = await calTab.boundingBox() const boxAfterRemoval = await calTab.boundingBox()
expect( expect(
@@ -247,7 +247,8 @@ test.describe('harness self-validation — injected defects', () => {
`scrollWidth (${overflowWithDefect.scrollWidth}) must be > clientWidth (${overflowWithDefect.clientWidth}) with 2000px injection (proving overflow detection works)`, `scrollWidth (${overflowWithDefect.scrollWidth}) must be > clientWidth (${overflowWithDefect.clientWidth}) with 2000px injection (proving overflow detection works)`,
).toBeGreaterThan(overflowWithDefect.clientWidth) ).toBeGreaterThan(overflowWithDefect.clientWidth)
// REMOVE the injected style — overflow must clear // REMOVE the injected style by deleting the <style> element via evaluate
// (styleHandle.evaluate(el => el.remove()) — no page reload) — overflow must clear
await styleHandle.evaluate((el) => (el as Element).remove()) await styleHandle.evaluate((el) => (el as Element).remove())
const overflowAfterRemoval = await page.evaluate(() => ({ const overflowAfterRemoval = await page.evaluate(() => ({
scrollWidth: document.documentElement.scrollWidth, scrollWidth: document.documentElement.scrollWidth,