-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
test(tracing): Add integration tests for pageload
and navigation
#4376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
size-limit report
|
trace_id: '12312012123120121231201212312012', | ||
}); | ||
|
||
expect(eventData.spans?.length).toBeGreaterThan(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we assert that navigation transactions won't have the same trace ID and parent span ID?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 adding the assertions to navigation tests at -> packages/integration-tests/suites/tracing/browsertracing/navigation/test.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also needed for the meta tests, to make sure that navigation transactions don't continue a transaction from the meta header.
// This is the `pageload` transaction | ||
await getSentryTransactionRequest(page, url); | ||
|
||
const navigationRequest = await getSentryTransactionRequest(page, `${url}#foo`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather us use the multiple transactions helper here.
I would also like to see some more assertions to show the differences between pageload and navigation transactions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather us use the multiple transactions helper here.
My intention here is to initiate a navigation (to #foo
) after the pageload
transaction, so it's not possible to use the helper as it operates on a single URL for all requests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah got it - my mistake.
… into onur/tests-browsertracing
…n` transactions.
Part of: #4262