fix(vue): going back to a tabs outlet no loger causes classList error (#24665)

resolves #24654
This commit is contained in:
Liam DeBeasi
2022-01-27 14:37:35 -05:00
committed by GitHub
parent 1f918835f4
commit 6d7b1444b6
3 changed files with 91 additions and 24 deletions

View File

@ -23,10 +23,24 @@ import '@ionic/vue/css/display.css';
/* Theme variables */
import './theme/variables.css';
/**
* Vue 3 has its own error handling.
* Throwing errors in promises go through
* this handler, but Cypress does not
* pick up on them so tests that are meant
* to fail will pass. By listening for unhandledrejection
* we can throw an error outside of Vue that will
* cause the test to fail as it should.
* See https://github.com/cypress-io/cypress/issues/5385#issuecomment-547642523
*/
window.addEventListener('unhandledrejection', (err) => {
throw new Error(err.reason);
});
const app = createApp(App)
.use(IonicVue)
.use(router);
router.isReady().then(() => {
app.mount('#app');
});
});