according to https://github.com/electron/spectron/issues/174#issuecomment-319242097 this might help re error like in https://travis-ci.org/artemv/angular-electron-spectron/builds/500315009 ..but this also could be node version dependent as I don't have it locally on MacOS & Node 9
29 lines
659 B
TypeScript
29 lines
659 B
TypeScript
import {expect, assert} from 'chai';
|
|
import {SpectronClient} from 'spectron';
|
|
|
|
import commonSetup from './common-setup';
|
|
|
|
describe('angular-electron App', function () {
|
|
commonSetup.apply(this);
|
|
|
|
let browser: any;
|
|
let client: SpectronClient;
|
|
|
|
beforeEach(function () {
|
|
client = this.app.client;
|
|
browser = client as any;
|
|
});
|
|
|
|
it('should display message saying App works !', async function () {
|
|
const text = await browser.getText('app-home h1');
|
|
expect(text).to.equal('App works !');
|
|
});
|
|
|
|
|
|
it('creates initial windows', async function () {
|
|
const count = await client.getWindowCount();
|
|
expect(count).to.equal(1);
|
|
});
|
|
|
|
});
|