@empiricalrun/playwright-utils 0.14.6 → 0.14.10
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 +27 -0
- package/dist/reporter/custom.d.ts.map +1 -1
- package/dist/reporter/custom.js +26 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @empiricalrun/playwright-utils
|
|
2
2
|
|
|
3
|
+
## 0.14.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fced6ed: chore: add logs to reporter
|
|
8
|
+
|
|
9
|
+
## 0.14.9
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [b5379b8]
|
|
14
|
+
- @empiricalrun/llm@0.9.9
|
|
15
|
+
|
|
16
|
+
## 0.14.8
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies [e33656e]
|
|
21
|
+
- @empiricalrun/llm@0.9.8
|
|
22
|
+
|
|
23
|
+
## 0.14.7
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Updated dependencies [cf1740a]
|
|
28
|
+
- @empiricalrun/llm@0.9.7
|
|
29
|
+
|
|
3
30
|
## 0.14.6
|
|
4
31
|
|
|
5
32
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom.d.ts","sourceRoot":"","sources":["../../src/reporter/custom.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAMH,OAAO,KAAK,EACV,UAAU,EACV,UAAU,EAEV,KAAK,EACL,QAAQ,IAAI,cAAc,EAC1B,SAAS,EACT,UAAU,IAAI,gBAAgB,EAE/B,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EAML,UAAU,EAMX,MAAM,2BAA2B,CAAC;AAgBnC,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8Bb;AAkCD,wBAAsB,cAAc,CAClC,YAAY,EAAE,MAAM,GAAG,SAAS,EAChC,IAAI,GAAE,MAAoB,EAC1B,IAAI,CAAC,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,MAAM,iBAqBhB;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAsBhE;AAqiBD,eAAe,YAAY,CAAC"}
|
package/dist/reporter/custom.js
CHANGED
|
@@ -37,6 +37,29 @@ const htmlReportOptions = ["always", "never", "on-failure"];
|
|
|
37
37
|
const isHtmlReportOption = (type) => {
|
|
38
38
|
return htmlReportOptions.includes(type);
|
|
39
39
|
};
|
|
40
|
+
function listFilesRecursively(dir) {
|
|
41
|
+
let files = [];
|
|
42
|
+
try {
|
|
43
|
+
const items = fs_1.default.readdirSync(dir); // Read the directory
|
|
44
|
+
for (const item of items) {
|
|
45
|
+
const fullPath = path_1.default.join(dir, item);
|
|
46
|
+
// Get file stats
|
|
47
|
+
const stats = fs_1.default.statSync(fullPath);
|
|
48
|
+
if (stats.isDirectory()) {
|
|
49
|
+
// Recursively list files in subdirectory
|
|
50
|
+
files = files.concat(listFilesRecursively(fullPath));
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
// It's a file, add it to the list
|
|
54
|
+
files.push(fullPath);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
catch (error) {
|
|
59
|
+
console.error(`Error reading directory ${dir}: ${error}`);
|
|
60
|
+
}
|
|
61
|
+
return files;
|
|
62
|
+
}
|
|
40
63
|
class HtmlReporter {
|
|
41
64
|
config;
|
|
42
65
|
suite;
|
|
@@ -207,6 +230,8 @@ class HtmlReporter {
|
|
|
207
230
|
second: "2-digit",
|
|
208
231
|
}).format(startTime));
|
|
209
232
|
try {
|
|
233
|
+
console.log("uploading path", this._outputFolder);
|
|
234
|
+
console.log(listFilesRecursively(this._outputFolder));
|
|
210
235
|
// await Promise.allSettled([
|
|
211
236
|
const uploadTraceTask = async () => (0, r2_uploader_1.uploadDirectory)({
|
|
212
237
|
sourceDir: this._outputFolder + "/trace",
|
|
@@ -251,7 +276,7 @@ class HtmlReporter {
|
|
|
251
276
|
console.log("Time taken to upload after tests ended: ", timeDiff, "ms");
|
|
252
277
|
}
|
|
253
278
|
catch (e) {
|
|
254
|
-
|
|
279
|
+
console.error("Error in uploading final report ", e);
|
|
255
280
|
}
|
|
256
281
|
}
|
|
257
282
|
async onExit() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@empiricalrun/playwright-utils",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.10",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"playwright-core": "1.47.1",
|
|
39
39
|
"playwright-extra": "^4.3.6",
|
|
40
40
|
"puppeteer-extra-plugin-recaptcha": "^3.6.8",
|
|
41
|
-
"@empiricalrun/llm": "^0.9.
|
|
41
|
+
"@empiricalrun/llm": "^0.9.9",
|
|
42
42
|
"@empiricalrun/r2-uploader": "^0.3.4"
|
|
43
43
|
},
|
|
44
44
|
"scripts": {
|