title: How do you force a mat-dialog to close in an Angular test?
body: <p><strong>Scenario :</strong></p>
  
  <ul>
  <li>I have a component which is a wrapper around another component, and the wrapper component calls <code>this.dialog.open(otherComponent)</code>. </li>
  <li>In the 'it creates' test for the wrapper component, the dialog pops
  open in the test browser, and remains there for the duration of the
  test suite, obscuring everything underneath it and even the test
  results. 
  
  <ul>
  <li>How do I force it to close? </li>
  <li>I've tried <code>dialog.close(),
  dialog.closeAll(),</code> I've tried creating a mock dialog and closing
  that, but nothing seems to work because the original component under
  testing does not close that dialog. </li>
  </ul></li>
  </ul>
  
  <p>How can I resolve this?</p>