Skip to content

Commit 76aedc2

Browse files
committed
test(solidstart): Use the conventions constants in the tunnel tests
1 parent a1d4155 commit 76aedc2

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
},
2323
"devDependencies": {
2424
"@playwright/test": "~1.63.0",
25+
"@sentry/conventions": "0.27.0",
2526
"@sentry-internal/test-utils": "link:../../../test-utils",
2627
"@solidjs/meta": "^0.29.4",
2728
"@solidjs/router": "^1.0.0",

‎dev-packages/e2e-tests/test-applications/solidstart/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 the app middleware', async ({ page }) =>
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 the app middleware', async ({ page }) =>
2830
// would arrive first.
2931
const anchorSpanPromise = waitForStreamedSpan(
3032
APP_NAME,
31-
span => getSpanOp(span) === 'http.server' && String(span.attributes['url.path']?.value ?? '') === '/users/6',
33+
span => getSpanOp(span) === HTTP_SERVER && String(span.attributes[URL_PATH]?.value ?? '') === '/users/6',
3234
);
3335
await page.request.get('/users/6');
3436

0 commit comments

Comments
 (0)