You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting the following error in the new testing format Uncaught Error: ember-wormhole failed to render into '#modal-overlays' because the element is not in the DOM
Solution
I had to write a custom test helper in order to get modal-dialog working properly after updating my tests to use the new testing format
Here is an example:
tests/acceptance/random-test.js
import{module,test}from'qunit';import{click,find,visit}from'@ember/test-helpers';import{setupApplicationTest}from'ember-qunit';importsetupModalDialogfrom'my-app/tests/helpers/setup-modal-dialog';module('Acceptance | Random Test',function(hooks){setupApplicationTest(hooks);setupModalDialog(hooks);test('modal shows',asyncfunction(assert){awaitvisit('/');awaitclick('button.modal-test');assert.ok(awaitfind('[data-test-modal]'));});});
This was just a first stab at getting my tests to work again.
I'd like to here what others are doing to work around this issue or if there is an official guide on using modal-dialog in the new tests
The text was updated successfully, but these errors were encountered:
Problem
I'm getting the following error in the new testing format
Uncaught Error: ember-wormhole failed to render into '#modal-overlays' because the element is not in the DOM
Solution
I had to write a custom test helper in order to get
modal-dialog
working properly after updating my tests to use the new testing formatHere is an example:
tests/acceptance/random-test.js
and here is the helper
tests/helpers/setup-modal-dialog.js
This was just a first stab at getting my tests to work again.
I'd like to here what others are doing to work around this issue or if there is an official guide on using
modal-dialog
in the new testsThe text was updated successfully, but these errors were encountered: