From f2783613cff9f2c9d259fc87bd43b808c56188ef Mon Sep 17 00:00:00 2001 From: Sebastian Mahr Date: Thu, 11 Jan 2024 13:34:26 +0100 Subject: [PATCH] docs: add documentation for autoWaitUrlIgnoreRegex --- docs/configuration.md | 9 ++++++++- src/types/wdi5.types.ts | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index f70a45bd..0d6caa16 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -26,7 +26,8 @@ exports.config = { logLevel: "verbose", // [optional] error | verbose | silent, default: "error" skipInjectUI5OnStart: false, // [optional] {boolean}, default: false; true when UI5 is not on the start page, you need to later call .injectUI5() manually waitForUI5Timeout: 15000, // [optional] {number}, default: 15000; maximum waiting time in milliseconds while checking for UI5 availability - btpWorkZoneEnablement: false // [optional] {boolean}, default: false; whether to instruct wdi5 to inject itself in both the SAP Build Workzone, standard edition, shell and app + btpWorkZoneEnablement: false, // [optional] {boolean}, default: false; whether to instruct wdi5 to inject itself in both the SAP Build Workzone, standard edition, shell and app + autoWaitUrlIgnoreRegex: [] // [optional] {string[]}, default: []; Array of regex to ignore certain XHR/Fetch calls wile autowaiting } // ... } @@ -133,6 +134,12 @@ Number in milliseconds (default: `15000`) to wait for UI5-related operations wit Boolean setting to trigger injecting `wdi5` into both the shell and the app when used with the SAP Build Workzone, standard edition. Recommended complement is to also [configure IAS Authentication](authentication?id=sap-cloud-identity-services-identity-authentication): as SAP Build requires its own Identity Provider (most likely provided by using an IAS tenant), you'll have to configure authentication against that as well in `wdi5`. +### `autoWaitUrlIgnoreRegex` + +Ignore list in form of regex. Those will be used to ignore certain XHR/Fetch call from beeing waited for by the OPA5 Waiters. This can be used in combination with longpolling requests to continusly update your app. + +!> Be carefull adding to many requests or to general regex here as this might make the tests more instable by advancing in the test before you expect it. + ## `package.json` Not required, but as a convention, put a `test` or `wdi5` script into your UI5.app's `package.json` to start `wdi5/wdio`. diff --git a/src/types/wdi5.types.ts b/src/types/wdi5.types.ts index 4382c456..e4d952b1 100644 --- a/src/types/wdi5.types.ts +++ b/src/types/wdi5.types.ts @@ -57,7 +57,7 @@ export interface wdi5Config extends WebdriverIO.Config { * Regex for XHR/Fetch requests to be ignored by the auto waiter * Ideal for long polling as this would result in the waiter waiting forever */ - autoWaitUrlIgnoreRegex?: RegExp[] + autoWaitUrlIgnoreRegex?: string[] } capabilities: wdi5Capabilities[] | wdi5MultiRemoteCapability }