@testivai/witness-selenium 0.3.5 → 0.3.6

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 +13 -2
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @testivai/witness-selenium
2
2
 
3
- Selenium WebDriver adapter for [TestivAI Witness](https://github.com/testivai/testivai-oss) — local-first visual regression testing with pixel + DOM comparison. No cloud account, nothing uploaded.
3
+ Selenium WebDriver adapter for [TestivAI Witness](https://github.com/testivai/testivai-oss) — local-first visual regression testing with pixel, DOM and computed-style comparison. No account, nothing uploaded.
4
4
 
5
5
  Shares baselines, tolerances, the HTML report, and the PR approval flow with every other TestivAI adapter (Playwright, WebdriverIO, Python, Java) through one on-disk contract.
6
6
 
@@ -38,12 +38,23 @@ await testivai.witness(driver, 'pricing', {
38
38
  ignoreSelectors: ['.live-chat', '[data-testid="ad"]'], // hidden from pixels AND the DOM snapshot
39
39
  variant: 'firefox', // baselines keyed as pricing__firefox
40
40
  stabilize: false, // skip animation-freeze + font wait for this capture
41
- skipDom: true, // pixel diff only, no noise hint
41
+ skipDom: true, // no DOM diff, noise hint or style check
42
42
  });
43
43
  ```
44
44
 
45
45
  Global settings (thresholds, tolerances, `ignoreSelectors`) live in `.testivai/config.json` — see the [main docs](https://github.com/testivai/testivai-oss/tree/main/docs).
46
46
 
47
+ ## DOM and style check
48
+
49
+ Each capture writes `dom.html` and `elements.json` (each element's box and computed-style digest) next to the screenshot. When pixels differ and the DOM is identical, the report reads:
50
+
51
+ - computed styles identical, diff small and scattered → likely render noise (anti-aliasing, font hinting): likely, not proven;
52
+ - computed styles identical, but the diff concentrated in one area or over 1% of pixels → not noise: a bad capture or a change the style check does not cover (size, overflow, transform, images), so compare the images;
53
+ - computed styles differ → a style-only change, which is real, with the restyled elements named;
54
+ - styles not compared (no element map on one side, e.g. `skipElementMap: true` or a blocked collector script) → could be render noise or a stylesheet-only change, so compare the images before approving.
55
+
56
+ All of these stay `changed` unless you configure a pass criterion; `noiseAutoPass` passes only the first.
57
+
47
58
  ## Full-page screenshots
48
59
 
49
60
  - **Chrome / Edge** — true full-page capture via CDP (`captureBeyondViewport`), the same mechanism Playwright uses. Automatic; nothing to configure.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testivai/witness-selenium",
3
- "version": "0.3.5",
3
+ "version": "0.3.6",
4
4
  "description": "Selenium WebDriver adapter for TestivAI Witness — local-first visual regression with pixel + DOM comparison",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -49,7 +49,7 @@
49
49
  }
50
50
  },
51
51
  "dependencies": {
52
- "@testivai/witness": "2.1.1"
52
+ "@testivai/witness": "2.2.0"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@types/jest": "^30.0.0",