github.com/thomasobenaus/nomad@v0.11.1/ui/stories/utils/delayed-truth.js (about) 1 import EmberObject from '@ember/object'; 2 import { next } from '@ember/runloop'; 3 4 /** 5 * This has a `complete` property that turns from false 6 * to true in the next tick, which helps with some 7 * Storybook race condition rendering problems. 8 */ 9 10 export default EmberObject.extend({ 11 init() { 12 this._super(...arguments); 13 this.set('complete', false); 14 15 next(this, () => { 16 this.set('complete', true); 17 }); 18 }, 19 });