mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-16 19:21:52 +00:00
Edit spectron.js to deal with linux
This commit is contained in:
@@ -3,8 +3,16 @@ import {Application} from 'spectron'
|
|||||||
import path from 'path'
|
import path from 'path'
|
||||||
|
|
||||||
test.beforeEach(async t => {
|
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({
|
t.context.app = new Application({
|
||||||
path: path.join('..', '..', 'dist', 'Boostnote-darwin-x64', 'Boostnote.app', 'Contents', 'MacOS', 'Boostnote')
|
path: boostnotePath
|
||||||
})
|
})
|
||||||
|
|
||||||
await t.context.app.start()
|
await t.context.app.start()
|
||||||
|
|||||||
Reference in New Issue
Block a user