don't plumb category

This commit is contained in:
Simon Knott 2024-10-25 09:46:04 +02:00
parent 8afe8f60b2
commit c89488a19d
3 changed files with 1 additions and 3 deletions

View file

@ -184,7 +184,7 @@ const StepTreeItem: React.FC<{
step: TestStep;
depth: number,
}> = ({ step, depth }) => {
const attachmentName = step.category === 'attach' ? step.title.match(/^attach "(.*)"$/)?.[1] : undefined;
const attachmentName = step.title.match(/^attach "(.*)"$/)?.[1];
return <TreeItem title={<span aria-label={step.title}>
<span style={{ float: 'right' }}>{msToString(step.duration)}</span>
{attachmentName && <a style={{ float: 'right' }} title='link to attachment' href={'#' + componentID(params => params.set('attachment', attachmentName))} onClick={(evt) => { evt.stopPropagation(); }}>{icons.attachment()}</a>}

View file

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