201-created / ember-cli-acceptance-test-helpers

A set of useful test helpers for ember acceptance tests.
https://www.npmjs.com/package/ember-cli-acceptance-test-helpers
MIT License
47 stars 17 forks source link

`clickComponent` lookupFactory of undefined error #30

Closed alexdiliberto closed 8 years ago

alexdiliberto commented 8 years ago

Anytime I call clickComponent, I get the following error. I even created a dummy app locally in its most pared down form to reproduce.

TypeError: Cannot read property 'lookupFactory' of undefined
    at lookupComponent (lookup.js:11)
    at clickComponent (async.js:6)
    at ember.debug.js:40913
    at isolate (ember.debug.js:41114)
    at ember.debug.js:41098
    at tryCatch (ember.debug.js:53543)
    at Object.invokeCallback (ember.debug.js:53558)
    at ember.debug.js:55684
    at ember.debug.js:32082
    at Queue.invoke (ember.debug.js:333)

The issue stems from the following commit https://github.com/201-created/ember-cli-acceptance-test-helpers/commit/2cfc1b84174baf9f5aa75b92e177772af1cd013d

Where now in v0.4.0+ app.container will be undefined https://github.com/201-created/ember-cli-acceptance-test-helpers/blob/v0.4.0/test-support/helpers/201-created/async.js#L5

I believe something like the following which you're already doing would fix the issue: https://github.com/201-created/ember-cli-acceptance-test-helpers/blob/v0.4.0/test-support/helpers/201-created/raw/expect-component.js#L8-L12

alexdiliberto commented 8 years ago

friendly ping @iezer

iezer commented 8 years ago

@alexdiliberto Thanks for raising this. Can you please open a PR and we'll get it merged?

alexdiliberto commented 8 years ago

@iezer Forgot to link back here, I created that PR

https://github.com/201-created/ember-cli-acceptance-test-helpers/pull/31

iezer commented 8 years ago

@alexdiliberto Thanks again for your help. I've released this as 0.4.2 I'm closing this issue. Please let us know if you have any other feedback.