chore: unflake 'should record' (#32880)

This commit is contained in:
Max Schmitt 2024-09-30 20:32:04 +02:00 committed by GitHub
parent 6f99d48a12
commit 6f16b6cc08
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View File

@ -126,6 +126,8 @@ export class RecorderCollection extends EventEmitter {
}
private _fireChange() {
if (!this._enabled)
return;
this.emit('change', collapseActions(this._actions));
}
}

View File

@ -188,9 +188,9 @@ test('test', async ({ page }) => {
await page.getByRole('button', { name: 'Submit' }).click();
});`
});
const length = events.length;
// No events after mode disabled
await backend.setRecorderMode({ mode: 'none' });
const length = events.length;
await page.getByRole('button').click();
expect(events).toHaveLength(length);
});