@empiricalrun/test-gen 0.31.21 → 0.31.23
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/CHANGELOG.md +15 -0
- package/dist/actions/assert.js +5 -5
- package/dist/actions/click.js +5 -5
- package/dist/actions/fill.js +9 -9
- package/dist/actions/goto.js +5 -5
- package/dist/actions/hover.js +5 -5
- package/dist/actions/next-task.d.ts +2 -2
- package/dist/actions/next-task.js +5 -5
- package/dist/actions/skill.js +5 -5
- package/dist/actions/text-content.js +7 -7
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @empiricalrun/test-gen
|
|
2
2
|
|
|
3
|
+
## 0.31.23
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [0c5e656]
|
|
8
|
+
- @empiricalrun/reporter@0.20.5
|
|
9
|
+
|
|
10
|
+
## 0.31.22
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- c00fd01: fix: move the reason to top in the function calls
|
|
15
|
+
- Updated dependencies [6b596c8]
|
|
16
|
+
- @empiricalrun/reporter@0.20.4
|
|
17
|
+
|
|
3
18
|
## 0.31.21
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/dist/actions/assert.js
CHANGED
|
@@ -29,20 +29,20 @@ const assertTextVisibilityActionGenerator = (page) => {
|
|
|
29
29
|
parameters: {
|
|
30
30
|
type: "object",
|
|
31
31
|
properties: {
|
|
32
|
-
|
|
32
|
+
reason: {
|
|
33
33
|
type: "string",
|
|
34
|
-
description:
|
|
34
|
+
description: constants_1.DEFAULT_ACTION_REASON_PROMPT,
|
|
35
35
|
},
|
|
36
36
|
xpath: {
|
|
37
37
|
type: "string",
|
|
38
38
|
description: "XPath selector to identify the element uniquely and click it. When creating XPATH selector, ensure they are unique and specific enough to select only one element, even if there are multiple elements of the same type (like multiple h1 elements)",
|
|
39
39
|
},
|
|
40
|
-
|
|
40
|
+
css_selector: {
|
|
41
41
|
type: "string",
|
|
42
|
-
description:
|
|
42
|
+
description: "CSS selector to identify the element uniquely and click it. When creating CSS selectors, ensure they are unique and specific enough to select only one element, even if there are multiple elements of the same type (like multiple h1 elements)",
|
|
43
43
|
},
|
|
44
44
|
},
|
|
45
|
-
required: ["
|
|
45
|
+
required: ["reason", "xpath", "css_selector"],
|
|
46
46
|
},
|
|
47
47
|
},
|
|
48
48
|
},
|
package/dist/actions/click.js
CHANGED
|
@@ -31,20 +31,20 @@ const clickActionGenerator = (page) => {
|
|
|
31
31
|
parameters: {
|
|
32
32
|
type: "object",
|
|
33
33
|
properties: {
|
|
34
|
-
|
|
34
|
+
reason: {
|
|
35
35
|
type: "string",
|
|
36
|
-
description:
|
|
36
|
+
description: constants_1.DEFAULT_ACTION_REASON_PROMPT,
|
|
37
37
|
},
|
|
38
38
|
xpath: {
|
|
39
39
|
type: "string",
|
|
40
40
|
description: "XPath selector to identify the element uniquely and click it. When creating XPATH selector, ensure they are unique and specific enough to select only one element, even if there are multiple elements of the same type (like multiple h1 elements)",
|
|
41
41
|
},
|
|
42
|
-
|
|
42
|
+
css_selector: {
|
|
43
43
|
type: "string",
|
|
44
|
-
description:
|
|
44
|
+
description: "CSS selector to identify the element uniquely and click it. When creating CSS selectors, ensure they are unique and specific enough to select only one element, even if there are multiple elements of the same type (like multiple h1 elements)",
|
|
45
45
|
},
|
|
46
46
|
},
|
|
47
|
-
required: ["
|
|
47
|
+
required: ["reason", "xpath", "css_selector"],
|
|
48
48
|
},
|
|
49
49
|
},
|
|
50
50
|
},
|
package/dist/actions/fill.js
CHANGED
|
@@ -34,6 +34,10 @@ const fillActionGenerator = (page, options) => {
|
|
|
34
34
|
parameters: {
|
|
35
35
|
type: "object",
|
|
36
36
|
properties: {
|
|
37
|
+
reason: {
|
|
38
|
+
type: "string",
|
|
39
|
+
description: constants_1.DEFAULT_ACTION_REASON_PROMPT,
|
|
40
|
+
},
|
|
37
41
|
text: {
|
|
38
42
|
type: "string",
|
|
39
43
|
description: "The text to fill the input element with",
|
|
@@ -49,25 +53,21 @@ const fillActionGenerator = (page, options) => {
|
|
|
49
53
|
- Choose the variable name based on the value above.
|
|
50
54
|
- Set variable_name as 'NA' if there is no variable to be used.`,
|
|
51
55
|
},
|
|
52
|
-
css_selector: {
|
|
53
|
-
type: "string",
|
|
54
|
-
description: "CSS selector to identify the element uniquely.When creating CSS selectors, ensure they are unique to the page and specific enough to select only one element.",
|
|
55
|
-
},
|
|
56
56
|
xpath: {
|
|
57
57
|
type: "string",
|
|
58
58
|
description: "XPath selector to identify the element uniquely and click it. When creating XPATH selector, ensure they are unique and specific enough to select only one element, even if there are multiple elements of the same type (like multiple h1 elements)",
|
|
59
59
|
},
|
|
60
|
-
|
|
60
|
+
css_selector: {
|
|
61
61
|
type: "string",
|
|
62
|
-
description:
|
|
62
|
+
description: "CSS selector to identify the element uniquely.When creating CSS selectors, ensure they are unique to the page and specific enough to select only one element.",
|
|
63
63
|
},
|
|
64
64
|
},
|
|
65
65
|
required: [
|
|
66
|
-
"
|
|
66
|
+
"reason",
|
|
67
67
|
"text",
|
|
68
|
-
"
|
|
68
|
+
"variable_name",
|
|
69
69
|
"xpath",
|
|
70
|
-
"
|
|
70
|
+
"css_selector",
|
|
71
71
|
],
|
|
72
72
|
},
|
|
73
73
|
},
|
package/dist/actions/goto.js
CHANGED
|
@@ -30,16 +30,16 @@ const gotoActionGenerator = (page) => {
|
|
|
30
30
|
parameters: {
|
|
31
31
|
type: "object",
|
|
32
32
|
properties: {
|
|
33
|
-
url: {
|
|
34
|
-
type: "string",
|
|
35
|
-
description: "URL to navigate page to",
|
|
36
|
-
},
|
|
37
33
|
reason: {
|
|
38
34
|
type: "string",
|
|
39
35
|
description: constants_1.DEFAULT_ACTION_REASON_PROMPT,
|
|
40
36
|
},
|
|
37
|
+
url: {
|
|
38
|
+
type: "string",
|
|
39
|
+
description: "URL to navigate page to",
|
|
40
|
+
},
|
|
41
41
|
},
|
|
42
|
-
required: ["
|
|
42
|
+
required: ["reason", "url"],
|
|
43
43
|
},
|
|
44
44
|
},
|
|
45
45
|
},
|
package/dist/actions/hover.js
CHANGED
|
@@ -29,20 +29,20 @@ const hoverActionGenerator = (page) => {
|
|
|
29
29
|
parameters: {
|
|
30
30
|
type: "object",
|
|
31
31
|
properties: {
|
|
32
|
-
|
|
32
|
+
reason: {
|
|
33
33
|
type: "string",
|
|
34
|
-
description:
|
|
34
|
+
description: constants_1.DEFAULT_ACTION_REASON_PROMPT,
|
|
35
35
|
},
|
|
36
36
|
xpath: {
|
|
37
37
|
type: "string",
|
|
38
38
|
description: "XPath selector to identify the element uniquely and hover over it. When creating XPATH selector, ensure they are unique and specific enough to select only one element, even if there are multiple elements of the same type (like multiple h1 elements)",
|
|
39
39
|
},
|
|
40
|
-
|
|
40
|
+
css_selector: {
|
|
41
41
|
type: "string",
|
|
42
|
-
description:
|
|
42
|
+
description: "CSS selector to identify the element uniquely and hover over it. When creating CSS selectors, ensure they are unique and specific enough to select only one element, even if there are multiple elements of the same type (like multiple h1 elements)",
|
|
43
43
|
},
|
|
44
44
|
},
|
|
45
|
-
required: ["
|
|
45
|
+
required: ["reason", "xpath", "css_selector"],
|
|
46
46
|
},
|
|
47
47
|
},
|
|
48
48
|
},
|
|
@@ -12,6 +12,10 @@ exports.NextTaskAction = {
|
|
|
12
12
|
parameters: {
|
|
13
13
|
type: "object",
|
|
14
14
|
properties: {
|
|
15
|
+
reason: {
|
|
16
|
+
type: "string",
|
|
17
|
+
description: "explain how this action will help to complete the task. the reason should align with the task provided",
|
|
18
|
+
},
|
|
15
19
|
action: {
|
|
16
20
|
type: "string",
|
|
17
21
|
description: `explain the next action in natural language.
|
|
@@ -19,12 +23,8 @@ The next action should be as atomic as possible, precise and should contain enou
|
|
|
19
23
|
E.g. each click, key press, input, assert should be a separate action.
|
|
20
24
|
Each action should take the task to completion, if not the action is invalid.`,
|
|
21
25
|
},
|
|
22
|
-
reason: {
|
|
23
|
-
type: "string",
|
|
24
|
-
description: "explain how this action will help to complete the task. the reason should align with the task provided",
|
|
25
|
-
},
|
|
26
26
|
},
|
|
27
|
-
required: ["
|
|
27
|
+
required: ["reason", "action"],
|
|
28
28
|
},
|
|
29
29
|
},
|
|
30
30
|
},
|
package/dist/actions/skill.js
CHANGED
|
@@ -73,6 +73,10 @@ const skillActionGenerator = (page, options) => {
|
|
|
73
73
|
parameters: {
|
|
74
74
|
type: "object",
|
|
75
75
|
properties: {
|
|
76
|
+
reason: {
|
|
77
|
+
type: "string",
|
|
78
|
+
description: "explain how this action will help to complete the task. the reason should align with the task provided",
|
|
79
|
+
},
|
|
76
80
|
skill: {
|
|
77
81
|
type: "string",
|
|
78
82
|
enum: availableSkills.map((skill) => skill.testStep),
|
|
@@ -80,12 +84,8 @@ const skillActionGenerator = (page, options) => {
|
|
|
80
84
|
.map((skill) => skill.testStep)
|
|
81
85
|
.join(", ")}`,
|
|
82
86
|
},
|
|
83
|
-
reason: {
|
|
84
|
-
type: "string",
|
|
85
|
-
description: "explain how this action will help to complete the task. the reason should align with the task provided",
|
|
86
|
-
},
|
|
87
87
|
},
|
|
88
|
-
required: ["
|
|
88
|
+
required: ["reason", "skill"],
|
|
89
89
|
},
|
|
90
90
|
},
|
|
91
91
|
},
|
|
@@ -33,24 +33,24 @@ const textContentActionGenerator = (page, options) => {
|
|
|
33
33
|
parameters: {
|
|
34
34
|
type: "object",
|
|
35
35
|
properties: {
|
|
36
|
-
|
|
36
|
+
reason: {
|
|
37
37
|
type: "string",
|
|
38
|
-
description:
|
|
38
|
+
description: constants_1.DEFAULT_ACTION_REASON_PROMPT,
|
|
39
39
|
},
|
|
40
|
-
|
|
40
|
+
variable_name: {
|
|
41
41
|
type: "string",
|
|
42
|
-
description: "
|
|
42
|
+
description: "name of the variable to store the text content. The variable name should describe what the text content is about.",
|
|
43
43
|
},
|
|
44
44
|
xpath: {
|
|
45
45
|
type: "string",
|
|
46
46
|
description: "XPath selector to identify the element uniquely and click it. When creating XPATH selector, ensure they are unique and specific enough to select only one element, even if there are multiple elements of the same type (like multiple h1 elements)",
|
|
47
47
|
},
|
|
48
|
-
|
|
48
|
+
css_selector: {
|
|
49
49
|
type: "string",
|
|
50
|
-
description:
|
|
50
|
+
description: "CSS selector to identify the element uniquely.When creating CSS selectors, ensure they are unique to the page and specific enough to select only one element.",
|
|
51
51
|
},
|
|
52
52
|
},
|
|
53
|
-
required: ["
|
|
53
|
+
required: ["reason", "variable_name", "xpath", "css_selector"],
|
|
54
54
|
},
|
|
55
55
|
},
|
|
56
56
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@empiricalrun/test-gen",
|
|
3
|
-
"version": "0.31.
|
|
3
|
+
"version": "0.31.23",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"typescript": "^5.3.3",
|
|
47
47
|
"@empiricalrun/llm": "^0.9.4",
|
|
48
48
|
"@empiricalrun/r2-uploader": "^0.3.3",
|
|
49
|
-
"@empiricalrun/reporter": "^0.20.
|
|
49
|
+
"@empiricalrun/reporter": "^0.20.5"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@types/detect-port": "^1.3.5",
|