@wdio/browserstack-service 9.36.1 → 9.38.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.
package/README.md CHANGED
@@ -224,6 +224,40 @@ Automatically set the BrowserStack Automate session status (passed/failed).
224
224
  Type: `Boolean`<br />
225
225
  Default: `true`
226
226
 
227
+ ### percy
228
+
229
+ Enable Percy visual testing.
230
+
231
+ Type: `Boolean`<br />
232
+ Default: `false` — except for App Automate runs, where Percy is enabled automatically when `percy` is left unset and `app` is provided.
233
+
234
+ This service runs Percy in **Percy on Automate** mode: it provisions the Percy project for you and captures screenshots server-side from the Automate session. Use `percyCaptureMode` to control when captures happen — no code changes are needed.
235
+
236
+ **Percy web projects.** This service provisions a Percy on Automate project; it does not create web-type Percy projects. To use a Percy **web** project with WebdriverIO, leave `percy` unset in the service options and drive Percy yourself:
237
+
238
+ ```bash
239
+ PERCY_TOKEN=<your web project token> npx percy exec -- npx wdio run wdio.conf.js
240
+ ```
241
+
242
+ calling [`@percy/webdriverio`](https://github.com/percy/percy-webdriverio)'s `percySnapshot` in your specs. BrowserStack Automate and Test Observability continue to work through this service alongside it.
243
+
244
+ > Pin `@percy/webdriverio` below `3.3.3` — that release omits a file its entry point requires and fails to load.
245
+
246
+ ### percyCaptureMode
247
+
248
+ When to capture Percy screenshots automatically.
249
+
250
+ Type: `String`<br />
251
+ Default: `auto`
252
+
253
+ * `auto` — capture on clicks, screenshots, actions and input changes
254
+ * `click` — capture on clicks only
255
+ * `screenshot` — capture on screenshot commands only
256
+ * `testcase` — capture once at the end of each test
257
+ * `manual` — never capture automatically
258
+
259
+ Your Percy project's own capture-mode setting takes precedence over this option when one is configured.
260
+
227
261
  ### buildIdentifier
228
262
 
229
263
  **buildIdentifier** is a unique id to differentiate every execution that gets appended to buildName. Choose your buildIdentifier format from the available expressions:
@@ -1,3 +1,3 @@
1
- export declare const snapshot: (...args: unknown[]) => void;
2
- export declare const screenshot: (...args: unknown[]) => Promise<void>;
3
- export declare const screenshotApp: (...args: unknown[]) => Promise<void>;
1
+ export declare const snapshot: (...args: unknown[]) => Promise<unknown>;
2
+ export declare const screenshot: (...args: unknown[]) => Promise<unknown>;
3
+ export declare const screenshotApp: (...args: unknown[]) => Promise<unknown>;