Skip to content

Commit 0916dc3

Browse files
committed
move functionality to replay
1 parent 702a05d commit 0916dc3

File tree

25 files changed

+92
-76
lines changed

25 files changed

+92
-76
lines changed

packages/browser-integration-tests/suites/integrations/ExtendedNetworkBreadcrumbs/fetch/init.js

Lines changed: 0 additions & 11 deletions
This file was deleted.

packages/browser-integration-tests/suites/integrations/ExtendedNetworkBreadcrumbs/xhr/init.js

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
const xhr = new XMLHttpRequest();
2-
31
fetch('http://localhost:7654/foo', {
42
headers: {
53
Accept: 'application/json',
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,13 @@ import type { Event } from '@sentry/types';
33

44
import { sentryTest } from '../../../../../utils/fixtures';
55
import { getFirstSentryEnvelopeRequest } from '../../../../../utils/helpers';
6+
import { shouldSkipReplayTest } from '../../../../../utils/replayHelpers';
67

78
sentryTest('parses response_body_size from Content-Length header if available', async ({ getLocalTestPath, page }) => {
9+
if (shouldSkipReplayTest()) {
10+
sentryTest.skip();
11+
}
12+
813
const url = await getLocalTestPath({ testDir: __dirname });
914

1015
await page.route('**/foo', route => {
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import * as Sentry from '@sentry/browser';
2+
3+
window.Sentry = Sentry;
4+
window.Replay = new Sentry.Replay({
5+
flushMinDelay: 200,
6+
flushMaxDelay: 200,
7+
});
8+
9+
Sentry.init({
10+
dsn: 'https://[email protected]/1337',
11+
sampleRate: 1,
12+
// We ensure to sample for errors, so by default nothing is sent
13+
replaysSessionSampleRate: 0.0,
14+
replaysOnErrorSampleRate: 1.0,
15+
16+
integrations: [window.Replay],
17+
});
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
const xhr = new XMLHttpRequest();
2-
31
fetch('http://localhost:7654/foo', {
42
headers: {
53
Accept: 'application/json',
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,13 @@ import type { Event } from '@sentry/types';
33

44
import { sentryTest } from '../../../../../utils/fixtures';
55
import { getFirstSentryEnvelopeRequest } from '../../../../../utils/helpers';
6+
import { shouldSkipReplayTest } from '../../../../../utils/replayHelpers';
67

78
sentryTest('does not capture response_body_size without Content-Length header', async ({ getLocalTestPath, page }) => {
9+
if (shouldSkipReplayTest()) {
10+
sentryTest.skip();
11+
}
12+
813
const url = await getLocalTestPath({ testDir: __dirname });
914

1015
await page.route('**/foo', route => {
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
const xhr = new XMLHttpRequest();
2-
31
const blob = new Blob(['<html>Hello world!!</html>'], { type: 'text/html' });
42

53
fetch('http://localhost:7654/foo', {
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,13 @@ import type { Event } from '@sentry/types';
33

44
import { sentryTest } from '../../../../../utils/fixtures';
55
import { getFirstSentryEnvelopeRequest } from '../../../../../utils/helpers';
6+
import { shouldSkipReplayTest } from '../../../../../utils/replayHelpers';
67

78
sentryTest('calculates body sizes for non-string bodies', async ({ getLocalTestPath, page }) => {
9+
if (shouldSkipReplayTest()) {
10+
sentryTest.skip();
11+
}
12+
813
const url = await getLocalTestPath({ testDir: __dirname });
914

1015
await page.route('**/foo', async route => {
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
const xhr = new XMLHttpRequest();
2-
31
fetch('http://localhost:7654/foo', {
42
method: 'POST',
53
headers: {

0 commit comments

Comments
 (0)