title: How to close/dismiss basic auth prompt window in Cypress?
body: <p>I try to test a failing login, so after submitting an empty form, instead of getting &quot;authentication failed&quot; message, I get the auth prompt window which is not a part of the application and which I need to close to get the &quot;authentication failed&quot; message but I don't know how to close this prompt window in Cypress.</p>
  <p><a href="https://i.stack.imgur.com/0EokR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0EokR.png" alt="enter image description here" /></a></p>
  <p>The window gets closed when I manually type esc button. I tried to simulate typing esc button via code:</p>
  <pre><code>cy.get('body').trigger('keydown', { keyCode: 27});
  </code></pre>
  <p>but unsuccessfully.</p>
  <p>Any ideas?</p>