tomation 0.0.6 → 0.0.7
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/.vite/manifest.json +1 -1
- package/dist/{dom/actions.d.ts → actions.d.ts} +43 -2
- package/dist/automation.d.ts +137 -0
- package/dist/main.cjs +1 -1
- package/dist/main.d.ts +4 -13
- package/dist/main.js +710 -602
- package/dist/{dsl/ui-element.d.ts → ui-element-builder.d.ts} +13 -1
- package/package.json +1 -1
- package/dist/dsl/actions.d.ts +0 -53
- package/dist/dsl/task.d.ts +0 -2
- package/dist/dsl/test.d.ts +0 -4
- package/dist/dsl/ui-element-filters.d.ts +0 -12
- package/dist/engine/compiler.d.ts +0 -8
- package/dist/engine/events.d.ts +0 -25
- package/dist/engine/runner.d.ts +0 -49
- package/dist/feedback/logger.d.ts +0 -7
- package/dist/tomation.d.ts +0 -9
- /package/dist/{utils/date-utils.d.ts → date-utils.d.ts} +0 -0
- /package/dist/{feedback/ui-utils.d.ts → ui-utils.d.ts} +0 -0
|
@@ -7,6 +7,18 @@ declare class UIElement {
|
|
|
7
7
|
getElementName(): string;
|
|
8
8
|
}
|
|
9
9
|
declare const setDocument: (doc: Document) => void;
|
|
10
|
+
declare const SelectorBuilder: (query: string, filterFn?: ((value: HTMLElement, index: number, array: readonly HTMLElement[]) => Boolean) | undefined) => (root?: Document, postProcess?: ((elem: HTMLElement) => HTMLElement) | undefined) => HTMLElement;
|
|
11
|
+
declare const setFilterLogs: (enabled: boolean) => void;
|
|
12
|
+
declare const classIs: (className: string) => (elem: HTMLElement) => boolean;
|
|
13
|
+
declare const classIncludes: (className: string) => (elem: HTMLElement) => boolean;
|
|
14
|
+
declare const innerTextIs: (text: string) => (elem: HTMLElement) => boolean;
|
|
15
|
+
declare const innerTextContains: (text: string) => (elem: HTMLElement) => boolean;
|
|
16
|
+
declare const titleIs: (text: string) => (elem: HTMLElement) => boolean;
|
|
17
|
+
declare const placeholderIs: (text: string) => (elem: HTMLElement) => boolean;
|
|
18
|
+
declare const isFirstElement: () => (elem: HTMLElement, index: number) => boolean;
|
|
19
|
+
declare const elementIndexIs: (index: number) => (elem: HTMLElement, elemIndex: number) => boolean;
|
|
20
|
+
declare const firstChildTextIs: (text: string) => (elem: HTMLElement) => boolean;
|
|
21
|
+
declare const and: (conditions: any[]) => (elem: HTMLElement, elemIndex: number) => boolean;
|
|
10
22
|
declare const is: {
|
|
11
23
|
DIV: {
|
|
12
24
|
where: (filterFn?: ((value: HTMLElement, index: number, array: readonly HTMLElement[]) => Boolean) | undefined) => {
|
|
@@ -271,4 +283,4 @@ declare const is: {
|
|
|
271
283
|
as: (uiElementId: string) => UIElement;
|
|
272
284
|
};
|
|
273
285
|
};
|
|
274
|
-
export { UIElement, is,
|
|
286
|
+
export { setDocument, UIElement, SelectorBuilder, is, classIs, classIncludes, innerTextIs, innerTextContains, titleIs, placeholderIs, isFirstElement, elementIndexIs, firstChildTextIs, and, setFilterLogs };
|
package/package.json
CHANGED
package/dist/dsl/actions.d.ts
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { UIElement } from "./ui-element";
|
|
2
|
-
import { KEY_MAP } from '../dom/actions';
|
|
3
|
-
declare const Click: (uiElement: UIElement) => void;
|
|
4
|
-
declare const Assert: (uiElement: UIElement) => {
|
|
5
|
-
textIs: (text: string) => void;
|
|
6
|
-
containsText: (text: string) => void;
|
|
7
|
-
valueIs: (value: string) => void;
|
|
8
|
-
exists: () => void;
|
|
9
|
-
notExists: () => void;
|
|
10
|
-
};
|
|
11
|
-
declare const Select: (value: string) => {
|
|
12
|
-
in: (uiElement: UIElement) => void;
|
|
13
|
-
};
|
|
14
|
-
declare const Type: (value: string) => {
|
|
15
|
-
in: (uiElement: UIElement) => void;
|
|
16
|
-
};
|
|
17
|
-
declare const ClearValue: () => {
|
|
18
|
-
in: (uiElement: UIElement) => void;
|
|
19
|
-
};
|
|
20
|
-
declare const PressEscKey: () => {
|
|
21
|
-
in: (uiElement: UIElement) => void;
|
|
22
|
-
};
|
|
23
|
-
declare const PressDownKey: () => {
|
|
24
|
-
in: (uiElement: UIElement) => void;
|
|
25
|
-
};
|
|
26
|
-
declare const PressTabKey: () => {
|
|
27
|
-
in: (uiElement: UIElement) => void;
|
|
28
|
-
};
|
|
29
|
-
declare const PressEnterKey: () => {
|
|
30
|
-
in: (uiElement: UIElement) => void;
|
|
31
|
-
};
|
|
32
|
-
declare const PressKey: (key: KEY_MAP) => {
|
|
33
|
-
in: (uiElement: UIElement) => void;
|
|
34
|
-
};
|
|
35
|
-
declare const TypePassword: (value: string) => {
|
|
36
|
-
in: (uiElement: UIElement) => void;
|
|
37
|
-
};
|
|
38
|
-
declare const UploadFile: (file: File) => {
|
|
39
|
-
in: (uiElement: UIElement) => void;
|
|
40
|
-
};
|
|
41
|
-
declare const SaveValue: (uiElement: UIElement) => {
|
|
42
|
-
in: (memorySlotName: string) => void;
|
|
43
|
-
};
|
|
44
|
-
declare const Wait: {
|
|
45
|
-
(miliseconds: number): void;
|
|
46
|
-
untilElement(uiElement: UIElement): {
|
|
47
|
-
isRemoved: () => void;
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
declare const Pause: () => void;
|
|
51
|
-
declare const ManualTask: (description: string) => void;
|
|
52
|
-
declare const ReloadPage: () => void;
|
|
53
|
-
export { Click, Assert, Select, Type, ClearValue, PressEscKey, PressDownKey, PressTabKey, PressEnterKey, PressKey, TypePassword, UploadFile, SaveValue, Wait, Pause, ManualTask, ReloadPage };
|
package/dist/dsl/task.d.ts
DELETED
package/dist/dsl/test.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
declare const setFilterLogs: (enabled: boolean) => void;
|
|
2
|
-
declare const classIs: (className: string) => (elem: HTMLElement) => boolean;
|
|
3
|
-
declare const classIncludes: (className: string) => (elem: HTMLElement) => boolean;
|
|
4
|
-
declare const innerTextIs: (text: string) => (elem: HTMLElement) => boolean;
|
|
5
|
-
declare const innerTextContains: (text: string) => (elem: HTMLElement) => boolean;
|
|
6
|
-
declare const titleIs: (text: string) => (elem: HTMLElement) => boolean;
|
|
7
|
-
declare const placeholderIs: (text: string) => (elem: HTMLElement) => boolean;
|
|
8
|
-
declare const isFirstElement: () => (elem: HTMLElement, index: number) => boolean;
|
|
9
|
-
declare const elementIndexIs: (index: number) => (elem: HTMLElement, elemIndex: number) => boolean;
|
|
10
|
-
declare const firstChildTextIs: (text: string) => (elem: HTMLElement) => boolean;
|
|
11
|
-
declare const and: (conditions: any[]) => (elem: HTMLElement, elemIndex: number) => boolean;
|
|
12
|
-
export { classIs, classIncludes, innerTextIs, innerTextContains, titleIs, placeholderIs, isFirstElement, elementIndexIs, firstChildTextIs, and, setFilterLogs, };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { AbstractAction, Action } from "~/dom/actions";
|
|
2
|
-
export declare const AutomationCompiler: {
|
|
3
|
-
init: (startAction: Action) => void;
|
|
4
|
-
addAction: (action: AbstractAction) => void;
|
|
5
|
-
compileAction: (action: Action) => void;
|
|
6
|
-
getCurrentAction: () => Action;
|
|
7
|
-
getIsCompiling: () => boolean;
|
|
8
|
-
};
|
package/dist/engine/events.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
declare enum EVENT_NAMES {
|
|
2
|
-
ACTION_UPDATE = "tomation-action-update",
|
|
3
|
-
SAVE_VALUE = "tomation-save-value",
|
|
4
|
-
REGISTER_TEST = "tomation-register-test",
|
|
5
|
-
TEST_STARTED = "tomation-test-started",
|
|
6
|
-
TEST_PASSED = "tomation-test-passed",
|
|
7
|
-
TEST_FAILED = "tomation-test-failed",
|
|
8
|
-
TEST_END = "tomation-test-end",
|
|
9
|
-
TEST_STOP = "tomation-test-stop",
|
|
10
|
-
TEST_PAUSE = "tomation-test-pause",
|
|
11
|
-
TEST_PLAY = "tomation-test-play",
|
|
12
|
-
USER_ACCEPT = "tomation-user-accept",
|
|
13
|
-
USER_REJECT = "tomation-user-reject",
|
|
14
|
-
SESSION_INIT = "tomation-session-init"
|
|
15
|
-
}
|
|
16
|
-
type AutomationEventHandlerType = ((action?: any) => void);
|
|
17
|
-
declare class EventDispatcher {
|
|
18
|
-
events: Map<EVENT_NAMES, Array<AutomationEventHandlerType>>;
|
|
19
|
-
constructor();
|
|
20
|
-
on(eventName: EVENT_NAMES, callback: AutomationEventHandlerType): void;
|
|
21
|
-
off(eventName: EVENT_NAMES, callback: AutomationEventHandlerType): void;
|
|
22
|
-
dispatch(eventName: EVENT_NAMES, data?: any): void;
|
|
23
|
-
}
|
|
24
|
-
declare const AutomationEvents: EventDispatcher;
|
|
25
|
-
export { EVENT_NAMES, AutomationEvents };
|
package/dist/engine/runner.d.ts
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { AbstractAction, Action } from "~/dom/actions";
|
|
2
|
-
import { UIUtils } from "~/feedback/ui-utils";
|
|
3
|
-
declare enum TestSpeed {
|
|
4
|
-
SLOW = 2000,
|
|
5
|
-
NORMAL = 1000,
|
|
6
|
-
FAST = 200
|
|
7
|
-
}
|
|
8
|
-
declare enum TestPlayStatus {
|
|
9
|
-
PLAYING = "Playing",
|
|
10
|
-
STOPPED = "Stopped",
|
|
11
|
-
PAUSED = "Paused"
|
|
12
|
-
}
|
|
13
|
-
declare enum RunMode {
|
|
14
|
-
NORMAL = "Normal",
|
|
15
|
-
STEPBYSTEP = "Step By Step"
|
|
16
|
-
}
|
|
17
|
-
declare class Automation {
|
|
18
|
-
private _document;
|
|
19
|
-
debug: Boolean;
|
|
20
|
-
private _uiUtils;
|
|
21
|
-
speed: TestSpeed;
|
|
22
|
-
status: TestPlayStatus;
|
|
23
|
-
runMode: RunMode;
|
|
24
|
-
currentActionCallback: ((action: AbstractAction) => {}) | undefined;
|
|
25
|
-
currentAction: AbstractAction | undefined;
|
|
26
|
-
constructor(window: Window);
|
|
27
|
-
get document(): Document;
|
|
28
|
-
get uiUtils(): UIUtils;
|
|
29
|
-
get isStepByStepMode(): boolean;
|
|
30
|
-
get isStopped(): boolean;
|
|
31
|
-
get isPlaying(): boolean;
|
|
32
|
-
get isPaused(): boolean;
|
|
33
|
-
pause(): void;
|
|
34
|
-
continue(): void;
|
|
35
|
-
next(): void;
|
|
36
|
-
stop(): void;
|
|
37
|
-
retryAction(): void;
|
|
38
|
-
skipAction(): void;
|
|
39
|
-
saveCurrentAction(callback: (action: AbstractAction) => {}, action: AbstractAction): void;
|
|
40
|
-
setDebug(value: boolean): void;
|
|
41
|
-
}
|
|
42
|
-
declare let AutomationInstance: Automation;
|
|
43
|
-
declare const Setup: (window: Window, tests?: Array<any>) => Automation;
|
|
44
|
-
declare function start(startAction: Action): Promise<void>;
|
|
45
|
-
declare const AutomationRunner: {
|
|
46
|
-
start: typeof start;
|
|
47
|
-
readonly running: boolean;
|
|
48
|
-
};
|
|
49
|
-
export { AutomationRunner, TestPlayStatus, TestSpeed, RunMode, Setup, AutomationInstance };
|
package/dist/tomation.d.ts
DELETED
|
File without changes
|
|
File without changes
|