@a11y-oracle/cypress-plugin 1.3.1 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +18 -0
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -29,6 +29,8 @@ npm install -D @a11y-oracle/cypress-plugin @a11y-oracle/core-engine cypress
29
29
 
30
30
  > **Chrome/Chromium only.** The plugin uses CDP, which is only available in Chrome-family browsers.
31
31
 
32
+ > **⚠️ Stability Notice — Playwright recommended.** The Cypress plugin is functional but has known stability constraints with large test suites. We recommend using [`@a11y-oracle/playwright-plugin`](../playwright-plugin/README.md) for the most reliable experience. See [Known Limitations](#known-limitations) below for details.
33
+
32
34
  ## Setup
33
35
 
34
36
  ### 1. Import Commands
@@ -513,6 +515,22 @@ If you need types in your test files without importing the support file:
513
515
  /// <reference types="@a11y-oracle/cypress-plugin" />
514
516
  ```
515
517
 
518
+ ## Known Limitations
519
+
520
+ ### CDP Resource Accumulation in Long Test Suites
521
+
522
+ Cypress runs the application under test (AUT) inside an iframe within its runner page. To interact with the AUT's accessibility tree, the plugin must create an **isolated execution world** in the AUT frame via `Page.createIsolatedWorld` on every `initA11yOracle()` call. Unlike Playwright — which provides native, first-class CDP sessions — Cypress's iframe architecture means these isolated worlds accumulate browser-side resources that Chrome does not fully reclaim, even after `disposeA11yOracle()` cleans up its own references.
523
+
524
+ **What this means in practice:**
525
+
526
+ - Test suites with many spec files or many tests per file may experience increasing memory pressure over the course of a run.
527
+ - In v1.3.0 and earlier, this caused a deterministic hang after approximately 16 `init`/`dispose` cycles, because `Accessibility.getFullAXTree` would stall when traversing nodes across all accumulated contexts ([#14](https://github.com/a11y-oracle/a11y-oracle/issues/14)).
528
+ - v1.3.1 mitigated the hang by properly destroying isolated worlds on dispose, but the underlying architectural constraint — that Cypress proxies all CDP calls through its runner and manages frame contexts differently than Playwright — remains.
529
+
530
+ **Recommendation:** If you are starting a new project or have the flexibility to choose your E2E framework, use [`@a11y-oracle/playwright-plugin`](../playwright-plugin/README.md). Playwright provides direct CDP session access without iframe indirection, making it inherently more stable and performant for A11y-Oracle's CDP-heavy workflow.
531
+
532
+ If you need to stay on Cypress, the plugin is fully functional — just be aware of these constraints for very large suites.
533
+
516
534
  ## Troubleshooting
517
535
 
518
536
  ### "Could not find the AUT iframe"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@a11y-oracle/cypress-plugin",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "description": "Cypress custom commands for accessibility speech assertions with iframe-aware CDP routing",
5
5
  "license": "MIT",
6
6
  "author": "a11y-oracle",
@@ -45,9 +45,9 @@
45
45
  "cypress": ">=12.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@a11y-oracle/core-engine": "1.3.1",
49
- "@a11y-oracle/keyboard-engine": "1.3.1",
50
- "@a11y-oracle/audit-formatter": "1.3.1",
48
+ "@a11y-oracle/core-engine": "1.3.2",
49
+ "@a11y-oracle/keyboard-engine": "1.3.2",
50
+ "@a11y-oracle/audit-formatter": "1.3.2",
51
51
  "tslib": "^2.3.0"
52
52
  }
53
53
  }