mirror of
https://github.com/kemko/nomad.git
synced 2026-01-16 15:25:41 +03:00
Fix latent race condition in client detail test
Adding this settled makes this test pass now that Ember Data is using fetch instead of jquery. The test was presumably always incorrect but never flaked.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { currentURL, waitUntil } from '@ember/test-helpers';
|
||||
import { currentURL, waitUntil, settled } from '@ember/test-helpers';
|
||||
import { assign } from '@ember/polyfills';
|
||||
import { module, test } from 'qunit';
|
||||
import { setupApplicationTest } from 'ember-qunit';
|
||||
@@ -569,6 +569,8 @@ module('Acceptance | client detail', function(hooks) {
|
||||
assert.ok(ClientDetail.eligibilityToggle.isDisabled);
|
||||
server.pretender.resolve(server.pretender.requestReferences[0].request);
|
||||
|
||||
await settled();
|
||||
|
||||
assert.notOk(ClientDetail.eligibilityToggle.isActive);
|
||||
assert.notOk(ClientDetail.eligibilityToggle.isDisabled);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user