@wdio/browserstack-service 9.35.0 → 9.35.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.
- package/build/accessibility-handler.d.ts +6 -0
- package/build/cleanup.js +2 -2
- package/build/cli/modules/accessibilityModule.d.ts +23 -2
- package/build/index.js +114 -16
- package/build/service.d.ts +17 -0
- package/package.json +1 -1
|
@@ -12,8 +12,8 @@ export default class AccessibilityModule extends BaseModule {
|
|
|
12
12
|
isNonBstackA11y: boolean;
|
|
13
13
|
accessibilityConfig: Accessibility;
|
|
14
14
|
static MODULE_NAME: string;
|
|
15
|
-
accessibilityMap: Map<
|
|
16
|
-
LOG_DISABLED_SHOWN: Map<
|
|
15
|
+
accessibilityMap: Map<string, boolean>;
|
|
16
|
+
LOG_DISABLED_SHOWN: Map<string, boolean>;
|
|
17
17
|
testMetadata: Record<string, {
|
|
18
18
|
[key: string]: unknown;
|
|
19
19
|
}>;
|
|
@@ -22,6 +22,27 @@ export default class AccessibilityModule extends BaseModule {
|
|
|
22
22
|
constructor(accessibilityConfig: Accessibility, isNonBstackA11y: boolean);
|
|
23
23
|
onHookStart(args: Record<string, unknown>): Promise<void>;
|
|
24
24
|
onHookEnd(): Promise<void>;
|
|
25
|
+
/**
|
|
26
|
+
* browser.reloadSession() hands the worker a NEW session id while the driver object, the
|
|
27
|
+
* wrapped commands and the currently running test all stay exactly the same. The scan gate
|
|
28
|
+
* is keyed on the session id, so the entry registered for the old id is orphaned the moment
|
|
29
|
+
* the reload lands: every command issued for the rest of that test looks up a key that does
|
|
30
|
+
* not exist and is silently not scanned. Nothing re-registers until the NEXT onBeforeTest,
|
|
31
|
+
* so a test that reloads mid-way loses all coverage after the reload.
|
|
32
|
+
*
|
|
33
|
+
* Migrating the entry rather than re-deriving it preserves whatever the gate currently says,
|
|
34
|
+
* including a stopA11yScanning() the user called before reloading.
|
|
35
|
+
*/
|
|
36
|
+
onSessionReload(oldSessionId: string, newSessionId: string): void;
|
|
37
|
+
/**
|
|
38
|
+
* The session id as of RIGHT NOW, read from framework state rather than captured.
|
|
39
|
+
*
|
|
40
|
+
* Anything installed on the driver — the scanning toggles, the results getters — outlives the
|
|
41
|
+
* session it was created in, because `browser.reloadSession()` swaps the session underneath a
|
|
42
|
+
* driver object that carries on unchanged. A captured id makes those closures address a
|
|
43
|
+
* session that has ended, while `commandWrapper` re-reads state and addresses the live one.
|
|
44
|
+
*/
|
|
45
|
+
private currentSessionId;
|
|
25
46
|
onBeforeExecute(): Promise<void>;
|
|
26
47
|
private commandWrapper;
|
|
27
48
|
onBeforeTest(args: Record<string, unknown>): Promise<void>;
|