flexi: img tag with src attribute in container raises error in acceptance test

I’ve notified @runspired in slack but I thought that I should write the issue here. On an new empty project, having an acceptance test for a route that contains this <container><img src="/assets/img/image.png"/></container> in its template raises the error:

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”…}

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 17 (1 by maintainers)

Most upvoted comments

Thanks for your persistence @HenryVonfire!

@HenryVonfire

@rwwagner90 says he has seen similar breakage from <container> and <grid responsive>, though I am still unable to reproduce (in Chrome, Safari, Firefox, or PhantomJS):

➜  tricky-test git:(master) ember test
cleaning up...
Built project successfully. Stored in "/Users/kybishop/github/tricky-test/tmp/core_object-tests_dist-Q4PSPEjK.tmp".
ok 1 PhantomJS 2.1 - Acceptance | application: visiting /application
ok 2 PhantomJS 2.1 - JSHint | acceptance/application-test.js: should pass jshint
ok 3 PhantomJS 2.1 - JSHint | app.js: should pass jshint
ok 4 PhantomJS 2.1 - JSHint | helpers/destroy-app.js: should pass jshint
ok 5 PhantomJS 2.1 - JSHint | helpers/module-for-acceptance.js: should pass jshint
ok 6 PhantomJS 2.1 - JSHint | helpers/resolver.js: should pass jshint
ok 7 PhantomJS 2.1 - JSHint | helpers/start-app.js: should pass jshint
ok 8 PhantomJS 2.1 - JSHint | resolver.js: should pass jshint
ok 9 PhantomJS 2.1 - JSHint | router.js: should pass jshint
ok 10 PhantomJS 2.1 - JSHint | test-helper.js: should pass jshint

1..10
# tests 10
# pass  10
# skip  0
# fail  0

# ok

Going to re-open this and assign to RWW since he mentioned looking into it. A bit hard for me without being able to repro 😉

@HenryVonfire the img has nothing to do with anything, I don’t think. I think container and grid responsive just break the run loop in acceptance tests. I believe we are not wrapping in run.join for performance reasons, but it breaks testing. @runspired can you please confirm?