Skip to content

Commit dbef016

Browse files
committed
move to request and response objects
1 parent e9dcce0 commit dbef016

File tree

18 files changed

+112
-35
lines changed

18 files changed

+112
-35
lines changed

packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureBodies/test.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,17 @@ sentryTest('captures requestBody & responseBody when experiment is configured',
7979
{
8080
data: {
8181
method: 'POST',
82+
statusCode: 200,
8283
requestBodySize: 13,
8384
responseBodySize: 14,
84-
requestBody: '{"foo":"bar"}',
85-
responseBody: '{"res":"this"}',
86-
statusCode: 200,
85+
request: {
86+
size: 13,
87+
body: '{"foo":"bar"}',
88+
},
89+
response: {
90+
size: 14,
91+
body: '{"res":"this"}',
92+
},
8793
},
8894
description: 'http://localhost:7654/foo',
8995
endTimestamp: expect.any(Number),

packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureNonTextBodies/test.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,17 @@ sentryTest(
8484
{
8585
data: {
8686
method: 'POST',
87+
statusCode: 200,
8788
requestBodySize: 16,
8889
responseBodySize: 24,
89-
requestBody: 'name=Anne&age=32',
90-
responseBody: '<html>Hello world</html>',
91-
statusCode: 200,
90+
request: {
91+
size: 16,
92+
body: 'name=Anne&age=32',
93+
},
94+
response: {
95+
size: 24,
96+
body: '<html>Hello world</html>',
97+
},
9298
},
9399
description: 'http://localhost:7654/foo',
94100
endTimestamp: expect.any(Number),

packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/contentLengthHeader/test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,11 @@ sentryTest('parses response_body_size from Content-Length header if available',
7979
{
8080
data: {
8181
method: 'GET',
82-
responseBodySize: 789,
8382
statusCode: 200,
83+
responseBodySize: 789,
84+
response: {
85+
size: 789,
86+
},
8487
},
8588
description: 'http://localhost:7654/foo',
8689
endTimestamp: expect.any(Number),

packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/noContentLengthHeader/test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,11 @@ sentryTest('does not capture response_body_size without Content-Length header',
7878
{
7979
data: {
8080
method: 'GET',
81-
responseBodySize: 29,
8281
statusCode: 200,
82+
responseBodySize: 29,
83+
response: {
84+
size: 29,
85+
},
8386
},
8487
description: 'http://localhost:7654/foo',
8588
endTimestamp: expect.any(Number),

packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/nonTextBodySizes/test.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,15 @@ sentryTest('calculates body sizes for non-string bodies', async ({ getLocalTestP
8181
{
8282
data: {
8383
method: 'POST',
84+
statusCode: 200,
8485
requestBodySize: 26,
8586
responseBodySize: 24,
86-
statusCode: 200,
87+
request: {
88+
size: 26,
89+
},
90+
response: {
91+
size: 24,
92+
},
8793
},
8894
description: 'http://localhost:7654/foo',
8995
endTimestamp: expect.any(Number),

packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/requestBodySize/test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,11 @@ sentryTest('captures requestBodySize when body is sent', async ({ getLocalTestPa
7777
{
7878
data: {
7979
method: 'POST',
80-
requestBodySize: 13,
8180
statusCode: 200,
81+
requestBodySize: 13,
82+
request: {
83+
size: 13,
84+
},
8285
},
8386
description: 'http://localhost:7654/foo',
8487
endTimestamp: expect.any(Number),

packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureBodies/test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ sentryTest(
8585
{
8686
data: {
8787
method: 'POST',
88+
statusCode: 200,
8889
requestBodySize: 13,
8990
responseBodySize: 14,
90-
requestBody: '{"foo":"bar"}',
91-
responseBody: '{"res":"this"}',
92-
statusCode: 200,
91+
request: { size: 13, body: '{"foo":"bar"}' },
92+
response: { size: 14, body: '{"res":"this"}' },
9393
},
9494
description: 'http://localhost:7654/foo',
9595
endTimestamp: expect.any(Number),

packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureNonTextBodies/test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,11 @@ sentryTest(
8888
{
8989
data: {
9090
method: 'POST',
91+
statusCode: 200,
9192
requestBodySize: 16,
9293
responseBodySize: 24,
93-
requestBody: 'name=Anne&age=32',
94-
responseBody: '<html>Hello world</html>',
95-
statusCode: 200,
94+
request: { size: 16, body: 'name=Anne&age=32' },
95+
response: { size: 24, body: '<html>Hello world</html>' },
9696
},
9797
description: 'http://localhost:7654/foo',
9898
endTimestamp: expect.any(Number),

packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/contentLengthHeader/test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,9 @@ sentryTest(
8686
{
8787
data: {
8888
method: 'GET',
89-
responseBodySize: 789,
9089
statusCode: 200,
90+
responseBodySize: 789,
91+
response: { size: 789 },
9192
},
9293
description: 'http://localhost:7654/foo',
9394
endTimestamp: expect.any(Number),

packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/noContentLengthHeader/test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,9 @@ sentryTest(
8686
{
8787
data: {
8888
method: 'GET',
89-
responseBodySize: 29,
9089
statusCode: 200,
90+
responseBodySize: 29,
91+
response: { size: 29 },
9192
},
9293
description: 'http://localhost:7654/foo',
9394
endTimestamp: expect.any(Number),

0 commit comments

Comments
 (0)