@syngrisi/wdio-sdk 3.1.7 → 3.2.0

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 +17 -0
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -158,6 +158,23 @@ await driver.check({
158
158
  });
159
159
  ```
160
160
 
161
+ ### Tolerance Threshold
162
+
163
+ Tolerance allows checks with small visual differences to pass instead of failing. Set `toleranceThreshold` (0-100%) to define the maximum acceptable mismatch percentage.
164
+
165
+ **Per-check** (overrides baseline setting for this check only):
166
+ ```js
167
+ await driver.check({
168
+ checkName: 'Header',
169
+ imageBuffer: screenshot,
170
+ params: {
171
+ toleranceThreshold: 0.5 // Allow up to 0.5% pixel difference
172
+ }
173
+ });
174
+ ```
175
+
176
+ Tolerance can also be configured on the baseline via the Syngrisi UI or API (`PUT /v1/baselines/{id}`). Per-check tolerance always takes priority over baseline tolerance.
177
+
161
178
  ### 4. Stop the Test Session
162
179
 
163
180
  Once all checks are completed, stop the test session.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syngrisi/wdio-sdk",
3
- "version": "3.1.7",
3
+ "version": "3.2.0",
4
4
  "description": "Syngrisi WebdriverIO SDK",
5
5
  "main": "dist/WDIODriver.js",
6
6
  "types": "dist/WDIODriver.d.ts",
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "homepage": "https://github.com/syngrisi/syngrisi/tree/main/packages/wdio-sdk#readme",
40
40
  "dependencies": {
41
- "@syngrisi/core-api": "^3.1.7",
41
+ "@syngrisi/core-api": "^3.2.0",
42
42
  "form-data": "^4.0.5",
43
43
  "got-cjs": "^12.5.4",
44
44
  "loglevel": "^1.9.2",
@@ -64,5 +64,5 @@
64
64
  "typescript": "^5.9.3",
65
65
  "vitest": "^4.0.15"
66
66
  },
67
- "gitHead": "c1ab213f09448a9e08c461a16583285ebb13511c"
67
+ "gitHead": "c76e014ee67256fe4c30fb1d8b8b38c6a9b5d82c"
68
68
  }