All the properties that setupApplicationTest() sets up on your test's this context exist properly, except for element (the tests's root element). This is due to two unfortunate coincidences:
This means the lazily added element does not get added to the actual yadda context that the step function will see, so this.element is undefined there.
Don't know yet how to best fix this. For now you can workaround this by not using this.element but find()/findAll() (exposed by @ember/test-helpers) instead!
All the properties that
setupApplicationTest()sets up on your test'sthiscontext exist properly, except forelement(the tests's root element). This is due to two unfortunate coincidences:this.elementis set up lazily after the firstvisit()call here: https://github.com/emberjs/ember-test-helpers/blob/cce178256ae0e2946c76961fee29fa6d6df6f2fc/addon-test-support/%40ember/test-helpers/setup-application-context.js#L23-L27This means the lazily added
elementdoes not get added to the actual yadda context that the step function will see, sothis.elementis undefined there.Don't know yet how to best fix this. For now you can workaround this by not using
this.elementbutfind()/findAll()(exposed by@ember/test-helpers) instead!