Skip to content

Commit 7cf7b73

Browse files
committed
debug playwright test
1 parent 3808b64 commit 7cf7b73

File tree

4 files changed

+10
-0
lines changed

4 files changed

+10
-0
lines changed

dev-packages/browser-integration-tests/suites/replay/canvas/withCanvasIntegrationFirst/test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ sentryTest('sets up canvas when adding ReplayCanvas integration first', async ({
2020

2121
await page.goto(url);
2222

23+
page.on('console', (m) => {
24+
console.log(m);
25+
});
2326
const replay = await getReplaySnapshot(page);
2427
const canvasOptions = replay._canvas;
2528
expect(canvasOptions?.sampling.canvas).toBe(2);

dev-packages/browser-integration-tests/suites/replay/canvas/withCanvasIntegrationSecond/test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ sentryTest('sets up canvas when adding ReplayCanvas integration after Replay', a
2020

2121
await page.goto(url);
2222

23+
page.on('console', (m) => {
24+
console.log(m);
25+
});
2326
const replay = await getReplaySnapshot(page);
2427
const canvasOptions = replay._canvas;
2528
expect(canvasOptions?.sampling.canvas).toBe(2);

packages/replay-canvas/src/canvas.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ const replayCanvasIntegration = ((options: Partial<ReplayCanvasOptions> = {}) =>
6666
getOptions(): ReplayCanvasIntegrationOptions {
6767
const { quality } = _canvasOptions;
6868

69+
console.log('getoptions');
6970
return {
7071
recordCanvas: true,
7172
getCanvasManager: (options: ConstructorParameters<typeof CanvasManager>[0]) => new CanvasManager(options),

packages/replay/src/integration.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,17 +357,20 @@ Sentry.init({ replaysOnErrorSampleRate: ${errorSampleRate} })`,
357357
private _maybeLoadFromReplayCanvasIntegration(): void {
358358
// To save bundle size, we skip checking for stuff here
359359
// and instead just try-catch everything - as generally this should all be defined
360+
console.log("maybeload")
360361
/* eslint-disable @typescript-eslint/no-non-null-assertion */
361362
try {
362363
const client = getClient()!;
363364
const canvasIntegration = client.getIntegrationById!('ReplayCanvas') as Integration & {
364365
getOptions(): ReplayCanvasIntegrationOptions;
365366
};
366367
if (!canvasIntegration) {
368+
console.log('no canvas integration');
367369
return;
368370
}
369371

370372
this._replay!['_canvas'] = canvasIntegration.getOptions();
373+
console.log(this._replay!['_canvas'])
371374
} catch {
372375
// ignore errors here
373376
}

0 commit comments

Comments
 (0)