Revert "remove category"

This reverts commit e4786e0154.
This commit is contained in:
Simon Knott 2024-10-16 12:01:17 +02:00
parent e4786e0154
commit 64ed6e724c
No known key found for this signature in database
GPG key ID: 8CEDC00028084AEC
3 changed files with 5 additions and 0 deletions

View file

@ -27,6 +27,7 @@ const result: TestResult = {
errors: [],
steps: [{
title: 'Outer step',
category: 'test.step',
startTime: new Date(100).toUTCString(),
duration: 10,
location: { file: 'test.spec.ts', line: 62, column: 0 },
@ -34,6 +35,7 @@ const result: TestResult = {
steps: [{
title: 'Inner step',
startTime: new Date(200).toUTCString(),
category: 'test.step',
duration: 10,
location: { file: 'test.spec.ts', line: 82, column: 0 },
steps: [],
@ -136,6 +138,7 @@ const resultWithAttachment: TestResult = {
errors: [],
steps: [{
title: 'Outer step',
category: 'test.step',
startTime: new Date(100).toUTCString(),
duration: 10,
location: { file: 'test.spec.ts', line: 62, column: 0 },

View file

@ -102,6 +102,7 @@ export type TestResult = {
export type TestStep = {
title: string;
category: 'hook' | 'fixture' | 'test.step' | 'expect' | 'attach' | string;
startTime: string;
duration: number;
location?: Location;

View file

@ -498,6 +498,7 @@ class HtmlBuilder {
const { step, duration, count } = dedupedStep;
const testStep: TestStep = {
title: step.title,
category: step.category,
startTime: step.startTime.toISOString(),
duration,
steps: dedupeSteps(step.steps).map(s => this._createTestStep(s, result)),