[MM-49724] More robust check for startup before starting E2E tests (#2504)

* [MM-49724] More robust check for startup before starting E2E tests

* Fix a few more tests
This commit is contained in:
Devin Binnie
2023-01-18 05:11:11 -05:00
committed by GitHub
parent 7d79cab916
commit c8c88a274f
4 changed files with 27 additions and 11 deletions

View File

@@ -92,6 +92,18 @@ export function handleShowOnboardingScreens(showWelcomeScreen: boolean, showNewS
const showWelcomeScreenFunc = () => {
if (showWelcomeScreen) {
handleWelcomeScreenModal();
if (process.env.NODE_ENV === 'test') {
const welcomeScreen = ModalManager.modalQueue.find((modal) => modal.key === 'welcomeScreen');
if (welcomeScreen?.view.webContents.isLoading()) {
welcomeScreen?.view.webContents.once('did-finish-load', () => {
app.emit('e2e-app-loaded');
});
} else {
app.emit('e2e-app-loaded');
}
}
return;
}
if (showNewServerModal) {