2020-09-24 19:23:23 +00:00
|
|
|
export const correctlyLaunched = async app => {
|
2020-08-24 22:49:29 +00:00
|
|
|
await expect(app.browserWindow.isDevToolsOpened()).resolves.toBe(false);
|
|
|
|
await expect(app.client.getWindowCount()).resolves.toBe(1);
|
|
|
|
await expect(app.browserWindow.isMinimized()).resolves.toBe(false);
|
|
|
|
await expect(app.browserWindow.isFocused()).resolves.toBe(true);
|
|
|
|
};
|
|
|
|
|
2021-02-25 20:39:59 +00:00
|
|
|
export const focusAfterRestart = async app => {
|
|
|
|
await app.client.pause(4000);
|
|
|
|
|
|
|
|
const count = await app.client.getWindowCount();
|
|
|
|
if (count === 0) {
|
|
|
|
console.log('No windows found');
|
|
|
|
}
|
|
|
|
|
|
|
|
await app.client.windowByIndex(0);
|
2020-08-24 22:49:29 +00:00
|
|
|
};
|