Skip to content

Commit d265a85

Browse files
committed
add integration test for router
1 parent 71d3085 commit d265a85

File tree

1 file changed

+17
-0
lines changed
  • packages/integration-tests/suites/tracing/browsertracing/source

1 file changed

+17
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { expect } from '@playwright/test';
2+
import { Event } from '@sentry/types';
3+
4+
import { sentryTest } from '../../../../utils/fixtures';
5+
import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers';
6+
7+
sentryTest('transactions should contain transaction source', async ({ getLocalTestPath, page }) => {
8+
const url = await getLocalTestPath({ testDir: __dirname });
9+
10+
const pageloadRequest = await getFirstSentryEnvelopeRequest<Event>(page, url);
11+
const navigationRequest = await getFirstSentryEnvelopeRequest<Event>(page, `${url}#foo`);
12+
13+
expect(pageloadRequest).toEqual({});
14+
15+
expect(pageloadRequest.transaction_info?.source).toEqual('url');
16+
expect(navigationRequest.transaction_info?.source).toEqual('url');
17+
});

0 commit comments

Comments
 (0)