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

Remove deprecated TransformTestSelectorParamsToHashPairs transform #758

Merged
merged 1 commit into from
Jul 5, 2021

Conversation

Turbo87
Copy link
Collaborator

@Turbo87 Turbo87 commented Jul 2, 2021

as deprecated in #751

@Turbo87 Turbo87 merged commit b63ba2c into mainmatter:master Jul 5, 2021
@Turbo87 Turbo87 deleted the params branch July 5, 2021 08:47
@bartocc
Copy link

bartocc commented Apr 28, 2022

Hi @Turbo87 👋

I am in the process of upgrading from ember-test-selectors@5 to ember-test-selectors@6.

One of our tests breakes with ember-test-selectors@6 with the error

router_js.js:1194 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'shouldSupersede')
    at NamedTransitionIntent.applyToHandlers (router_js.js:1194:1)
    at NamedTransitionIntent.applyToState (router_js.js:1137:1)
    at PrivateRouter.applyIntent (router_js.js:2148:1)
    at calculatePostTransitionState (router.js:1389:1)
    at Router._prepareQueryParams (router.js:868:1)
    at RouterState.isActiveIntent (router_state.js:26:1)
    at RoutingService.isActiveForRoute (routing.js:101:1)
    at LinkTo.isActiveForState (index.js:8187:1)
    at LinkTo.get isActive [as isActive] (index.js:8102:1)
    at LinkTo.get class (index.js:7962:1)

The error happens when clicking this LinkTo 👇

<LinkTo @route={{this.router.currentRouteName}} @query={{hash tab="dummy"}}>Click me</LinkTo>

If I remove the @query argument, no more error:

<LinkTo @route={{this.router.currentRouteName}}>Click me</LinkTo>

I should also add that the error only happens when I render the route with the LinkTo from its URL. If I transition to this route, and then click the LinkTo, no error…

You opened this emberjs/ember.js ticket, emberjs/ember.js#20051, with the same error, but the call stack is not exactly the same, and our codebase uses ember-source 3.28, not 4.3 like your ticket mentions…

You seem to have a better understanding of all this code than I do. Do you have any idea why this worked under ember-test-selectors@5, but not with ember-test-selectors@6, and what I could do to fix it?

Thanks a lot for your help!

@Turbo87
Copy link
Collaborator Author

Turbo87 commented Apr 29, 2022

unfortunately I have no clue why that would be the case. on first glance it seems unlikely that test-selectors would be able to cause this in any way since we don't interfere with routing at all 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants