Skip to content

Commit 0550ac6

Browse files
committed
fix e2e tests
1 parent 015c1db commit 0550ac6

File tree

4 files changed

+42
-2
lines changed

4 files changed

+42
-2
lines changed

dev-packages/e2e-tests/test-applications/create-next-app/tests/client-transactions.test.ts

+12-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ test('Sends a pageload transaction to Sentry', async ({ page }) => {
4343
);
4444
});
4545

46-
test('captures a navigation transcation to Sentry', async ({ page }) => {
46+
test('captures a navigation transaction to Sentry', async ({ page }) => {
4747
const clientNavigationTxnEventPromise = waitForTransaction('create-next-app', txnEvent => {
4848
return txnEvent?.transaction === '/user/[id]';
4949
});
@@ -53,7 +53,7 @@ test('captures a navigation transcation to Sentry', async ({ page }) => {
5353
// navigation to page
5454
const clickPromise = page.getByText('navigate').click();
5555

56-
const [clientTxnEvent, serverTxnEvent, _1] = await Promise.all([clientNavigationTxnEventPromise, clickPromise]);
56+
const [clientTxnEvent, serverTxnEvent] = await Promise.all([clientNavigationTxnEventPromise, clickPromise]);
5757

5858
expect(clientTxnEvent).toEqual(
5959
expect.objectContaining({
@@ -76,6 +76,16 @@ test('captures a navigation transcation to Sentry', async ({ page }) => {
7676
'sentry.sample_rate': 1,
7777
'sentry.source': 'route',
7878
}),
79+
links: [
80+
{
81+
attributes: {
82+
'sentry.link.type': 'previous_trace',
83+
},
84+
sampled: true,
85+
span_id: expect.stringMatching(/[a-f0-9]{16}/),
86+
trace_id: expect.stringMatching(/[a-f0-9]{32}/),
87+
},
88+
],
7989
},
8090
},
8191
request: {

dev-packages/e2e-tests/test-applications/react-create-browser-router/tests/transactions.test.ts

+10
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,16 @@ test('Captures a lazy navigation transaction', async ({ page }) => {
145145
'sentry.sample_rate': 1,
146146
'sentry.source': 'route',
147147
}),
148+
links: [
149+
{
150+
attributes: {
151+
'sentry.link.type': 'previous_trace',
152+
},
153+
sampled: true,
154+
span_id: expect.stringMatching(/[a-f0-9]{16}/),
155+
trace_id: expect.stringMatching(/[a-f0-9]{32}/),
156+
},
157+
],
148158
op: 'navigation',
149159
span_id: expect.stringMatching(/[a-f0-9]{16}/),
150160
trace_id: expect.stringMatching(/[a-f0-9]{32}/),

dev-packages/e2e-tests/test-applications/react-create-hash-router/tests/transactions.test.ts

+10
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,16 @@ test('Captures a navigation transaction', async ({ page }) => {
122122
'sentry.sample_rate': 1,
123123
'sentry.source': 'route',
124124
}),
125+
links: [
126+
{
127+
attributes: {
128+
'sentry.link.type': 'previous_trace',
129+
},
130+
sampled: true,
131+
span_id: expect.stringMatching(/[a-f0-9]{16}/),
132+
trace_id: expect.stringMatching(/[a-f0-9]{32}/),
133+
},
134+
],
125135
op: 'navigation',
126136
span_id: expect.stringMatching(/[a-f0-9]{16}/),
127137
trace_id: expect.stringMatching(/[a-f0-9]{32}/),

dev-packages/e2e-tests/test-applications/react-create-memory-router/tests/transactions.test.ts

+10
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,16 @@ test('Captures a navigation transaction', async ({ page }) => {
5555
'sentry.sample_rate': 1,
5656
'sentry.source': 'route',
5757
}),
58+
links: [
59+
{
60+
attributes: {
61+
'sentry.link.type': 'previous_trace',
62+
},
63+
sampled: true,
64+
span_id: 'ab3fd8c9ce9d134a',
65+
trace_id: 'ee68b12db60a4aca9da1ac2ceac3f55d',
66+
},
67+
],
5868
op: 'navigation',
5969
span_id: expect.stringMatching(/[a-f0-9]{16}/),
6070
trace_id: expect.stringMatching(/[a-f0-9]{32}/),

0 commit comments

Comments
 (0)