title: cypress: unable to access app from window object
body: <p>I need to access my vuex store in cypress tests, so i added the app to the window object in my main.js:</p>
  
  <pre><code>const app = new Vue({
    router,
    store,
    render: h =&gt; h(App)
  }).$mount("#app");
  
  window.vueApp = app;
  </code></pre>
  
  <p>And then i try to access it in my login command (commands.js): </p>
  
  <pre><code>cy
      .request({
        method: "POST",
        url: "http://localhost:8081/api/v1/login",
        body: {},
        headers: {
          Authorization: "Basic " + btoa("administrator:12345678")
        }
      })
      .then(resp =&gt; {
        console.log("app:", window.vueApp);
        ...
        window.localStorage.setItem("aq-username", "administrator");
      });
  </code></pre>
  
  <p>but it's always undefined, what am i doing wrong?</p>