disable spectron
This commit is contained in:
parent
81b45da2e1
commit
b29d10cb9d
3 changed files with 47 additions and 424 deletions
|
|
@ -1,44 +1,44 @@
|
|||
// Native
|
||||
import path from 'path';
|
||||
// // Native
|
||||
// import path from 'path';
|
||||
|
||||
// Packages
|
||||
import test from 'ava';
|
||||
import {Application} from 'spectron';
|
||||
// // Packages
|
||||
// import test from 'ava';
|
||||
// import {Application} from 'spectron';
|
||||
|
||||
let app: Application;
|
||||
// let app: Application;
|
||||
|
||||
test.before(async () => {
|
||||
let pathToBinary;
|
||||
// test.before(async () => {
|
||||
// let pathToBinary;
|
||||
|
||||
switch (process.platform) {
|
||||
case 'linux':
|
||||
pathToBinary = path.join(__dirname, '../dist/linux-unpacked/hyper');
|
||||
break;
|
||||
// switch (process.platform) {
|
||||
// case 'linux':
|
||||
// pathToBinary = path.join(__dirname, '../dist/linux-unpacked/hyper');
|
||||
// break;
|
||||
|
||||
case 'darwin':
|
||||
pathToBinary = path.join(__dirname, '../dist/mac/Hyper.app/Contents/MacOS/Hyper');
|
||||
break;
|
||||
// case 'darwin':
|
||||
// pathToBinary = path.join(__dirname, '../dist/mac/Hyper.app/Contents/MacOS/Hyper');
|
||||
// break;
|
||||
|
||||
case 'win32':
|
||||
pathToBinary = path.join(__dirname, '../dist/win-unpacked/Hyper.exe');
|
||||
break;
|
||||
// case 'win32':
|
||||
// pathToBinary = path.join(__dirname, '../dist/win-unpacked/Hyper.exe');
|
||||
// break;
|
||||
|
||||
default:
|
||||
throw new Error('Path to the built binary needs to be defined for this platform in test/index.js');
|
||||
}
|
||||
// default:
|
||||
// throw new Error('Path to the built binary needs to be defined for this platform in test/index.js');
|
||||
// }
|
||||
|
||||
app = new Application({
|
||||
path: pathToBinary
|
||||
});
|
||||
// app = new Application({
|
||||
// path: pathToBinary
|
||||
// });
|
||||
|
||||
await app.start();
|
||||
});
|
||||
// await app.start();
|
||||
// });
|
||||
|
||||
test.after(async () => {
|
||||
await app.stop();
|
||||
});
|
||||
// test.after(async () => {
|
||||
// await app.stop();
|
||||
// });
|
||||
|
||||
test('see if dev tools are open', async (t) => {
|
||||
await app.client.waitUntilWindowLoaded();
|
||||
t.false(await app.webContents.isDevToolsOpened());
|
||||
});
|
||||
// test('see if dev tools are open', async (t) => {
|
||||
// await app.client.waitUntilWindowLoaded();
|
||||
// t.false(await app.webContents.isDevToolsOpened());
|
||||
// });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue