@empiricalrun/playwright-utils 0.7.0 → 0.7.1
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
CHANGED
package/dist/reporter/custom.js
CHANGED
|
@@ -72,7 +72,7 @@ class HtmlReporter {
|
|
|
72
72
|
const folderName = folder.split("/")[0];
|
|
73
73
|
console.log("uploading to R2: ", folderName);
|
|
74
74
|
// on test gen run, we don't have PROJECT_NAME or GITHUB_RUN_ID so we skip uploading since we anyways handle uploads for that, this is a stopgap
|
|
75
|
-
if (!process.env.PROJECT_NAME || !"
|
|
75
|
+
if (!process.env.PROJECT_NAME || !"10633546877") {
|
|
76
76
|
console.log("Skipping upload of trace directory since PROJECT_NAME or GITHUB_RUN_ID is not set");
|
|
77
77
|
return;
|
|
78
78
|
}
|
|
@@ -80,7 +80,7 @@ class HtmlReporter {
|
|
|
80
80
|
sourceDir: this._outputFolder + "/data/" + folderName,
|
|
81
81
|
destinationDir: process.env.PROJECT_NAME +
|
|
82
82
|
"/" +
|
|
83
|
-
"
|
|
83
|
+
"10633546877" +
|
|
84
84
|
"/data/" +
|
|
85
85
|
folderName,
|
|
86
86
|
uploadBucket: "test-report",
|
|
@@ -141,7 +141,7 @@ class HtmlReporter {
|
|
|
141
141
|
const builder = new HtmlBuilder(this.config, this._outputFolder, this._attachmentsBaseURL);
|
|
142
142
|
this._buildResult = await builder.build(this.config.metadata, projectSuites, result, this._topLevelErrors);
|
|
143
143
|
// upload trace directory
|
|
144
|
-
if (!process.env.PROJECT_NAME || !"
|
|
144
|
+
if (!process.env.PROJECT_NAME || !"10633546877") {
|
|
145
145
|
console.log("Skipping upload of trace directory since PROJECT_NAME or GITHUB_RUN_ID is not set");
|
|
146
146
|
return;
|
|
147
147
|
}
|
|
@@ -154,7 +154,7 @@ class HtmlReporter {
|
|
|
154
154
|
await Promise.allSettled([
|
|
155
155
|
(0, upload_1.uploadDirectory)({
|
|
156
156
|
sourceDir: this._outputFolder + "/trace",
|
|
157
|
-
destinationDir: process.env.PROJECT_NAME + "/" + "
|
|
157
|
+
destinationDir: process.env.PROJECT_NAME + "/" + "10633546877" + "/trace",
|
|
158
158
|
uploadBucket: "test-report",
|
|
159
159
|
}),
|
|
160
160
|
// upload summary.json
|
|
@@ -164,14 +164,14 @@ class HtmlReporter {
|
|
|
164
164
|
path_1.default.join(this._outputFolder, "summary.json"),
|
|
165
165
|
// path.join(this._outputFolder, "data", ".last-run.json"),
|
|
166
166
|
],
|
|
167
|
-
destinationDir: process.env.PROJECT_NAME + "/" + "
|
|
167
|
+
destinationDir: process.env.PROJECT_NAME + "/" + "10633546877",
|
|
168
168
|
uploadBucket: "test-report",
|
|
169
169
|
}),
|
|
170
170
|
// upload index.html
|
|
171
171
|
(0, upload_1.uploadDirectory)({
|
|
172
172
|
sourceDir: this._outputFolder,
|
|
173
173
|
fileList: [path_1.default.join(this._outputFolder, "index.html")],
|
|
174
|
-
destinationDir: process.env.PROJECT_NAME + "/" + "
|
|
174
|
+
destinationDir: process.env.PROJECT_NAME + "/" + "10633546877",
|
|
175
175
|
uploadBucket: "test-report",
|
|
176
176
|
}),
|
|
177
177
|
]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../src/reporter/upload.ts"],"names":[],"mappings":"AAsBA,UAAU,OAAO;IACf,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;CACxB;
|
|
1
|
+
{"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../src/reporter/upload.ts"],"names":[],"mappings":"AAsBA,UAAU,OAAO;IACf,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;CACxB;AA8GD,wBAAsB,eAAe,CAAC,EACpC,SAAS,EACT,QAAQ,EACR,cAAc,EACd,YAAY,GACb,EAAE;IACD,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;CACtB,GAAG,OAAO,CAAC,OAAO,CAAC,CAYnB"}
|
package/dist/reporter/upload.js
CHANGED
|
@@ -106,7 +106,7 @@ const run = async (config) => {
|
|
|
106
106
|
});
|
|
107
107
|
try {
|
|
108
108
|
const data = await S3.send(cmd);
|
|
109
|
-
console.log(`R2 Success - ${
|
|
109
|
+
console.log(`R2 Success - for sourceDir: ${config.sourceDir} destinationDir: ${config.destinationDir} bucket: ${config.bucket} ${config.fileList ? config.fileList : ""}`);
|
|
110
110
|
map.set(file, data);
|
|
111
111
|
const fileUrl = await (0, s3_request_presigner_1.getSignedUrl)(S3, cmd);
|
|
112
112
|
urls[file] = fileUrl;
|