Skip to content

Commit e3edf79

Browse files
committed
only delete replay tests, more debugging
1 parent 8092f21 commit e3edf79

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

packages/integration-tests/suites/replay/privacyInput/test.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,11 @@ sentryTest('should mask input initial value and its changes', async ({ getLocalT
4040
const text = 'test';
4141

4242
page.on('console', message => console.log(message.text()))
43-
const input = page.locator('#input');
44-
await input.press('t')
45-
await input.press('e')
46-
await input.press('s')
47-
await input.press('t')
43+
await page.locator('#input').type(text);
4844
console.log('input value: ', await page.locator('#input').inputValue());
45+
console.log('before force flush', new Date().getTime())
4946
await forceFlushReplay();
47+
console.log('after force flush', new Date().getTime())
5048
const allSnapshots = getIncrementalRecordingSnapshots(await reqPromise1);
5149
const snapshots = allSnapshots.filter(isInputMutation);
5250
const lastSnapshot = snapshots[snapshots.length - 1];

packages/replay/src/coreHandlers/handleScope.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,5 @@ export function handleScope(scope: Scope): Breadcrumb | null {
4848
return null;
4949
}
5050

51-
// eslint-disable-next-line
52-
console.log({newBreadcrumb})
53-
5451
return createBreadcrumb(newBreadcrumb);
5552
}

packages/replay/src/replay.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable max-lines */ // TODO: We might want to split this file up
2-
import { EventType, record } from '@sentry-internal/rrweb';
2+
import { EventType, IncrementalSource, record } from '@sentry-internal/rrweb';
33
import { captureException, getCurrentHub } from '@sentry/core';
44
import type { Breadcrumb, ReplayRecordingMode } from '@sentry/types';
55
import { logger } from '@sentry/utils';
@@ -203,6 +203,7 @@ export class ReplayContainer implements ReplayContainerInterface {
203203
// Without this, it would record forever, until an error happens, which we don't want
204204
// instead, we'll always keep the last 60 seconds of replay before an error happened
205205
...(this.recordingMode === 'error' && { checkoutEveryNms: ERROR_CHECKOUT_TIME }),
206+
recordCrossOriginIframes: true,
206207
emit: this._handleRecordingEmit,
207208
});
208209
} catch (err) {
@@ -528,6 +529,10 @@ export class ReplayContainer implements ReplayContainerInterface {
528529
return;
529530
}
530531

532+
if (event.type === EventType.IncrementalSnapshot && event.data.source === IncrementalSource.Input) {
533+
console.log(JSON.stringify(event));
534+
}
535+
531536
this.addUpdate(() => {
532537
// The session is always started immediately on pageload/init, but for
533538
// error-only replays, it should reflect the most recent checkout
@@ -795,7 +800,7 @@ export class ReplayContainer implements ReplayContainerInterface {
795800
// Note this empties the event buffer regardless of outcome of sending replay
796801
const recordingData = await this.eventBuffer.finish();
797802

798-
console.log('RUNNING FLUSH')
803+
console.log('RUNNING FLUSH', new Date().getTime())
799804
// NOTE: Copy values from instance members, as it's possible they could
800805
// change before the flush finishes.
801806
const replayId = this.session.id;

0 commit comments

Comments
 (0)