Skip to content
This repository was archived by the owner on May 21, 2019. It is now read-only.

Commit

Permalink
Do not start the app each time from scratch.
Browse files Browse the repository at this point in the history
  • Loading branch information
vlad-shatskyi committed May 27, 2017
1 parent ecc50ee commit aefaf0c
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions test/e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,24 @@ describe("application launch", function () {
let app: Application;
let page: Page;

beforeEach(async () => {
before(async () => {
app = new Application({path: "node_modules/.bin/electron", args: ["."]});
await app.start();
});

beforeEach(async () => {
if (app.isRunning()) {
await app.restart();
} else {
await app.start();
}

await app.client.waitUntilWindowLoaded();
page = new Page(app.client);
return page.waitTillLoaded();
});

afterEach(function () {
if (app && app.isRunning()) {
after(() => {
if (app.isRunning()) {
return app.stop();
}
});
Expand All @@ -84,7 +92,7 @@ describe("application launch", function () {
expect(output).to.contain("expected-text");
});

it.only("send signals via button", async () => {
it("send signals via button", async () => {
await page.executeCommand(`node ${join(__dirname, "test_files", "print_on_sigterm.js")}`);

await page.job.menu.open();
Expand Down

0 comments on commit aefaf0c

Please sign in to comment.