From eb48f48f6bf666ee9db0ea7323e6053d837a9c6e Mon Sep 17 00:00:00 2001 From: asmsuechan Date: Tue, 25 Apr 2017 00:05:44 -0700 Subject: [PATCH] Edit spectron.js to deal with linux --- tests/e2e/spectron.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/e2e/spectron.js b/tests/e2e/spectron.js index 364fd4aa..20de606f 100644 --- a/tests/e2e/spectron.js +++ b/tests/e2e/spectron.js @@ -3,8 +3,16 @@ import {Application} from 'spectron' import path from 'path' test.beforeEach(async t => { + const boostnotePath = ((platform) => { + switch (platform) { + case 'darwin': + return path.join('..', '..', 'dist', 'Boostnote-darwin-x64', 'Boostnote.app', 'Contents', 'MacOS', 'Boostnote') + case 'linux': + return path.join('..', '..', 'dist', 'Boostnote-linux-x64', 'Boostnote') + } + })(process.platform) t.context.app = new Application({ - path: path.join('..', '..', 'dist', 'Boostnote-darwin-x64', 'Boostnote.app', 'Contents', 'MacOS', 'Boostnote') + path: boostnotePath }) await t.context.app.start()