@Henry wrote:
I was having this error in an acceptance test
Uncaught (in promise) EmberError {description: undefined, fileName: undefined, lineNumber: undefined, message: "Assertion Failed: You have turned on testing mode,… any code with asynchronous side-effects in a run", name: "Error"…}
until I finally managed to isolate it and find the cause. For some reason, it's considering the image url in the
src
attribute as a promise
<img id="avatar-image" src="/assets/img/user-avatar.png" class="sign-up__avatar" alt="Avatar image"/>
This
img
tag is inside a component that I'm calling in theregister
route in which I'm performing the acceptance test.I've tried to reproduce it in a new project but there it has worked without problems. So I it must be something in my code that is interfering in some way.
I've tried several things to discover what is different from the new project in which it works:
1) reduce the acceptance test only to check the default test (visiting theregister
route). The error still persists.
2) reduce the component to its default form, having in the template theimg
tag with thesrc
attribute set. The error still persists.
3) reduce theregister
route to its default form with theimg
tag in its template. The error still persistsPlacing the
img
tag in other routes or in the application template don't raise the error (not even in their acceptance tests).I've also checked if there is something different from my acceptance test and a generated one but they are the same.
Do you have any idea/similar experiences why this could be happening?
Posts: 3
Participants: 2