doc-detective 1.2.0 → 1.2.2
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/package.json +1 -1
- package/sample/results.gif +0 -0
- package/sample/results.json +60 -0
- package/sample/results.png +0 -0
- package/src/lib/tests.js +2 -1
package/package.json
CHANGED
|
Binary file
|
package/sample/results.json
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
"tests": [
|
|
3
3
|
{
|
|
4
4
|
"id": "process-search-kittens",
|
|
5
|
+
"saveFailedTestRecordings": true,
|
|
6
|
+
"failedTestDirectory": "sample",
|
|
5
7
|
"actions": [
|
|
6
8
|
{
|
|
7
9
|
"action": "goTo",
|
|
@@ -11,6 +13,49 @@
|
|
|
11
13
|
"description": "Opened URI."
|
|
12
14
|
}
|
|
13
15
|
},
|
|
16
|
+
{
|
|
17
|
+
"action": "startRecording",
|
|
18
|
+
"overwrite": false,
|
|
19
|
+
"filename": "results.gif",
|
|
20
|
+
"fps": 15,
|
|
21
|
+
"result": {
|
|
22
|
+
"status": "PASS",
|
|
23
|
+
"description": "Started recording: /config/workspace/doc-detective/sample/temp_results.mp4",
|
|
24
|
+
"video": "/config/workspace/doc-detective/sample/temp_results.mp4"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"action": "moveMouse",
|
|
29
|
+
"css": "#gbqfbb",
|
|
30
|
+
"alignH": "center",
|
|
31
|
+
"alignV": "center",
|
|
32
|
+
"offsetX": 0,
|
|
33
|
+
"offsetY": 0,
|
|
34
|
+
"result": {
|
|
35
|
+
"status": "PASS",
|
|
36
|
+
"description": "Moved mouse to element."
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"action": "wait",
|
|
41
|
+
"duration": "5000",
|
|
42
|
+
"result": {
|
|
43
|
+
"status": "PASS",
|
|
44
|
+
"description": "Wait complete."
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"action": "moveMouse",
|
|
49
|
+
"css": "[title=Search]",
|
|
50
|
+
"alignV": "center",
|
|
51
|
+
"alignH": "center",
|
|
52
|
+
"offsetX": 0,
|
|
53
|
+
"offsetY": 0,
|
|
54
|
+
"result": {
|
|
55
|
+
"status": "PASS",
|
|
56
|
+
"description": "Moved mouse to element."
|
|
57
|
+
}
|
|
58
|
+
},
|
|
14
59
|
{
|
|
15
60
|
"action": "type",
|
|
16
61
|
"css": "[title=Search]",
|
|
@@ -29,6 +74,21 @@
|
|
|
29
74
|
"description": "Wait complete."
|
|
30
75
|
}
|
|
31
76
|
},
|
|
77
|
+
{
|
|
78
|
+
"action": "scroll",
|
|
79
|
+
"y": 300,
|
|
80
|
+
"result": {
|
|
81
|
+
"status": "PASS",
|
|
82
|
+
"description": "Scroll complete."
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"action": "stopRecording",
|
|
87
|
+
"result": {
|
|
88
|
+
"status": "PASS",
|
|
89
|
+
"description": "Stopped recording: /config/workspace/doc-detective/sample/results.gif"
|
|
90
|
+
}
|
|
91
|
+
},
|
|
32
92
|
{
|
|
33
93
|
"action": "screenshot",
|
|
34
94
|
"filename": "results.png",
|
|
Binary file
|
package/src/lib/tests.js
CHANGED
|
@@ -95,6 +95,7 @@ async function runTests(config, tests) {
|
|
|
95
95
|
exit(1);
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
|
+
context = await browser.createIncognitoBrowserContext();
|
|
98
99
|
|
|
99
100
|
// Iterate tests
|
|
100
101
|
log(config, "info", "Running tests.");
|
|
@@ -112,7 +113,7 @@ async function runTests(config, tests) {
|
|
|
112
113
|
if (browserRequired) {
|
|
113
114
|
// Instantiate page
|
|
114
115
|
log(config, "debug", "Instantiating page.");
|
|
115
|
-
page = await
|
|
116
|
+
page = await context.newPage();
|
|
116
117
|
await page._client.send("Page.setDownloadBehavior", {
|
|
117
118
|
behavior: "allow",
|
|
118
119
|
downloadPath: config.downloadDirectory,
|