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(ember): Update ember tests to use E2E structure #11827

Merged
merged 7 commits into from
Jul 4, 2024

Conversation

mydea
Copy link
Member

@mydea mydea commented Apr 29, 2024

This gets rid of the Ember canary tests that are always failing, probably due to ember-try (which we use there) not playing nicely with the monorepo etc.

Instead, this now uses the proper E2E setup. I added two tests, for classic ember and modern embroider-based ember. While doing this I also noticed two bugs I fixed along the way :O

This also removed the ember canary tests, IMHO the e2e tests are good enough for us there now.

@mydea mydea self-assigned this Apr 29, 2024
@@ -75,9 +75,11 @@ export const instrumentRoutePerformance = <T extends RouteConstructor>(BaseRoute
{
attributes: {
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: source,
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.ember',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was actually missing, oops.

@@ -145,6 +145,12 @@ export function _instrumentEmberRouter(

routerService.on('routeWillChange', (transition: Transition) => {
const { fromRoute, toRoute } = getTransitionInformation(transition, routerService);

// We want to ignore loading && error routes
if (transitionIsIntermediate(transition)) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ember has a feature where you can easily add loading and error routes that are automatically picked up. However, if you do that it will also trigger transitions for them, which we don't really want here. So we need to filter them out here to avoid that we finish the "actual" routing spans too early.

@mydea mydea force-pushed the fn/ember-update-tests branch 2 times, most recently from 178c8f9 to 7b22096 Compare April 29, 2024 11:30
mydea added a commit that referenced this pull request Apr 30, 2024
Extracted out from
#11827.

I added tests for loading & error states as well, to ensure this does
not regress.
@mydea mydea force-pushed the fn/ember-update-tests branch 3 times, most recently from a620ce7 to a774dd1 Compare April 30, 2024 12:05
@mydea
Copy link
Member Author

mydea commented Apr 30, 2024

ref embroider-build/embroider#1893

Copy link
Contributor

github-actions bot commented Jul 4, 2024

size-limit report 📦

Path Size
@sentry/browser 22.24 KB (+0.09% 🔺)
@sentry/browser (incl. Tracing) 33.39 KB (+0.05% 🔺)
@sentry/browser (incl. Tracing, Replay) 69.14 KB (+0.02% 🔺)
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 62.47 KB (+0.03% 🔺)
@sentry/browser (incl. Tracing, Replay with Canvas) 73.2 KB (+0.03% 🔺)
@sentry/browser (incl. Tracing, Replay, Feedback) 85.81 KB (+0.02% 🔺)
@sentry/browser (incl. Tracing, Replay, Feedback, metrics) 87.68 KB (+0.02% 🔺)
@sentry/browser (incl. metrics) 26.51 KB (+0.05% 🔺)
@sentry/browser (incl. Feedback) 38.88 KB (+0.06% 🔺)
@sentry/browser (incl. sendFeedback) 26.86 KB (+0.06% 🔺)
@sentry/browser (incl. FeedbackAsync) 31.47 KB (+0.06% 🔺)
@sentry/react 24.97 KB (+0.04% 🔺)
@sentry/react (incl. Tracing) 36.44 KB (+0.03% 🔺)
@sentry/vue 26.34 KB (+0.06% 🔺)
@sentry/vue (incl. Tracing) 35.25 KB (+0.04% 🔺)
@sentry/svelte 22.37 KB (+0.08% 🔺)
CDN Bundle 23.45 KB (+0.09% 🔺)
CDN Bundle (incl. Tracing) 35.14 KB (+0.05% 🔺)
CDN Bundle (incl. Tracing, Replay) 69.24 KB (+0.03% 🔺)
CDN Bundle (incl. Tracing, Replay, Feedback) 74.43 KB (+0.03% 🔺)
CDN Bundle - uncompressed 68.87 KB (+0.11% 🔺)
CDN Bundle (incl. Tracing) - uncompressed 103.89 KB (+0.07% 🔺)
CDN Bundle (incl. Tracing, Replay) - uncompressed 214.28 KB (+0.04% 🔺)
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 226.99 KB (+0.04% 🔺)
@sentry/nextjs (client) 36.31 KB (+0.03% 🔺)
@sentry/sveltekit (client) 34.03 KB (+0.04% 🔺)
@sentry/node 130.71 KB (+0.02% 🔺)
@sentry/node - without tracing 91.73 KB (+0.03% 🔺)
@sentry/aws-serverless 116.9 KB (+0.02% 🔺)

@mydea mydea marked this pull request as ready for review July 4, 2024 11:06
@mydea mydea merged commit dc2659c into develop Jul 4, 2024
116 of 117 checks passed
@mydea mydea deleted the fn/ember-update-tests branch July 4, 2024 11:13
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.

None yet

2 participants