Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
chore: remove unused project to id mapping from html builder (#31698)
Yury Semikhatsky37ffbd757e73
diff --git a/packages/playwright/src/reporters/html.ts b/packages/playwright/src/reporters/html.tsindex 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<Suite, number> = 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<string, TestStep>) {}}-function projectSuite(suite: Suite): Suite {- while (suite.parent?.parent)- suite = suite.parent;- return suite;-}-export default HtmlReporter;