Skip to content

Commit

Permalink
cherry-pick(#32880): chore: unflake 'should record'
Browse files Browse the repository at this point in the history
  • Loading branch information
mxschmitt committed Sep 30, 2024
1 parent d3e38c3 commit 7155356
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ export class RecorderCollection extends EventEmitter {
}

private _fireChange() {
if (!this._enabled)
return;
this.emit('change', collapseActions(this._actions));
}
}
2 changes: 1 addition & 1 deletion tests/library/debug-controller.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand Down

0 comments on commit 7155356

Please sign in to comment.