testdriverai 5.5.2 → 5.5.4
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/lib/parser.js +7 -7
- package/package.json +1 -1
- package/schema.json +3 -5
- package/testdriver/chrome.yaml +102 -0
package/lib/parser.js
CHANGED
|
@@ -10,14 +10,14 @@ const chalk = require('chalk');
|
|
|
10
10
|
function formatAjvError(error) {
|
|
11
11
|
|
|
12
12
|
return [
|
|
13
|
-
chalk.
|
|
14
|
-
`${chalk.
|
|
15
|
-
`${chalk.
|
|
16
|
-
`${chalk.
|
|
13
|
+
chalk.yellow('❌ Validation Warning (beta)'),
|
|
14
|
+
`${chalk.yellow('Path:')} ${chalk.white(error.instancePath)}`,
|
|
15
|
+
`${chalk.yellow('Schema:')} ${chalk.cyan(error.schemaPath)}`,
|
|
16
|
+
`${chalk.yellow('Keyword:')} ${chalk.magenta(error.keyword)}`,
|
|
17
17
|
error.params?.missingProperty
|
|
18
|
-
? `${chalk.
|
|
18
|
+
? `${chalk.yellow('Missing:')} ${chalk.yellow(error.params.missingProperty)}`
|
|
19
19
|
: '',
|
|
20
|
-
`${chalk.
|
|
20
|
+
`${chalk.yellow('Message:')} ${chalk.white(error.message)}`,
|
|
21
21
|
`\n`
|
|
22
22
|
].filter(Boolean).join('\n');
|
|
23
23
|
}
|
|
@@ -105,7 +105,7 @@ const validateYAML = async function (yaml) {
|
|
|
105
105
|
|
|
106
106
|
if (!valid) {
|
|
107
107
|
validate.errors.forEach(err => console.log(formatAjvError(err)));
|
|
108
|
-
throw new Error("Invalid YAML");
|
|
108
|
+
// throw new Error("Invalid YAML");
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
return yaml;
|
package/package.json
CHANGED
package/schema.json
CHANGED
|
@@ -69,10 +69,9 @@
|
|
|
69
69
|
"properties": {
|
|
70
70
|
"keys": {
|
|
71
71
|
"type": "array",
|
|
72
|
-
"
|
|
72
|
+
"contains": {
|
|
73
73
|
"type": "string",
|
|
74
74
|
"enum": [
|
|
75
|
-
[
|
|
76
75
|
"backspace", "delete", "enter", "tab", "escape", "up", "down", "right", "left",
|
|
77
76
|
"home", "end", "pageup", "pagedown", "f1", "f2", "f3", "f4", "f5", "f6", "f7",
|
|
78
77
|
"f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", "f16", "f17", "f18", "f19",
|
|
@@ -87,7 +86,6 @@
|
|
|
87
86
|
"lights_kbd_toggle", "lights_kbd_up", "lights_kbd_down", "a", "b", "c", "d", "e",
|
|
88
87
|
"f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u",
|
|
89
88
|
"v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"
|
|
90
|
-
]
|
|
91
89
|
]
|
|
92
90
|
}
|
|
93
91
|
}
|
|
@@ -415,8 +413,8 @@
|
|
|
415
413
|
"method": {
|
|
416
414
|
"type": "string",
|
|
417
415
|
"enum": [
|
|
418
|
-
"
|
|
419
|
-
"
|
|
416
|
+
"keyboard",
|
|
417
|
+
"mouse"
|
|
420
418
|
]
|
|
421
419
|
}
|
|
422
420
|
},
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
version: 4.2.29
|
|
2
|
+
session: 680d09c63f8647e0819efd85
|
|
3
|
+
steps:
|
|
4
|
+
- prompt: go to the web address chromewebstore.google.com
|
|
5
|
+
commands:
|
|
6
|
+
- command: focus-application
|
|
7
|
+
name: Google Chrome
|
|
8
|
+
- command: hover-text
|
|
9
|
+
text: Search extensions
|
|
10
|
+
description: address bar in Google Chrome
|
|
11
|
+
action: click
|
|
12
|
+
- command: type
|
|
13
|
+
text: chromewebstore.google.com
|
|
14
|
+
- command: press-keys
|
|
15
|
+
keys:
|
|
16
|
+
- enter
|
|
17
|
+
- prompt: find the extension called "YouTube DJ Effects" and install it
|
|
18
|
+
commands:
|
|
19
|
+
- command: focus-application
|
|
20
|
+
name: Google Chrome
|
|
21
|
+
- command: hover-text
|
|
22
|
+
text: Search extensions and themes
|
|
23
|
+
description: search bar in Chrome Web Store
|
|
24
|
+
action: click
|
|
25
|
+
- command: type
|
|
26
|
+
text: YouTube DJ Effects
|
|
27
|
+
- command: press-keys
|
|
28
|
+
keys:
|
|
29
|
+
- enter
|
|
30
|
+
- command: scroll-until-text
|
|
31
|
+
text: YouTube DJ Effects
|
|
32
|
+
direction: down
|
|
33
|
+
method: keyboard
|
|
34
|
+
- command: hover-text
|
|
35
|
+
text: YouTube DJ Effects
|
|
36
|
+
description: extension name in search results
|
|
37
|
+
action: click
|
|
38
|
+
- command: hover-text
|
|
39
|
+
text: Add to Chrome
|
|
40
|
+
description: install button for the extension
|
|
41
|
+
action: click
|
|
42
|
+
- prompt: find the extension called "YouTube DJ Effects" and install it
|
|
43
|
+
commands:
|
|
44
|
+
- command: hover-text
|
|
45
|
+
text: Add to Chrome
|
|
46
|
+
description: install button for the YouTube DJ Effects extension
|
|
47
|
+
action: click
|
|
48
|
+
- prompt: find the extension called "YouTube DJ Effects" and install it
|
|
49
|
+
commands:
|
|
50
|
+
- command: hover-text
|
|
51
|
+
text: YouTube DJ effects / EQ / Volume Booster / Bass Booster
|
|
52
|
+
description: extension name in search results
|
|
53
|
+
action: click
|
|
54
|
+
- command: hover-text
|
|
55
|
+
text: Add to Chrome
|
|
56
|
+
description: install button for the extension
|
|
57
|
+
action: click
|
|
58
|
+
- prompt: find the extension called "YouTube DJ Effects" and install it
|
|
59
|
+
commands:
|
|
60
|
+
- command: hover-text
|
|
61
|
+
text: Add extension
|
|
62
|
+
description: confirmation button to add the extension
|
|
63
|
+
action: click
|
|
64
|
+
- prompt: focus chrome and open a new tab
|
|
65
|
+
commands:
|
|
66
|
+
- command: focus-application
|
|
67
|
+
name: Google Chrome
|
|
68
|
+
- command: press-keys
|
|
69
|
+
keys:
|
|
70
|
+
- command
|
|
71
|
+
- t
|
|
72
|
+
- prompt: >-
|
|
73
|
+
click the image that looks like a puzzle piece at the top of chrome
|
|
74
|
+
and 'pin' the new extension
|
|
75
|
+
commands:
|
|
76
|
+
- command: focus-application
|
|
77
|
+
name: Google Chrome
|
|
78
|
+
- command: hover-image
|
|
79
|
+
description: puzzle piece icon in the Chrome toolbar
|
|
80
|
+
action: click
|
|
81
|
+
- command: hover-text
|
|
82
|
+
text: YouTube DJ effects / EQ / Volume Booster / Bass Booster
|
|
83
|
+
description: pin option for the YouTube DJ Effects extension
|
|
84
|
+
action: click
|
|
85
|
+
assert: the orange and black record icon appears in the Chrome toolbar
|
|
86
|
+
- prompt: >-
|
|
87
|
+
click the image that looks like a 'pin' the youtube dj effects extension to show in the chrome toolbar
|
|
88
|
+
commands:
|
|
89
|
+
- command: focus-application
|
|
90
|
+
name: Google Chrome
|
|
91
|
+
- command: hover-image
|
|
92
|
+
description: pin icon inside the extension menu
|
|
93
|
+
action: click
|
|
94
|
+
- prompt: >-
|
|
95
|
+
click the icon that looks like a record to open the Youtube DJ
|
|
96
|
+
extension
|
|
97
|
+
commands:
|
|
98
|
+
- command: focus-application
|
|
99
|
+
name: Google Chrome
|
|
100
|
+
- command: hover-image
|
|
101
|
+
description: record icon in the Chrome toolbar
|
|
102
|
+
action: click
|