testlens-playwright-reporter 0.2.1 → 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.
- package/CHANGELOG.md +15 -0
- package/index.js +12 -6
- package/index.ts +3 -3
- package/lib/index.js +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
|
@@ -166,7 +166,7 @@ class TestLensReporter {
|
|
|
166
166
|
testSuiteName: test.parent.title,
|
|
167
167
|
tags: this.extractTags(test),
|
|
168
168
|
startTime: new Date().toISOString(),
|
|
169
|
-
status: '
|
|
169
|
+
status: 'running'
|
|
170
170
|
};
|
|
171
171
|
this.specMap.set(specKey, specData);
|
|
172
172
|
|
|
@@ -187,8 +187,8 @@ class TestLensReporter {
|
|
|
187
187
|
const testData = {
|
|
188
188
|
id: testId,
|
|
189
189
|
name: test.title,
|
|
190
|
-
status: '
|
|
191
|
-
originalStatus: '
|
|
190
|
+
status: 'running',
|
|
191
|
+
originalStatus: 'running',
|
|
192
192
|
duration: 0,
|
|
193
193
|
startTime: new Date().toISOString(),
|
|
194
194
|
endTime: '',
|
|
@@ -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,
|
|
381
|
+
const s3Data = await this.uploadArtifactToS3(attachment.path, testId, fileName);
|
|
376
382
|
|
|
377
383
|
const artifactData = {
|
|
378
384
|
testId,
|
|
379
|
-
type: this.getArtifactType(
|
|
385
|
+
type: this.getArtifactType(fileName),
|
|
380
386
|
path: attachment.path,
|
|
381
|
-
name:
|
|
387
|
+
name: fileName,
|
|
382
388
|
contentType: attachment.contentType,
|
|
383
389
|
fileSize: this.getFileSize(attachment.path),
|
|
384
390
|
storageType: 's3',
|
package/index.ts
CHANGED
|
@@ -295,7 +295,7 @@ export class TestLensReporter implements Reporter {
|
|
|
295
295
|
testSuiteName: test.parent.title,
|
|
296
296
|
tags: this.extractTags(test),
|
|
297
297
|
startTime: new Date().toISOString(),
|
|
298
|
-
status: '
|
|
298
|
+
status: 'running'
|
|
299
299
|
};
|
|
300
300
|
this.specMap.set(specKey, specData);
|
|
301
301
|
|
|
@@ -316,8 +316,8 @@ export class TestLensReporter implements Reporter {
|
|
|
316
316
|
const testData: TestData = {
|
|
317
317
|
id: testId,
|
|
318
318
|
name: test.title,
|
|
319
|
-
status: '
|
|
320
|
-
originalStatus: '
|
|
319
|
+
status: 'running',
|
|
320
|
+
originalStatus: 'running',
|
|
321
321
|
duration: 0,
|
|
322
322
|
startTime: new Date().toISOString(),
|
|
323
323
|
endTime: '',
|
package/lib/index.js
CHANGED
|
@@ -185,7 +185,7 @@ class TestLensReporter {
|
|
|
185
185
|
testSuiteName: test.parent.title,
|
|
186
186
|
tags: this.extractTags(test),
|
|
187
187
|
startTime: new Date().toISOString(),
|
|
188
|
-
status: '
|
|
188
|
+
status: 'running'
|
|
189
189
|
};
|
|
190
190
|
this.specMap.set(specKey, specData);
|
|
191
191
|
// Send spec start event to API
|
|
@@ -203,8 +203,8 @@ class TestLensReporter {
|
|
|
203
203
|
const testData = {
|
|
204
204
|
id: testId,
|
|
205
205
|
name: test.title,
|
|
206
|
-
status: '
|
|
207
|
-
originalStatus: '
|
|
206
|
+
status: 'running',
|
|
207
|
+
originalStatus: 'running',
|
|
208
208
|
duration: 0,
|
|
209
209
|
startTime: new Date().toISOString(),
|
|
210
210
|
endTime: '',
|
package/package.json
CHANGED