title: ngOnChanges not called in Angular 4 unit test detectChanges()
body: <h1>The question</h1>
  
  <p>I have a button component that accepts a promise and disables the button until the promise has resolved and I want to write a unit test for this functionality.</p>
  
  <h1>My Code</h1>
  
  <p>My button component has an input for the promise</p>
  
  <pre class="lang-js prettyprint-override"><code>  /**
     * A single promise that triggers the busy state until it resolves
     */
    @Input()
    public promise: Promise&lt;any&gt;;
  </code></pre>
  
  <p>Inside ngOnChanges I listen for the promise</p>
  
  <pre class="lang-js prettyprint-override"><code>/**
   * Enable button busy state until promise resolves
   */
  if (changes &amp;&amp; changes.promise &amp;&amp; changes.promise.currentValue) {
    this.busyUntilPromiseResolves(changes.promise.currentValue);
  }
  </code></pre>
  
  <p>Then I store an array of active promises so multiple promises can be passed in </p>
  
  <pre class="lang-js prettyprint-override"><code>  /**
     * Add a promise that will keep the button in a busy state until it resolves
     * @param activityProimise
     */
    private busyUntilPromiseResolves(activityProimise) {
      this.activityPromises.push(activityProimise);
      activityProimise.then(() =&gt; {
        this.activityPromises.splice(this.activityPromises.indexOf(activityProimise), 1);
      });
    }
  </code></pre>
  
  <p>Then finally in my template I disable the button if there are any promises in the array.</p>
  
  <pre class="lang-js prettyprint-override"><code>[disabled]="activityPromises.length &gt; 0"
  </code></pre>
  
  <h1>Help me obi-wan</h1>
  
  <p>I have been dabbling and trying different things to make this work, this is my current test code that doesn't work. Basically I need to check that the button is disabled before the promise resolves, and I will then want to do another test that checks it is re-enabled after the promise resolves.</p>
  
  <pre class="lang-js prettyprint-override"><code>  it('should be disabled when passed a single promise', async((done) =&gt; {
      let promise;
  
      return promise = new Promise(resolve =&gt; {
        component.promise = promise;
        fixture.detectChanges();
        expect(buttonElement.disabled).toBe(true);
        return resolve();
      });
    }));
  </code></pre>
  
  <p>As always any help will be appreciated, thanks.</p>