Skip to content

Commit 1ab3477

Browse files
authored
test(replay): Streamline replay test imports (#7774)
We want to generally import from `@sentry/browser`, and just have one specific test to import from `@sentry/replay`.
1 parent ff71b78 commit 1ab3477

File tree

9 files changed

+11
-17
lines changed

9 files changed

+11
-17
lines changed

packages/browser-integration-tests/suites/replay/captureReplay/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { SDK_VERSION } from '@sentry/browser';
44
import { sentryTest } from '../../../utils/fixtures';
55
import { getReplayEvent, shouldSkipReplayTest, waitForReplayRequest } from '../../../utils/replayHelpers';
66

7-
sentryTest('should capture replays', async ({ getLocalTestPath, page }) => {
7+
sentryTest('should capture replays (@sentry/browser export)', async ({ getLocalTestPath, page }) => {
88
if (shouldSkipReplayTest()) {
99
sentryTest.skip();
1010
}

packages/browser-integration-tests/suites/replay/captureReplayViaBrowser/init.js renamed to packages/browser-integration-tests/suites/replay/captureReplayFromReplayPackage/init.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import * as Sentry from '@sentry/browser';
2+
import { Replay } from '@sentry/replay';
23

34
window.Sentry = Sentry;
4-
window.Replay = new Sentry.Replay({
5+
window.Replay = new Replay({
56
flushMinDelay: 200,
67
flushMaxDelay: 200,
78
});

packages/browser-integration-tests/suites/replay/captureReplayViaBrowser/test.ts renamed to packages/browser-integration-tests/suites/replay/captureReplayFromReplayPackage/test.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@ import { expect } from '@playwright/test';
22
import { SDK_VERSION } from '@sentry/browser';
33

44
import { sentryTest } from '../../../utils/fixtures';
5-
import { getReplayEvent, waitForReplayRequest } from '../../../utils/replayHelpers';
5+
import { getReplayEvent, shouldSkipReplayTest, waitForReplayRequest } from '../../../utils/replayHelpers';
66

7-
sentryTest('should capture replays (@sentry/browser export)', async ({ getLocalTestPath, page }) => {
8-
// For this test, we skip all bundle tests, as we're only interested in Replay being correctly
9-
// exported from the `@sentry/browser` npm package.
10-
if (process.env.PW_BUNDLE && process.env.PW_BUNDLE.startsWith('bundle_')) {
7+
sentryTest('should capture replays (@sentry/replay export)', async ({ getLocalTestPath, page }) => {
8+
if (shouldSkipReplayTest()) {
119
sentryTest.skip();
1210
}
1311

packages/browser-integration-tests/suites/replay/fileInput/init.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import * as Sentry from '@sentry/browser';
2-
import { Replay } from '@sentry/replay';
32

43
window.Sentry = Sentry;
5-
window.Replay = new Replay({
4+
window.Replay = new Sentry.Replay({
65
flushMinDelay: 200,
76
flushMaxDelay: 200,
87
useCompression: false,

packages/browser-integration-tests/suites/replay/privacyBlock/init.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import * as Sentry from '@sentry/browser';
2-
import { Replay } from '@sentry/replay';
32

43
window.Sentry = Sentry;
5-
window.Replay = new Replay({
4+
window.Replay = new Sentry.Replay({
65
flushMinDelay: 200,
76
flushMaxDelay: 200,
87
useCompression: false,

packages/browser-integration-tests/suites/replay/privacyDefault/init.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import * as Sentry from '@sentry/browser';
2-
import { Replay } from '@sentry/replay';
32

43
window.Sentry = Sentry;
5-
window.Replay = new Replay({
4+
window.Replay = new Sentry.Replay({
65
flushMinDelay: 200,
76
flushMaxDelay: 200,
87
useCompression: false,

packages/browser-integration-tests/suites/replay/privacyInput/init.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import * as Sentry from '@sentry/browser';
2-
import { Replay } from '@sentry/replay';
32

43
window.Sentry = Sentry;
5-
window.Replay = new Replay({
4+
window.Replay = new Sentry.Replay({
65
flushMinDelay: 200,
76
flushMaxDelay: 200,
87
useCompression: false,

packages/browser-integration-tests/suites/replay/privacyInputMaskAll/init.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import * as Sentry from '@sentry/browser';
2-
import { Replay } from '@sentry/replay';
32

43
window.Sentry = Sentry;
5-
window.Replay = new Replay({
4+
window.Replay = new Sentry.Replay({
65
flushMinDelay: 200,
76
flushMaxDelay: 200,
87
useCompression: false,

0 commit comments

Comments
 (0)