title: Set a property on window with cypress
body: <p>I need to test a react app that is supposed to run as a webview within another native app. The webview server sets session variables into the window, which is further used to authenticate my app.</p>
  
  <p>I want to mock this by doing something like:</p>
  
  <pre><code>window.appEnvironment={ 
  //session variables
  }
  </code></pre>
  
  <p>I have tried cy.window() , but it doesnt seem to help.
  How can I set properties on window from cypress.</p>