temp revert #81
This patch introduce a breaking change in rrweb-record's API, so we will revert it in 0.7.x and release it in 0.8.
This commit is contained in:
@@ -23,7 +23,6 @@ interface ISuite extends Suite {
|
||||
interface IWindow extends Window {
|
||||
rrweb: {
|
||||
record: (options: recordOptions) => listenerHandler | undefined;
|
||||
addCustomEvent<T>(tag: string, payload: T): void;
|
||||
};
|
||||
emit: (e: eventWithTime) => undefined;
|
||||
}
|
||||
@@ -181,19 +180,4 @@ describe('record', function(this: ISuite) {
|
||||
await this.page.waitFor(50);
|
||||
assertSnapshot(this.events, __filename, 'async-checkout');
|
||||
});
|
||||
|
||||
it('can add custom event', async () => {
|
||||
await this.page.evaluate(() => {
|
||||
const { record, addCustomEvent } = (window as IWindow).rrweb;
|
||||
record({
|
||||
emit: (window as IWindow).emit,
|
||||
});
|
||||
addCustomEvent<number>('tag1', 1);
|
||||
addCustomEvent<{ a: string }>('tag2', {
|
||||
a: 'b',
|
||||
});
|
||||
});
|
||||
await this.page.waitFor(50);
|
||||
assertSnapshot(this.events, __filename, 'custom-event');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user