adopted-ember-addons / ember-cli-flash

Simple, highly configurable flash messages for ember-cli
https://www.npmjs.com/package/ember-cli-flash
MIT License
355 stars 113 forks source link

Blueprint doesn't install test helper in Ember >= v2.17 #262

Closed bgentry closed 6 years ago

bgentry commented 6 years ago

I have some acceptance tests in my app which test for flash message content after an action.

After the v3 upgrade when these tests were converted to use await, then all started failing. It appears that await will wait for the ember-cli-flash timeout to end before moving on to the assertions that check for flash message content.

I created a demo app for this here: https://github.com/bgentry/ember3-flash-test-bug/blob/master/tests/acceptance/flash-text-test.js

Apologies if this turns out to be an Ember issue but I figured this is at least a good place to track it until that's sorted.

rwjblue commented 6 years ago

Thanks to @kategengler's sleuthing in slack, I believe this is a result of the custom test reopening behavior not running.

Basically, https://github.com/poteto/ember-cli-flash/blob/master/blueprints/ember-cli-flash/index.js#L9 needs to be updated to anchor onto something that is included in the current blueprints.

rwjblue commented 6 years ago

Although it strikes me, @bgentry did you perhaps accidentally delete this line:

import './helpers/flash-message';

From your tests/test-helper.js file?

bgentry commented 6 years ago

@rwjblue ugh, yes, it turns out I did that at one point during the upgrade and forgot to replace it 🤦‍♂️ 🤦‍♂️

I'll work up a PR for the install issue. Otherwise everything seems to be working fine on 3.0.

bgentry commented 6 years ago

I opened #263 to fix this. Thanks again @kategengler & @rwjblue.