tomation 0.0.11 → 0.0.13
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 +1279 -1477
- package/dist/{dom → src/dom}/actions.d.ts +1 -1
- package/dist/{dsl → src/dsl}/actions.d.ts +1 -1
- package/dist/{dsl → src/dsl}/task.d.ts +1 -1
- package/dist/{dsl → src/dsl}/ui-element-filters.d.ts +1 -1
- package/dist/{dsl → src/dsl}/ui-element.d.ts +5 -5
- package/dist/{engine → src/engine}/compiler.d.ts +1 -1
- package/dist/{engine → src/engine}/runner.d.ts +2 -2
- package/dist/{main.d.ts → src/main.d.ts} +2 -3
- package/package.json +14 -18
- /package/dist/{dsl → src/dsl}/test.d.ts +0 -0
- /package/dist/{engine → src/engine}/events.d.ts +0 -0
- /package/dist/{feedback → src/feedback}/logger.d.ts +0 -0
- /package/dist/{feedback → src/feedback}/ui-utils.d.ts +0 -0
- /package/dist/{tomation.d.ts → src/tomation.d.ts} +0 -0
- /package/dist/{utils → src/utils}/date-utils.d.ts +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const Task: <T>(id: string, steps: (params: T) => void) => (params?: T
|
|
1
|
+
declare const Task: <T>(id: string, steps: (params: T) => void) => (params?: T) => Promise<void>;
|
|
2
2
|
export { Task };
|
|
@@ -5,7 +5,7 @@ declare const innerTextIs: (text: string) => (elem: HTMLElement) => boolean;
|
|
|
5
5
|
declare const innerTextContains: (text: string) => (elem: HTMLElement) => boolean;
|
|
6
6
|
declare const titleIs: (text: string) => (elem: HTMLElement) => boolean;
|
|
7
7
|
declare const placeholderIs: (text: string) => (elem: HTMLElement) => boolean;
|
|
8
|
-
declare const isFirstElement: () => (elem: HTMLElement, index: number) =>
|
|
8
|
+
declare const isFirstElement: () => (elem: HTMLElement, index: number) => index is 0;
|
|
9
9
|
declare const elementIndexIs: (index: number) => (elem: HTMLElement, elemIndex: number) => boolean;
|
|
10
10
|
declare const firstChildTextIs: (text: string) => (elem: HTMLElement) => boolean;
|
|
11
11
|
declare const and: (conditions: any[]) => (elem: HTMLElement, elemIndex: number) => boolean;
|
|
@@ -9,7 +9,7 @@ declare class UIElement {
|
|
|
9
9
|
declare const setDocument: (doc: Document) => void;
|
|
10
10
|
declare const is: {
|
|
11
11
|
DIV: {
|
|
12
|
-
where: (filterFn?: (
|
|
12
|
+
where: (filterFn?: (value: HTMLElement, index: number, array: readonly HTMLElement[]) => Boolean) => {
|
|
13
13
|
childOf: (parent: UIElement) => {
|
|
14
14
|
/**
|
|
15
15
|
* Tansform the UI element that will be returned
|
|
@@ -53,7 +53,7 @@ declare const is: {
|
|
|
53
53
|
};
|
|
54
54
|
};
|
|
55
55
|
BUTTON: {
|
|
56
|
-
where: (filterFn?: (
|
|
56
|
+
where: (filterFn?: (value: HTMLElement, index: number, array: readonly HTMLElement[]) => Boolean) => {
|
|
57
57
|
childOf: (parent: UIElement) => {
|
|
58
58
|
/**
|
|
59
59
|
* Tansform the UI element that will be returned
|
|
@@ -97,7 +97,7 @@ declare const is: {
|
|
|
97
97
|
};
|
|
98
98
|
};
|
|
99
99
|
INPUT: {
|
|
100
|
-
where: (filterFn?: (
|
|
100
|
+
where: (filterFn?: (value: HTMLElement, index: number, array: readonly HTMLElement[]) => Boolean) => {
|
|
101
101
|
childOf: (parent: UIElement) => {
|
|
102
102
|
/**
|
|
103
103
|
* Tansform the UI element that will be returned
|
|
@@ -141,7 +141,7 @@ declare const is: {
|
|
|
141
141
|
};
|
|
142
142
|
};
|
|
143
143
|
TEXTAREA: {
|
|
144
|
-
where: (filterFn?: (
|
|
144
|
+
where: (filterFn?: (value: HTMLElement, index: number, array: readonly HTMLElement[]) => Boolean) => {
|
|
145
145
|
childOf: (parent: UIElement) => {
|
|
146
146
|
/**
|
|
147
147
|
* Tansform the UI element that will be returned
|
|
@@ -185,7 +185,7 @@ declare const is: {
|
|
|
185
185
|
};
|
|
186
186
|
};
|
|
187
187
|
ELEMENT: (htmlTag: string) => {
|
|
188
|
-
where: (filterFn?: (
|
|
188
|
+
where: (filterFn?: (value: HTMLElement, index: number, array: readonly HTMLElement[]) => Boolean) => {
|
|
189
189
|
childOf: (parent: UIElement) => {
|
|
190
190
|
/**
|
|
191
191
|
* Tansform the UI element that will be returned
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AbstractAction, Action } from
|
|
2
|
-
import { UIUtils } from
|
|
1
|
+
import { AbstractAction, Action } from '../../dom/actions';
|
|
2
|
+
import { UIUtils } from '../../feedback/ui-utils';
|
|
3
3
|
declare enum TestSpeed {
|
|
4
4
|
SLOW = 2000,
|
|
5
5
|
NORMAL = 1000,
|
|
@@ -5,10 +5,9 @@ import { tomation } from './tomation';
|
|
|
5
5
|
import { wait } from './feedback/ui-utils';
|
|
6
6
|
import { Task } from './dsl/task';
|
|
7
7
|
import { Select, Click, Type, TypePassword, ClearValue, Assert, PressEscKey, PressDownKey, PressTabKey, PressKey, PressEnterKey, UploadFile, SaveValue, Wait, Pause, ManualTask, ReloadPage } from './dsl/actions';
|
|
8
|
-
import DateUtils from './utils/date-utils';
|
|
8
|
+
import { default as DateUtils } from './utils/date-utils';
|
|
9
9
|
import { AutomationEvents, EVENT_NAMES } from './engine/events';
|
|
10
|
-
import { AutomationInstance, Setup } from './engine/runner';
|
|
11
|
-
import { TestSpeed } from './engine/runner';
|
|
10
|
+
import { AutomationInstance, Setup, TestSpeed } from './engine/runner';
|
|
12
11
|
import { ACTION_STATUS, KEY_MAP } from './dom/actions';
|
|
13
12
|
export default tomation;
|
|
14
13
|
export { tomation, UIElement, is, classIs, classIncludes, innerTextIs, innerTextContains, titleIs, placeholderIs, isFirstElement, elementIndexIs, firstChildTextIs, and, Test, Task, Click, Assert, Select, Type, TypePassword, ClearValue, PressEscKey, PressDownKey, PressTabKey, PressKey, PressEnterKey, KEY_MAP, UploadFile, SaveValue, Wait, Pause, ManualTask, ReloadPage, DateUtils, AutomationEvents, AutomationInstance, Setup, EVENT_NAMES, TestSpeed, wait, ACTION_STATUS, };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tomation",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
},
|
|
11
11
|
"main": "./dist/main.js",
|
|
12
12
|
"module": "./dist/main.js",
|
|
13
|
-
"types": "./dist/main.d.ts",
|
|
13
|
+
"types": "./dist/src/main.d.ts",
|
|
14
14
|
"files": [
|
|
15
15
|
"dist"
|
|
16
16
|
],
|
|
@@ -21,24 +21,20 @@
|
|
|
21
21
|
"test": "vitest",
|
|
22
22
|
"coverage": "vitest run --coverage"
|
|
23
23
|
},
|
|
24
|
-
"resolutions": {
|
|
25
|
-
"rollup": "2.74.1"
|
|
26
|
-
},
|
|
27
24
|
"dependencies": {
|
|
28
|
-
"uuid": "^
|
|
25
|
+
"uuid": "^14.0.0"
|
|
29
26
|
},
|
|
30
27
|
"devDependencies": {
|
|
31
|
-
"@types/jsdom": "^
|
|
32
|
-
"@types/node": "^
|
|
33
|
-
"@
|
|
34
|
-
"@vitest/
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"vite": "^5.
|
|
41
|
-
"
|
|
42
|
-
"vitest": "^1.5.0"
|
|
28
|
+
"@types/jsdom": "^28.0.1",
|
|
29
|
+
"@types/node": "^25.6.0",
|
|
30
|
+
"@vitest/coverage-v8": "^4.1.5",
|
|
31
|
+
"@vitest/ui": "^4.1.5",
|
|
32
|
+
"jsdom": "^29.1.0",
|
|
33
|
+
"prettier": "3.8.3",
|
|
34
|
+
"tslib": "^2.8.1",
|
|
35
|
+
"typescript": "^6.0.3",
|
|
36
|
+
"vite": "^8.0.10",
|
|
37
|
+
"vite-plugin-dts": "^4.5.4",
|
|
38
|
+
"vitest": "^4.1.5"
|
|
43
39
|
}
|
|
44
40
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|