fix(07-03): make e2e typecheck pass — add DOM lib to tsconfig.e2e, cast styleHandle el to Element
Playwright transpiles specs without typechecking (esbuild), so layout.spec.ts ran green while `tsc -p tsconfig.e2e.json` failed: page.evaluate(() => document...) callbacks need the DOM lib, and styleHandle.evaluate((el) => el.remove()) typed el as Node (no .remove()). Phase 8 CI runs the typecheck gate, so this would have broken CI. Adds DOM/DOM.Iterable to the e2e tsconfig (also covers 07-04 specs) and casts el to Element. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
f8227855dc
commit
4cd7931c3c
@@ -208,7 +208,7 @@ test.describe('harness self-validation — injected defects', () => {
|
||||
|
||||
// REMOVE the injected style by navigating (page.reload drops inline style tags)
|
||||
// then re-measure — must be ≥ 44px again
|
||||
await styleHandle.evaluate((el) => el.remove())
|
||||
await styleHandle.evaluate((el) => (el as Element).remove())
|
||||
const boxAfterRemoval = await calTab.boundingBox()
|
||||
expect(
|
||||
boxAfterRemoval,
|
||||
@@ -248,7 +248,7 @@ test.describe('harness self-validation — injected defects', () => {
|
||||
).toBeGreaterThan(overflowWithDefect.clientWidth)
|
||||
|
||||
// REMOVE the injected style — overflow must clear
|
||||
await styleHandle.evaluate((el) => el.remove())
|
||||
await styleHandle.evaluate((el) => (el as Element).remove())
|
||||
const overflowAfterRemoval = await page.evaluate(() => ({
|
||||
scrollWidth: document.documentElement.scrollWidth,
|
||||
clientWidth: document.documentElement.clientWidth,
|
||||
|
||||
Reference in New Issue
Block a user