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

Draft
wants to merge 4 commits into
base: develop
Choose a base branch
from

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

@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 2 times, most recently from ef0e1dc to f7c88f9 Compare April 30, 2024 11:02
@mydea
Copy link
Member Author

mydea commented Apr 30, 2024

ref embroider-build/embroider#1893

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

1 participant