web -> desktop

This commit is contained in:
Alexey Kasyanchuk
2018-01-31 19:02:28 +03:00
parent 0e4888ab76
commit d8afce8964
95 changed files with 10679 additions and 1893 deletions

12
e2e/hello_world.e2e.js Normal file
View File

@ -0,0 +1,12 @@
import { expect } from "chai";
import testUtils from "./utils";
describe("application launch", () => {
beforeEach(testUtils.beforeEach);
afterEach(testUtils.afterEach);
it("index page loaded", async function() {
const { app } = this
await app.client.waitForExist('#index-window')
});
});

26
e2e/utils.js Normal file
View File

@ -0,0 +1,26 @@
import electron from "electron";
import { Application } from "spectron";
const beforeEach = function() {
this.timeout(10000);
this.app = new Application({
path: electron,
args: ["."],
startTimeout: 10000,
waitTimeout: 10000
});
return this.app.start();
};
const afterEach = function() {
this.timeout(10000);
if (this.app && this.app.isRunning()) {
return this.app.stop();
}
return undefined;
};
export default {
beforeEach,
afterEach
};