Skip to content

Commit fa4e4a1

Browse files
committed
test(remix): Use the conventions constants in the tunnel tests
1 parent 6fa2ac5 commit fa4e4a1

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

‎dev-packages/e2e-tests/test-applications/remix-v3/package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
},
1818
"devDependencies": {
1919
"@playwright/test": "~1.63.0",
20+
"@sentry/conventions": "0.27.0",
2021
"@sentry-internal/test-utils": "link:../../../test-utils",
2122
"@sentry/core": "file:../../packed/sentry-core-packed.tgz",
2223
"@types/node": "^24.6.0",

‎dev-packages/e2e-tests/test-applications/remix-v3/tests/tunnel.test.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { URL_PATH } from '@sentry/conventions/attributes';
2+
import { HTTP_SERVER } from '@sentry/conventions/op';
13
import { expect, test } from '@playwright/test';
24
import { getSpanOp, waitForStreamedSpan } from '@sentry-internal/test-utils';
35

@@ -12,7 +14,7 @@ test('answers the managed tunnel before route matching and the app middleware',
1214

1315
const tunnelServerSpanPromise = waitForStreamedSpan(
1416
APP_NAME,
15-
span => getSpanOp(span) === 'http.server' && TUNNEL_PATH.test(String(span.attributes['url.path']?.value ?? '')),
17+
span => getSpanOp(span) === HTTP_SERVER && TUNNEL_PATH.test(String(span.attributes[URL_PATH]?.value ?? '')),
1618
);
1719
const tunnelResponsePromise = page.waitForResponse(
1820
response => response.request().method() === 'POST' && TUNNEL_PATH.test(new URL(response.url()).pathname),
@@ -28,7 +30,7 @@ test('answers the managed tunnel before route matching and the app middleware',
2830
// would arrive first.
2931
const anchorSpanPromise = waitForStreamedSpan(
3032
APP_NAME,
31-
span => getSpanOp(span) === 'http.server' && String(span.attributes['url.path']?.value ?? '') === '/api/items/1',
33+
span => getSpanOp(span) === HTTP_SERVER && String(span.attributes[URL_PATH]?.value ?? '') === '/api/items/1',
3234
);
3335
await page.request.get('/api/items/1');
3436

0 commit comments

Comments
 (0)