1bc92e1f7d
CDP protocol fixes:
- session.ts: getDocumentRootNodeId() now pushes {depth:-1} full DOM tree
(was shallow default, causing querySelectorAll to find zero nodes)
- extraction.ts: serialize resolveSelector calls (was concurrent Promise.all,
CDP DOM.querySelectorAll is not safe for concurrent calls on same session)
Topology ID mismatch fixes (critical — backendNodeId vs solver subject ID):
- extraction.ts: add remapTopologyIds() — builds Map<backendNodeId,solverId>
from world.subjects.domNodeId/ids, remaps all 6 topology arrays +
clipping.subjectId + scroll.containerId
- topology.ts: createsStackingContext() now checks contain:paint|layout
(both create stacking contexts per CSS spec, was missing)
- topology.ts: evaluateInStackingContext() handles unary (no reference)
Predicate completeness:
- predicates.ts: 3 new evaluators — intersects, touches, hasGap (indices 31-33)
- predicates.ts: escapeClippingChainOf replaced indeterminate stub with
deterministic 2-ary evaluator (overflow + clip chain + ancestry checks)
- predicates.ts: attachedToScrollContainer arity 1→2, checks reference match
- predicates.ts: 7 aliases + 4 alignment aliases promoted to BUILTIN_PREDICATES
DSL grammar fixes:
- grammar.ts: isKeywordThatCanBePredicate() extended with all missing keywords
- lower-to-canonical.ts: add TopologyAssertion lowering (was silently dropped)
- compiler.ts: add intersects/touches/hasGap relation codes
- validator.ts: add option sets for new predicates
- lexer.ts: add intersects/touches/hasGap token kinds
Safety + infrastructure:
- joins.ts: MAX_CARTESIAN_TUPLES=100,000 guard with descriptive error
- extraction.ts: computeRequiredFacts() registers defaults + broadens topology gate
- package.json: add missing imhotep-state dependency to imhotep-playwright
Tests:
- 9 new predicate tests (intersects, touches, hasGap, escapeClippingChainOf)
- Convert stale separatedFrom/contains GAP tests to working assertions
- Add computeRequiredFacts topology gating tests (public.test.ts)
59 lines
1.3 KiB
JSON
59 lines
1.3 KiB
JSON
{
|
|
"name": "imhotep-playwright",
|
|
"version": "1.1.0",
|
|
"type": "module",
|
|
"license": "MIT",
|
|
"description": "Playwright integration with CDP extraction, runtime pooling, and property runners",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://gitea.com/anomalyco/imhotep.git"
|
|
},
|
|
"engines": {
|
|
"node": ">=18.0.0"
|
|
},
|
|
"main": "dist/index.js",
|
|
"types": "dist/index.d.ts",
|
|
"files": [
|
|
"dist"
|
|
],
|
|
"scripts": {
|
|
"build": "tsc",
|
|
"test": "tsc -p tsconfig.test.json && node --test dist/**/*.test.js",
|
|
"test:integration": "node --test dist/**/*.integration.test.js"
|
|
},
|
|
"exports": {
|
|
".": {
|
|
"types": "./dist/index.d.ts",
|
|
"default": "./dist/index.js"
|
|
}
|
|
},
|
|
"peerDependencies": {
|
|
"@playwright/test": "^1.59.1",
|
|
"playwright": "^1.59.1"
|
|
},
|
|
"dependencies": {
|
|
"imhotep-cdp": "^1.0.0",
|
|
"imhotep-core": "^1.0.0",
|
|
"imhotep-dsl": "^1.0.0",
|
|
"imhotep-solver": "^1.0.0",
|
|
"imhotep-state": "^1.0.0",
|
|
"imhotep-reporter": "^1.0.0"
|
|
},
|
|
"bugs": {
|
|
"url": "https://gitea.com/anomalyco/imhotep/issues"
|
|
},
|
|
"homepage": "https://docs.imhotep.dev",
|
|
"keywords": [
|
|
"testing",
|
|
"visual-testing",
|
|
"layout-testing",
|
|
"relational-testing",
|
|
"playwright",
|
|
"geometry",
|
|
"fol",
|
|
"first-order-logic",
|
|
"e2e",
|
|
"property-testing"
|
|
]
|
|
}
|