mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
fix(recorder): do not ignore signals except for navigation (#30994)
When a signal arrives late enough, after the last action was committed in 5 seconds, we should still account for it. This includes downloads, popups and dialogs, but not navigations. Exposed by a flaky test "should record open in a new tab with url".
This commit is contained in:
parent
ae1e07de10
commit
c906448fe2
@ -130,7 +130,8 @@ export class CodeGenerator extends EventEmitter {
|
|||||||
this._currentAction.action.signals.push(signal);
|
this._currentAction.action.signals.push(signal);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this._lastAction && !this._lastAction.committed) {
|
|
||||||
|
if (this._lastAction && (!this._lastAction.committed || signal.name !== 'navigation')) {
|
||||||
const signals = this._lastAction.action.signals;
|
const signals = this._lastAction.action.signals;
|
||||||
if (signal.name === 'navigation' && signals.length && signals[signals.length - 1].name === 'download')
|
if (signal.name === 'navigation' && signals.length && signals[signals.length - 1].name === 'download')
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user