mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
chore: remove unused project to id mapping from html builder (#31698)
This commit is contained in:
parent
0aa2f06f68
commit
37ffbd757e
@ -226,8 +226,6 @@ class HtmlBuilder {
|
|||||||
private _dataZipFile: ZipFile;
|
private _dataZipFile: ZipFile;
|
||||||
private _hasTraces = false;
|
private _hasTraces = false;
|
||||||
private _attachmentsBaseURL: string;
|
private _attachmentsBaseURL: string;
|
||||||
private _projectToId: Map<Suite, number> = new Map();
|
|
||||||
private _lastProjectId = 0;
|
|
||||||
|
|
||||||
constructor(config: FullConfig, outputDir: string, attachmentsBaseURL: string) {
|
constructor(config: FullConfig, outputDir: string, attachmentsBaseURL: string) {
|
||||||
this._config = config;
|
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[]) {
|
private _serializeAttachments(attachments: JsonAttachment[]) {
|
||||||
let lastAttachment: TestAttachment | undefined;
|
let lastAttachment: TestAttachment | undefined;
|
||||||
return attachments.map(a => {
|
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;
|
export default HtmlReporter;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user