From 37ffbd757e732b52c3497ff65009fbe3a5743df5 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Mon, 15 Jul 2024 14:35:11 -0700 Subject: [PATCH] chore: remove unused project to id mapping from html builder (#31698) --- packages/playwright/src/reporters/html.ts | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/packages/playwright/src/reporters/html.ts b/packages/playwright/src/reporters/html.ts index 2a5bbc94d4..7b279a70a1 100644 --- a/packages/playwright/src/reporters/html.ts +++ b/packages/playwright/src/reporters/html.ts @@ -226,8 +226,6 @@ class HtmlBuilder { private _dataZipFile: ZipFile; private _hasTraces = false; private _attachmentsBaseURL: string; - private _projectToId: Map = new Map(); - private _lastProjectId = 0; constructor(config: FullConfig, outputDir: string, attachmentsBaseURL: string) { this._config = config; @@ -406,16 +404,6 @@ class HtmlBuilder { }; } - private _projectId(suite: Suite): number { - const project = projectSuite(suite); - let id = this._projectToId.get(project); - if (!id) { - id = ++this._lastProjectId; - this._projectToId.set(project, id); - } - return id; - } - private _serializeAttachments(attachments: JsonAttachment[]) { let lastAttachment: TestAttachment | undefined; return attachments.map(a => { @@ -653,10 +641,4 @@ function createSnippets(stepsInFile: MultiMap) { } } -function projectSuite(suite: Suite): Suite { - while (suite.parent?.parent) - suite = suite.parent; - return suite; -} - export default HtmlReporter;