insomnia/packages/insomnia-smoke-test/modules/client.js

12 lines
560 B
JavaScript
Raw Normal View History

2020-09-24 19:23:23 +00:00
export const correctlyLaunched = async app => {
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);
};
2020-09-24 19:23:23 +00:00
export const resetToOnboarding = async app => {
await app.webContents.executeJavaScript("localStorage['insomnia::meta::activity'] = null;");
await app.browserWindow.reload(); // reload for local storage clearing to take effect
};