fix/ e2e tests with Spectron

This commit is contained in:
Maxime GRIS
2020-08-12 22:21:04 +02:00
parent 84598a5146
commit 472afc8675
3 changed files with 16 additions and 16 deletions

View File

@@ -4,19 +4,15 @@ 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;
});
beforeEach(async function() {
await this.app.start();
it('should display message saying App works !', async function () {
const text = await browser.getText('app-home h1');
expect(text).to.equal('App works !');
client = this.app.client;
});
it('creates initial windows', async function () {
@@ -24,4 +20,10 @@ describe('angular-electron App', function () {
expect(count).to.equal(1);
});
it('should display message saying App works !', async function () {
const elem = await client.$('app-home h1');
const text = await elem.getText();
expect(text).to.equal('App works !');
});
});