feat(scenario): attach step output and assertion details to run log
CI / changes (pull_request) Successful in 9s
CI / version (pull_request) Skipped
CI / server (pull_request) Successful in 1m44s
CI / client (pull_request) Successful in 1m36s
CI / image (pull_request) Skipped

- "Step N passed" log entry carries the step's return value as data
- context.assert accepts an optional details argument; on failure the
  assertion:fail entry stores { details, error } as data
- assertion failures throw AssertionFailedError so "Step N failed" and
  "Snippet X failed" entries name only the assertion, without repeating
  the details; the step run description keeps the full message
- exported e2e runtime accepts and prints assert details
- log output shows elapsed time in whole seconds, matching the stored
  timestamp resolution
- run artifact and scenario file names link to the inline file content
  in a new tab
This commit is contained in:
ars9 committed 2026-10-02 11:05:29 +03:00
1 parent 2281a8729b
commit 959b3b70c9
9 files changed
+195 -17

No files matched your search

+5 -2
View File
@@ -24,10 +24,13 @@ export interface LogOutputProps {
className?: string;
}
/** "+12.345s" (or "-" if before startTime, e.g. clock skew). */
/**
* "+12s" (or "-" if before startTime, e.g. clock skew). Log timestamps are
* stored with second resolution, so fractions would be noise.
*/
function formatElapsed(deltaMs: number): string {
const sign = deltaMs < 0 ? '-' : '+';
return `${sign}${(Math.abs(deltaMs) / 1000).toFixed(3)}s`;
return `${sign}${Math.round(Math.abs(deltaMs) / 1000)}s`;
}
/** Pretty-prints `data` if it's valid JSON, otherwise returns it as-is. */