Skip to content
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

Merged

Conversation

lforst
Copy link
Member

@lforst lforst commented Oct 7, 2022

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.

@lforst lforst added this to the E2E Tests milestone Oct 7, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Oct 7, 2022

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 19.49 KB (+0.04% 🔺)
@sentry/browser - ES5 CDN Bundle (minified) 60.29 KB (+0.03% 🔺)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.1 KB (+0.04% 🔺)
@sentry/browser - ES6 CDN Bundle (minified) 53.22 KB (+0.03% 🔺)
@sentry/browser - Webpack (gzipped + minified) 19.83 KB (+0.03% 🔺)
@sentry/browser - Webpack (minified) 64.56 KB (+0.03% 🔺)
@sentry/react - Webpack (gzipped + minified) 19.85 KB (+0.03% 🔺)
@sentry/nextjs Client - Webpack (gzipped + minified) 44.75 KB (-1.78% 🔽)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 25.94 KB (-0.11% 🔽)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 24.38 KB (-0.07% 🔽)

@lforst lforst changed the title test(e2e): Add behaviour test for Errors in standard React E2E tests application test(e2e): Add behaviour test for Transactions in standard React E2E tests application Oct 10, 2022
@lforst lforst marked this pull request as ready for review October 10, 2022 11:10
Base automatically changed from lforst-standard-react-application-behaviour-e2e-test to master October 11, 2022 08:18
@lforst lforst force-pushed the lforst-standard-react-application-transaction-session-tests branch from 2a5733b to ffcb4b9 Compare October 11, 2022 08:25
Copy link
Member

@AbhiPrasad AbhiPrasad left a 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[];
Copy link
Member

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.');
Copy link
Member

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.

packages/e2e-tests/validate-auth-token.ts Outdated Show resolved Hide resolved
Copy link
Member

@AbhiPrasad AbhiPrasad left a 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

@lforst lforst merged commit 56868e8 into master Oct 11, 2022
@lforst lforst deleted the lforst-standard-react-application-transaction-session-tests branch October 11, 2022 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants