question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

link-to in integration tests throw: Cannot read property 'applyIntent' of undefined

See original GitHub issue

The following error occurs on canary (but works properly on prior releases) for this test:

not ok 47 Chrome 62.0 - component:o it can render a link-to
    ---
        actual: >
            false
        expected: >
            true
        stack: >
            Error: Assertion Failed: You attempted to define a `{{link-to "index"}}` but did not pass the parameters required for generating its dynamic segments. Cannot read property 'applyIntent' of undefined
                at new EmberError (http://localhost:7357/assets/vendor.js:13925:25)
                at assert (http://localhost:7357/assets/vendor.js:14168:15)
                at Class.computeLinkToComponentHref (http://localhost:7357/assets/vendor.js:17044:65)
                at ComputedPropertyPrototype.get (http://localhost:7357/assets/vendor.js:25789:28)
                at get (http://localhost:7357/assets/vendor.js:25131:20)
                at RootPropertyReference.compute (http://localhost:7357/assets/vendor.js:21709:40)
                at RootPropertyReference.value (http://localhost:7357/assets/vendor.js:21590:53)
                at ReferenceCache.initialize (http://localhost:7357/assets/vendor.js:924:52)
                at ReferenceCache.peek (http://localhost:7357/assets/vendor.js:898:29)
                at DynamicAttribute.flush (http://localhost:7357/assets/vendor.js:2776:37)
        message: >
            Assertion Failed: You attempted to define a `{{link-to "index"}}` but did not pass the parameters required for generating its dynamic segments. Cannot read property 'applyIntent' of undefined

The test is attempting to ensure that a component integration test is capable of rendering a {{link-to}} even when the router is not booted/available.

Demo repo here


I suspect it was caused by one of the following PR’s which have changed things in the routing and/or link-to area:

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
bekzodcommented, Nov 8, 2017

@rwjblue sure I am looking

0reactions
simonihmigcommented, Nov 22, 2017

Can confirm this.

I didn’t think the issue was only for inline link-to. I’ll test though.

This as well: happens for inline as well as block form of link-to!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Spring Boot integration tests doesn't read properties files
properties file using @Value annotation. But every time I'm running test my assertion fails because Spring is unable to read the value: org.junit....
Read more >
To stub or not to stub the router service in integration tests
To tests this, I would write an integration test where I would stub ... Source: TypeError: Cannot read property 'generate' of undefined at ......
Read more >
creating a unit test typeerror: cannot read property ... - You.com
TypeError : Cannot read property 'get' of undefined while writing unit test with axios. React testing with Jest and Enzyme @react-google-maps/api returns ...
Read more >
14. Integration Testing - Spring
A class-level annotation that is used to configure the locations of properties files and inlined properties to be added to the set of...
Read more >
Spring Boot Unit Testing and Integration Testing with JUnit ...
testing #unittesting #junit5 #junit #java #mocktest #mock #mockito #springboot #springunittesting #integrationtestsTimestamps:--00:04:11 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found