Skip to content

Commit

Permalink
don't plumb category
Browse files Browse the repository at this point in the history
  • Loading branch information
Skn0tt committed Oct 25, 2024
1 parent 8afe8f6 commit c89488a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion packages/html-reporter/src/testResultView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>}

Check failure on line 190 in packages/html-reporter/src/testResultView.tsx

View workflow job for this annotation

GitHub Actions / docs & lint

Unexpected parentheses around single function argument
Expand Down
1 change: 0 additions & 1 deletion packages/html-reporter/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion packages/playwright/src/reporters/html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
Expand Down

0 comments on commit c89488a

Please sign in to comment.