Files
Imhotep/packages/imhotep-playwright
John Dvorak 1a8f308f71 refactor: remove global mutable state — registry guard, compat warning, stats
predicates.ts: Replace defaultPredicatesRegistered boolean guard with
  sentinel predicate check inside the registry. registerDefaultPredicates()
  is now always safe to call — no module-scope flag that can drift out
  of sync with the actual registry state. clearPredicateRegistry() no
  longer needs to manually reset a flag.

extraction.ts:
  - Replace compatibilityWarningEmitted process-singleton boolean with
    WeakSet<ImhotepUi> (warnedUis). Each ImhotepUi instance now gets its
    own compatibility warning, fixing the bug where two pages would share
    a single warning gate.
  - Export resetExtractionPathStats() for test isolation of fast-path
    and CDP fallback counters.

598 SDK + 3 conformance + 57 E2E = 658 tests pass.
2026-05-22 13:52:09 -07:00
..

imhotep-playwright

Playwright integration layer for Imhotep. Provides page wrapping, CDP-backed geometry extraction, runtime pooling, property-based test runners, renderer adapters, and preset assertion contracts.

Key Exports

Export Description
imhotep(page, opts) Attach Imhotep to a Playwright page
imhotepComponent(id, opts) Property-run entry for rendered components
imhotepStory(url, opts) Property-run entry for Storybook stories
imhotepFixture(path, opts) Property-run entry for fixture files
test, expect, imhotepFixtures Playwright test fixtures
ContextPool, PagePool, Semaphore Pooled runtime for multi-worker testing
touchTarget through modalContainment Reusable assertion presets