testlens-playwright-reporter 0.2.3 → 0.2.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/CHANGELOG.md +8 -0
- package/index.ts +10 -4
- package/lib/index.js +9 -4
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to the testlens-playwright-reporter package will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [0.2.4] - 2025-11-18
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- **TypeScript source updated**: Applied trace file extension preservation fix to TypeScript source (`index.ts`) and rebuilt `lib/index.js` to ensure both TypeScript and JavaScript implementations have the fix.
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- **Package entry point**: Changed main entry point from `lib/index.js` to `index.js` to use the correct implementation with trace file extension preservation fix.
|
|
12
|
+
|
|
5
13
|
## [0.2.3] - 2025-11-18
|
|
6
14
|
|
|
7
15
|
### Fixed
|
package/index.ts
CHANGED
|
@@ -483,20 +483,26 @@ export class TestLensReporter implements Reporter {
|
|
|
483
483
|
for (const attachment of attachments) {
|
|
484
484
|
if (attachment.path) {
|
|
485
485
|
try {
|
|
486
|
+
// Preserve original file extension from path (important for traces which must be .zip)
|
|
487
|
+
const originalExt = path.extname(attachment.path);
|
|
488
|
+
const fileName = attachment.name.includes(originalExt)
|
|
489
|
+
? attachment.name
|
|
490
|
+
: attachment.name + originalExt;
|
|
491
|
+
|
|
486
492
|
// Upload to S3 first
|
|
487
|
-
const s3Data = await this.uploadArtifactToS3(attachment.path, testId,
|
|
493
|
+
const s3Data = await this.uploadArtifactToS3(attachment.path, testId, fileName);
|
|
488
494
|
|
|
489
495
|
// Skip if upload failed or file was too large
|
|
490
496
|
if (!s3Data) {
|
|
491
|
-
console.log(`⏭️ Skipping artifact ${
|
|
497
|
+
console.log(`⏭️ Skipping artifact ${fileName} - upload failed or file too large`);
|
|
492
498
|
continue;
|
|
493
499
|
}
|
|
494
500
|
|
|
495
501
|
const artifactData = {
|
|
496
502
|
testId,
|
|
497
|
-
type: this.getArtifactType(
|
|
503
|
+
type: this.getArtifactType(fileName),
|
|
498
504
|
path: attachment.path,
|
|
499
|
-
name:
|
|
505
|
+
name: fileName,
|
|
500
506
|
contentType: attachment.contentType,
|
|
501
507
|
fileSize: this.getFileSize(attachment.path),
|
|
502
508
|
storageType: 's3',
|
package/lib/index.js
CHANGED
|
@@ -352,18 +352,23 @@ class TestLensReporter {
|
|
|
352
352
|
for (const attachment of attachments) {
|
|
353
353
|
if (attachment.path) {
|
|
354
354
|
try {
|
|
355
|
+
// Preserve original file extension from path (important for traces which must be .zip)
|
|
356
|
+
const originalExt = path.extname(attachment.path);
|
|
357
|
+
const fileName = attachment.name.includes(originalExt)
|
|
358
|
+
? attachment.name
|
|
359
|
+
: attachment.name + originalExt;
|
|
355
360
|
// Upload to S3 first
|
|
356
|
-
const s3Data = await this.uploadArtifactToS3(attachment.path, testId,
|
|
361
|
+
const s3Data = await this.uploadArtifactToS3(attachment.path, testId, fileName);
|
|
357
362
|
// Skip if upload failed or file was too large
|
|
358
363
|
if (!s3Data) {
|
|
359
|
-
console.log(`⏭️ Skipping artifact ${
|
|
364
|
+
console.log(`⏭️ Skipping artifact ${fileName} - upload failed or file too large`);
|
|
360
365
|
continue;
|
|
361
366
|
}
|
|
362
367
|
const artifactData = {
|
|
363
368
|
testId,
|
|
364
|
-
type: this.getArtifactType(
|
|
369
|
+
type: this.getArtifactType(fileName),
|
|
365
370
|
path: attachment.path,
|
|
366
|
-
name:
|
|
371
|
+
name: fileName,
|
|
367
372
|
contentType: attachment.contentType,
|
|
368
373
|
fileSize: this.getFileSize(attachment.path),
|
|
369
374
|
storageType: 's3',
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "testlens-playwright-reporter",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "Universal Playwright reporter for TestLens - works with both TypeScript and JavaScript projects",
|
|
5
|
-
"main": "
|
|
5
|
+
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
7
7
|
"files": [
|
|
8
8
|
"index.js",
|