tomation 0.0.11 → 0.0.12

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.
@@ -1,4 +1,4 @@
1
- import { UIElement } from "../dsl/ui-element";
1
+ import { UIElement } from '../dsl/ui-element';
2
2
  interface ActionContext {
3
3
  url: string;
4
4
  beforeHTML: string;
@@ -1,4 +1,4 @@
1
- import { UIElement } from "./ui-element";
1
+ import { UIElement } from './ui-element';
2
2
  import { KEY_MAP } from '../dom/actions';
3
3
  declare const Click: (uiElement: UIElement) => void;
4
4
  declare const Assert: (uiElement: UIElement) => {
@@ -1,2 +1,2 @@
1
- declare const Task: <T>(id: string, steps: (params: T) => void) => (params?: T | undefined) => Promise<void>;
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) => boolean;
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?: ((value: HTMLElement, index: number, array: readonly HTMLElement[]) => Boolean) | undefined) => {
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?: ((value: HTMLElement, index: number, array: readonly HTMLElement[]) => Boolean) | undefined) => {
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?: ((value: HTMLElement, index: number, array: readonly HTMLElement[]) => Boolean) | undefined) => {
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?: ((value: HTMLElement, index: number, array: readonly HTMLElement[]) => Boolean) | undefined) => {
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?: ((value: HTMLElement, index: number, array: readonly HTMLElement[]) => Boolean) | undefined) => {
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,4 +1,4 @@
1
- import { AbstractAction, Action } from "~/dom/actions";
1
+ import { AbstractAction, Action } from '~/dom/actions';
2
2
  export declare const AutomationCompiler: {
3
3
  init: (startAction: Action) => void;
4
4
  addAction: (action: AbstractAction) => void;
@@ -1,5 +1,5 @@
1
- import { AbstractAction, Action } from "~/dom/actions";
2
- import { UIUtils } from "~/feedback/ui-utils";
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,
@@ -0,0 +1,13 @@
1
+ import { classIs, classIncludes, innerTextIs, innerTextContains, titleIs, placeholderIs, isFirstElement, elementIndexIs, firstChildTextIs, and } from './dsl/ui-element-filters';
2
+ import { is, UIElement } from './dsl/ui-element';
3
+ import { Test } from './dsl/test';
4
+ import { tomation } from './tomation';
5
+ import { wait } from './feedback/ui-utils';
6
+ import { Task } from './dsl/task';
7
+ import { Select, Click, Type, TypePassword, ClearValue, Assert, PressEscKey, PressDownKey, PressTabKey, PressKey, PressEnterKey, UploadFile, SaveValue, Wait, Pause, ManualTask, ReloadPage } from './dsl/actions';
8
+ import { default as DateUtils } from './utils/date-utils';
9
+ import { AutomationEvents, EVENT_NAMES } from './engine/events';
10
+ import { AutomationInstance, Setup, TestSpeed } from './engine/runner';
11
+ import { ACTION_STATUS, KEY_MAP } from './dom/actions';
12
+ export default tomation;
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.11",
3
+ "version": "0.0.12",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -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": "^9.0.0"
25
+ "uuid": "^14.0.0"
29
26
  },
30
27
  "devDependencies": {
31
- "@types/jsdom": "^27.0.0",
32
- "@types/node": "^20.19.30",
33
- "@types/uuid": "^9.0.2",
34
- "@vitest/coverage-v8": "^1.5.0",
35
- "@vitest/ui": "^1.5.0",
36
- "jsdom": "^22.1.0",
37
- "prettier": "2.6.2",
38
- "tslib": "^2.4.0",
39
- "typescript": "^4.7.2",
40
- "vite": "^5.2.9",
41
- "vite-plugin-dts": "^3.5.2",
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