make contextId optional in trace file

This commit is contained in:
Yury Semikhatsky 2025-02-06 11:38:58 -08:00
parent 06e564b3f6
commit 19664d172f
3 changed files with 2 additions and 3 deletions

View file

@ -58,7 +58,6 @@ export class TestTracing {
wallTime: Date.now(),
monotonicTime: monotonicTime(),
sdkLanguage: 'javascript',
contextId: '',
};
this._appendTraceEvent(this._contextCreatedEvent);
}

View file

@ -92,7 +92,7 @@ export class TraceModernizer {
contextEntry.sdkLanguage = event.sdkLanguage;
contextEntry.options = event.options;
contextEntry.testIdAttributeName = event.testIdAttributeName;
contextEntry.contextId = event.contextId;
contextEntry.contextId = event.contextId ?? '';
break;
}
case 'screencast-frame': {

View file

@ -44,7 +44,7 @@ export type ContextCreatedTraceEvent = {
options: BrowserContextEventOptions,
sdkLanguage?: Language,
testIdAttributeName?: string,
contextId: string,
contextId?: string,
};
export type ScreencastFrameTraceEvent = {