-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
test(e2e): Add behaviour test for Transactions in standard React E2E tests application #5912
test(e2e): Add behaviour test for Transactions in standard React E2E tests application #5912
Conversation
size-limit report 📦
|
…ct-application-transaction-session-tests
2a5733b
to
ffcb4b9
Compare
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.
🫡
return undefined; | ||
} | ||
}); | ||
const recordedTransactionEventIds = (await recordedTransactionsHandle.jsonValue()) as string[]; |
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.
l: Why is the type assertion needed? Shouldn’t we handled the other case here?
const recordedTransactionEventIds = (await recordedTransactionsHandle.jsonValue()) as string[]; | ||
|
||
const timeout = setTimeout(() => { | ||
throw new Error('Timeout reached while polling events.'); |
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.
l: let’s make this a util that (timeout + fetch):
- handles a timeout for polling
- allows for a hardcoded retry amount
- throws an error when 500s are returned
We can also do this in a follow up PR, since we are consolidating with the errors tests.
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.
Clean! I like the poll usage
Ref: #5855
Similar to #5909 adds an behaviour E2E test that checks whether pageload and navigation transactions correctly end up in Sentry for a React application.