add waitUntil (#16072)
This commit is contained in:
parent
eeb4029eb1
commit
c88df178c3
|
@ -1,6 +1,6 @@
|
||||||
import { module, test } from 'qunit';
|
import { module, test } from 'qunit';
|
||||||
import { setupRenderingTest } from 'ember-qunit';
|
import { setupRenderingTest } from 'ember-qunit';
|
||||||
import { render } from '@ember/test-helpers';
|
import { find, render, waitUntil } from '@ember/test-helpers';
|
||||||
import hbs from 'htmlbars-inline-precompile';
|
import hbs from 'htmlbars-inline-precompile';
|
||||||
import { addMinutes } from 'date-fns';
|
import { addMinutes } from 'date-fns';
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ module('Integration | Component | token-expire-warning', function (hooks) {
|
||||||
this.set('expirationDate', expirationDate);
|
this.set('expirationDate', expirationDate);
|
||||||
|
|
||||||
await render(hbs`<TokenExpireWarning @expirationDate={{expirationDate}}/>`);
|
await render(hbs`<TokenExpireWarning @expirationDate={{expirationDate}}/>`);
|
||||||
|
await waitUntil(() => find('#modal-overlays'));
|
||||||
assert.dom().includesText('Your auth token expired on');
|
assert.dom().includesText('Your auth token expired on');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ module('Integration | Component | token-expire-warning', function (hooks) {
|
||||||
<p>Do not worry, your token has not expired.</p>
|
<p>Do not worry, your token has not expired.</p>
|
||||||
</TokenExpireWarning>
|
</TokenExpireWarning>
|
||||||
`);
|
`);
|
||||||
|
await waitUntil(() => find('#modal-overlays'));
|
||||||
assert.dom().doesNotIncludeText('Your auth token expired on');
|
assert.dom().doesNotIncludeText('Your auth token expired on');
|
||||||
assert.dom().includesText('Do not worry');
|
assert.dom().includesText('Do not worry');
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue