tomation 0.0.13 → 0.0.14
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/dist/main.cjs +1 -1
- package/dist/main.js +429 -369
- package/dist/src/dom/actions.d.ts +2 -0
- package/dist/src/dsl/test.d.ts +3 -1
- package/dist/src/engine/events.d.ts +35 -5
- package/dist/src/engine/runner.d.ts +4 -1
- package/dist/src/feedback/logger.d.ts +7 -5
- package/package.json +1 -1
|
@@ -39,6 +39,7 @@ declare abstract class AbstractAction {
|
|
|
39
39
|
static notifyActionUpdated(action: AbstractAction): Promise<void>;
|
|
40
40
|
}
|
|
41
41
|
declare class Action extends AbstractAction {
|
|
42
|
+
static useImprovedContinue: boolean;
|
|
42
43
|
name: string;
|
|
43
44
|
stepsFn: (params?: any) => void;
|
|
44
45
|
steps: Array<AbstractAction>;
|
|
@@ -60,6 +61,7 @@ declare class Action extends AbstractAction {
|
|
|
60
61
|
};
|
|
61
62
|
resetAction(): void;
|
|
62
63
|
continue(): Promise<void>;
|
|
64
|
+
continueImproved(): Promise<void>;
|
|
63
65
|
executeAction(): Promise<void>;
|
|
64
66
|
setParams(params?: any): void;
|
|
65
67
|
addStep(action: AbstractAction): void;
|
package/dist/src/dsl/test.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
declare const TestsMap: any;
|
|
2
|
+
declare const InitialActionByTestId: any;
|
|
2
3
|
declare const RunTest: (id: string) => void;
|
|
3
4
|
declare const Test: (id: string, steps: () => void) => void;
|
|
4
|
-
|
|
5
|
+
declare const compileTest: (id: string) => any;
|
|
6
|
+
export { Test, RunTest, TestsMap, InitialActionByTestId, compileTest };
|
|
@@ -13,15 +13,45 @@ declare enum EVENT_NAMES {
|
|
|
13
13
|
USER_REJECT = "tomation-user-reject",
|
|
14
14
|
SESSION_INIT = "tomation-session-init",
|
|
15
15
|
URL_MISMATCH = "tomation-url-mismatch",
|
|
16
|
-
SESSION_CONNECTED = "tomation-session-connected"
|
|
16
|
+
SESSION_CONNECTED = "tomation-session-connected",
|
|
17
|
+
CLEAR_TESTS = "tomation-clear-tests",
|
|
18
|
+
TESTS_LOADED = "tomation-tests-loaded"
|
|
17
19
|
}
|
|
18
|
-
type AutomationEventHandlerType = ((action?:
|
|
20
|
+
type AutomationEventHandlerType = ((action?: unknown) => void | Promise<void>);
|
|
19
21
|
declare class EventDispatcher {
|
|
20
|
-
events
|
|
22
|
+
private events;
|
|
23
|
+
/**
|
|
24
|
+
* Creates an empty in-memory registry of event listeners.
|
|
25
|
+
*/
|
|
21
26
|
constructor();
|
|
22
|
-
|
|
27
|
+
/**
|
|
28
|
+
* Subscribes a callback to an event.
|
|
29
|
+
* Returns a function that can be called to unsubscribe the callback.
|
|
30
|
+
*/
|
|
31
|
+
on(eventName: EVENT_NAMES, callback: AutomationEventHandlerType): () => void;
|
|
32
|
+
/**
|
|
33
|
+
* Removes a specific callback from an event.
|
|
34
|
+
* If the event has no listeners left, its entry is removed.
|
|
35
|
+
*/
|
|
23
36
|
off(eventName: EVENT_NAMES, callback: AutomationEventHandlerType): void;
|
|
24
|
-
|
|
37
|
+
/**
|
|
38
|
+
* Subscribes a callback that will run only once.
|
|
39
|
+
* The callback is automatically removed before it is executed.
|
|
40
|
+
*/
|
|
41
|
+
once(eventName: EVENT_NAMES, callback: AutomationEventHandlerType): () => void;
|
|
42
|
+
/**
|
|
43
|
+
* Dispatches an event payload to all current listeners in registration order.
|
|
44
|
+
* Listener callbacks are awaited sequentially.
|
|
45
|
+
*/
|
|
46
|
+
dispatch(eventName: EVENT_NAMES, data?: unknown): Promise<void>;
|
|
47
|
+
/**
|
|
48
|
+
* Clears listeners for a specific event or for all events if no event is provided.
|
|
49
|
+
*/
|
|
50
|
+
clear(eventName?: EVENT_NAMES): void;
|
|
51
|
+
/**
|
|
52
|
+
* Returns the number of listeners currently registered for an event.
|
|
53
|
+
*/
|
|
54
|
+
listenerCount(eventName: EVENT_NAMES): number;
|
|
25
55
|
}
|
|
26
56
|
declare const AutomationEvents: EventDispatcher;
|
|
27
57
|
export { EVENT_NAMES, AutomationEvents };
|
|
@@ -23,7 +23,8 @@ declare class Automation {
|
|
|
23
23
|
runMode: RunMode;
|
|
24
24
|
currentActionCallback: ((action: AbstractAction) => {}) | undefined;
|
|
25
25
|
currentAction: AbstractAction | undefined;
|
|
26
|
-
|
|
26
|
+
tests: Array<any>;
|
|
27
|
+
constructor(window: Window, tests: Array<any>);
|
|
27
28
|
get document(): Document;
|
|
28
29
|
get uiUtils(): UIUtils;
|
|
29
30
|
get isStepByStepMode(): boolean;
|
|
@@ -38,6 +39,8 @@ declare class Automation {
|
|
|
38
39
|
skipAction(): void;
|
|
39
40
|
saveCurrentAction(callback: (action: AbstractAction) => {}, action: AbstractAction): void;
|
|
40
41
|
setDebug(value: boolean): void;
|
|
42
|
+
setupTests(): void;
|
|
43
|
+
getTests(): Array<any>;
|
|
41
44
|
}
|
|
42
45
|
declare let AutomationInstance: Automation;
|
|
43
46
|
declare const Setup: (window: Window, tests?: Array<any>) => Automation;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export declare const logger: {
|
|
2
|
-
setEnabled(value: boolean)
|
|
3
|
-
log(...args: any[])
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
setEnabled: (value: boolean) => void;
|
|
3
|
+
log: (...args: any[]) => void;
|
|
4
|
+
group: (...args: any[]) => void;
|
|
5
|
+
groupCollapsed: (...args: any[]) => void;
|
|
6
|
+
groupEnd: () => void;
|
|
7
|
+
error: (...args: any[]) => void;
|
|
8
|
+
warn: (...args: any[]) => void;
|
|
7
9
|
};
|