[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:
@@ -214,16 +214,16 @@ module.exports = {
|
||||
// // this changes the default debugging port so chromedriver can run without issues.
|
||||
// options.chromeDriverArgs.push('remote-debugging-port=9222');
|
||||
//}
|
||||
return electron.launch(options).then(async (app) => {
|
||||
// Make sure the app has time to fully load and that the window is focused
|
||||
await asyncSleep(1000);
|
||||
const mainWindow = app.windows().find((window) => window.url().includes('index'));
|
||||
const browserWindow = await app.browserWindow(mainWindow);
|
||||
await browserWindow.evaluate((win) => {
|
||||
win.show();
|
||||
return true;
|
||||
return electron.launch(options).then(async (eapp) => {
|
||||
await eapp.evaluate(async ({app}) => {
|
||||
const promise = new Promise((resolve) => {
|
||||
app.on('e2e-app-loaded', () => {
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
return promise;
|
||||
});
|
||||
return app;
|
||||
return eapp;
|
||||
});
|
||||
},
|
||||
|
||||
|
@@ -44,7 +44,7 @@ describe('popup', function desc() {
|
||||
await firstServer.click('#sidebarItem_suscipit-4');
|
||||
await firstServer.click('#post_textbox');
|
||||
await firstServer.type('#post_textbox', '/github connect ');
|
||||
await firstServer.press('#post_textbox', 'Enter');
|
||||
await firstServer.click('button[data-testid="SendMessageButton"]');
|
||||
|
||||
const githubLink = await firstServer.waitForSelector('a.theme.markdown__link:has-text("GitHub account")');
|
||||
githubLink.click();
|
||||
@@ -100,7 +100,7 @@ describe('popup', function desc() {
|
||||
await firstServer.click('#sidebarItem_suscipit-4');
|
||||
await firstServer.click('#post_textbox');
|
||||
await firstServer.type('#post_textbox', '/github connect ');
|
||||
await firstServer.press('#post_textbox', 'Enter');
|
||||
await firstServer.click('button[data-testid="SendMessageButton"]');
|
||||
|
||||
const githubLink = await firstServer.waitForSelector('a.theme.markdown__link:has-text("GitHub account")');
|
||||
githubLink.click();
|
||||
|
Reference in New Issue
Block a user