@checksum-ai/runtime 2.0.7-alpha.7 → 2.0.7-alpha.9
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/.env +1 -1
- package/package.json +1 -1
- package/scripts/playwright_patches/1.56.1.js +92 -0
package/.env
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
CHECKSUM_RUNTIME_BUILD_TIME=2025-12-
|
|
1
|
+
CHECKSUM_RUNTIME_BUILD_TIME=2025-12-10T21:08:47.276Z
|
package/package.json
CHANGED
|
@@ -377,6 +377,98 @@ function htmlReporter(projectRoot) {
|
|
|
377
377
|
return;
|
|
378
378
|
}`;
|
|
379
379
|
replaceContent(file, originalContent, newContent);
|
|
380
|
+
|
|
381
|
+
// Filter out steps with locations in runtime/node_modules files completely
|
|
382
|
+
originalContent = `_createTestStep(dedupedStep, result) {
|
|
383
|
+
const { step, duration, count } = dedupedStep;
|
|
384
|
+
const skipped = dedupedStep.step.annotations?.find((a) => a.type === "skip");
|
|
385
|
+
let title = step.title;
|
|
386
|
+
if (skipped)
|
|
387
|
+
title = \`\${title} (skipped\${skipped.description ? ": " + skipped.description : ""})\`;
|
|
388
|
+
const testStep = {
|
|
389
|
+
title,
|
|
390
|
+
startTime: step.startTime.toISOString(),
|
|
391
|
+
duration,
|
|
392
|
+
steps: dedupeSteps(step.steps).map((s) => this._createTestStep(s, result)),
|
|
393
|
+
attachments: step.attachments.map((s) => {
|
|
394
|
+
const index = result.attachments.indexOf(s);
|
|
395
|
+
if (index === -1)
|
|
396
|
+
throw new Error("Unexpected, attachment not found");
|
|
397
|
+
return index;
|
|
398
|
+
}),
|
|
399
|
+
location: this._relativeLocation(step.location),
|
|
400
|
+
error: step.error?.message,
|
|
401
|
+
count,
|
|
402
|
+
skipped: !!skipped
|
|
403
|
+
};
|
|
404
|
+
if (step.location)
|
|
405
|
+
this._stepsInFile.set(step.location.file, testStep);
|
|
406
|
+
return testStep;
|
|
407
|
+
}`;
|
|
408
|
+
newContent = `_createTestStep(dedupedStep, result) {
|
|
409
|
+
const { step, duration, count } = dedupedStep;
|
|
410
|
+
// Skip "Evaluate" steps with locations in runtime/node_modules files
|
|
411
|
+
if (step.location && step.title === "Evaluate" && (step.location.file.includes('@checksum-ai/runtime') || step.location.file.includes('node_modules'))) {
|
|
412
|
+
// Return null to indicate this step should be filtered out
|
|
413
|
+
return null;
|
|
414
|
+
}
|
|
415
|
+
const skipped = dedupedStep.step.annotations?.find((a) => a.type === "skip");
|
|
416
|
+
let title = step.title;
|
|
417
|
+
if (skipped)
|
|
418
|
+
title = \`\${title} (skipped\${skipped.description ? ": " + skipped.description : ""})\`;
|
|
419
|
+
const testStep = {
|
|
420
|
+
title,
|
|
421
|
+
startTime: step.startTime.toISOString(),
|
|
422
|
+
duration,
|
|
423
|
+
steps: dedupeSteps(step.steps).map((s) => this._createTestStep(s, result)).filter(s => s !== null),
|
|
424
|
+
attachments: step.attachments.map((s) => {
|
|
425
|
+
const index = result.attachments.indexOf(s);
|
|
426
|
+
if (index === -1)
|
|
427
|
+
throw new Error("Unexpected, attachment not found");
|
|
428
|
+
return index;
|
|
429
|
+
}),
|
|
430
|
+
location: this._relativeLocation(step.location),
|
|
431
|
+
error: step.error?.message,
|
|
432
|
+
count,
|
|
433
|
+
skipped: !!skipped
|
|
434
|
+
};
|
|
435
|
+
if (step.location)
|
|
436
|
+
this._stepsInFile.set(step.location.file, testStep);
|
|
437
|
+
return testStep;
|
|
438
|
+
}`;
|
|
439
|
+
replaceContent(file, originalContent, newContent);
|
|
440
|
+
|
|
441
|
+
// Also filter steps when creating test results
|
|
442
|
+
originalContent = `steps: dedupeSteps(result.steps).map((s) => this._createTestStep(s, result)),`;
|
|
443
|
+
newContent = `steps: dedupeSteps(result.steps).map((s) => this._createTestStep(s, result)).filter(s => s !== null),`;
|
|
444
|
+
replaceContent(file, originalContent, newContent);
|
|
445
|
+
|
|
446
|
+
// Normalize locations for steps from runtime/index.js - hide location if it's index.js from runtime
|
|
447
|
+
originalContent = `_relativeLocation(location) {
|
|
448
|
+
if (!location)
|
|
449
|
+
return void 0;
|
|
450
|
+
const file = (0, import_utils.toPosixPath)(import_path.default.relative(this._config.rootDir, location.file));
|
|
451
|
+
return {
|
|
452
|
+
file,
|
|
453
|
+
line: location.line,
|
|
454
|
+
column: location.column
|
|
455
|
+
};
|
|
456
|
+
}`;
|
|
457
|
+
newContent = `_relativeLocation(location) {
|
|
458
|
+
if (!location)
|
|
459
|
+
return void 0;
|
|
460
|
+
// Hide location for steps from runtime/index.js to reduce clutter
|
|
461
|
+
if (location.file && location.file.includes('@checksum-ai/runtime') && location.file.endsWith('index.js')) {
|
|
462
|
+
return void 0;
|
|
463
|
+
}
|
|
464
|
+
const file = (0, import_utils.toPosixPath)(import_path.default.relative(this._config.rootDir, location.file));
|
|
465
|
+
return {
|
|
466
|
+
file,
|
|
467
|
+
line: location.line,
|
|
468
|
+
column: location.column
|
|
469
|
+
};
|
|
470
|
+
}`;
|
|
471
|
+
replaceContent(file, originalContent, newContent);
|
|
380
472
|
}
|
|
381
473
|
|
|
382
474
|
// -------- [Run] -------- //
|