chore: make recorder tests pass in frozen mode (#32645)

This commit is contained in:
Pavel Feldman 2024-09-16 22:47:54 -07:00 committed by GitHub
parent 3bff7b6ab1
commit 47713e8a66
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -211,7 +211,7 @@ class RecordActionTool implements RecorderTool {
private _hoveredElement: HTMLElement | null = null;
private _activeModel: HighlightModel | null = null;
private _expectProgrammaticKeyUp = false;
private _pendingClickAction: { action: actions.ClickAction, timeout: NodeJS.Timeout } | undefined;
private _pendingClickAction: { action: actions.ClickAction, timeout: number } | undefined;
constructor(recorder: Recorder) {
this._recorder = recorder;
@ -268,7 +268,7 @@ class RecordActionTool implements RecorderTool {
modifiers: modifiersForEvent(event),
clickCount: event.detail
},
timeout: setTimeout(() => this._commitPendingClickAction(), 200)
timeout: this._recorder.injectedScript.builtinSetTimeout(() => this._commitPendingClickAction(), 200)
};
}
}