testlens-playwright-reporter 0.2.2 → 0.2.3

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/index.js +9 -3
  3. package/package.json +1 -1
package/CHANGELOG.md ADDED
@@ -0,0 +1,15 @@
1
+ # Changelog
2
+
3
+ All notable changes to the testlens-playwright-reporter package will be documented in this file.
4
+
5
+ ## [0.2.3] - 2025-11-18
6
+
7
+ ### Fixed
8
+ - **Trace file extension preservation**: Fixed issue where Playwright trace files were being uploaded to S3 without their `.zip` extension, causing "Could not load trace" errors in Playwright Trace Viewer. The reporter now preserves the original file extension from `attachment.path` when uploading artifacts, ensuring trace files maintain their `.zip` format required by the viewer.
9
+
10
+ ## [0.2.2] - Previous release
11
+
12
+ ### Features
13
+ - Direct S3 uploads with presigned URLs
14
+ - Asynchronous artifact processing
15
+ - Enhanced error handling and retry logic
package/index.js CHANGED
@@ -371,14 +371,20 @@ class TestLensReporter {
371
371
  try {
372
372
  console.log(`📤 Processing ${attachment.name} asynchronously...`);
373
373
 
374
+ // Preserve original file extension from path (important for traces which must be .zip)
375
+ const originalExt = path.extname(attachment.path);
376
+ const fileName = attachment.name.includes(originalExt)
377
+ ? attachment.name
378
+ : attachment.name + originalExt;
379
+
374
380
  // Upload to S3 first
375
- const s3Data = await this.uploadArtifactToS3(attachment.path, testId, attachment.name);
381
+ const s3Data = await this.uploadArtifactToS3(attachment.path, testId, fileName);
376
382
 
377
383
  const artifactData = {
378
384
  testId,
379
- type: this.getArtifactType(attachment.name),
385
+ type: this.getArtifactType(fileName),
380
386
  path: attachment.path,
381
- name: attachment.name,
387
+ name: fileName,
382
388
  contentType: attachment.contentType,
383
389
  fileSize: this.getFileSize(attachment.path),
384
390
  storageType: 's3',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testlens-playwright-reporter",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Universal Playwright reporter for TestLens - works with both TypeScript and JavaScript projects",
5
5
  "main": "lib/index.js",
6
6
  "types": "index.d.ts",