@checksum-ai/runtime 1.2.1 → 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/.env +1 -1
- package/README.md +4 -1
- package/checksum-root/tsconfig.json +3 -2
- package/checksumlib.js +43 -43
- package/cli.js +1 -1
- package/index.js +179 -179
- package/mock-auto-heal-agent.js +32 -0
- package/package.json +1 -1
- package/pw-report-template.html +8 -8
- package/vtg-pw-bridge-runner.js +1 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This mock implementation allows us to run test files instrumented for auto healing, without having to differentiate between frontend-executed code
|
|
3
|
+
* within functions like page.evaluate. This is done by injecting a reference to this class, named AutoHealAgent, into the window object. in addInitScript
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
window.AutoHealAgent = {
|
|
7
|
+
initialize: function (...args) {
|
|
8
|
+
return Promise.resolve();
|
|
9
|
+
},
|
|
10
|
+
|
|
11
|
+
success: function () {
|
|
12
|
+
return Promise.resolve();
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
error: function (...args) {
|
|
16
|
+
return Promise.resolve();
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
breakpoint: function () {
|
|
20
|
+
return Promise.resolve();
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
pushEval: function (...args) {},
|
|
24
|
+
|
|
25
|
+
popEval: function () {},
|
|
26
|
+
|
|
27
|
+
log: function (...args) {},
|
|
28
|
+
|
|
29
|
+
getLogs: function () {
|
|
30
|
+
return [];
|
|
31
|
+
},
|
|
32
|
+
};
|