zepio/__tests__/e2e/startup.test.js

36 lines
1.0 KiB
JavaScript
Raw Normal View History

// @flow
2018-11-28 09:07:58 -08:00
import { getApp } from '../setup/utils';
2019-01-22 10:50:11 -08:00
const app = getApp();
2018-11-28 09:07:58 -08:00
2019-01-22 10:50:11 -08:00
beforeAll(async () => {
await app.start();
await app.client.waitUntilWindowLoaded();
});
afterAll(() => app.stop());
describe('Startup', () => {
test('should open the window', async () => expect(await app.client.getWindowCount()).toEqual(1));
test('should have the right title', async () => {
expect(await app.client.getTitle()).toEqual('ZEC Wallet');
2018-11-28 09:07:58 -08:00
});
2019-01-22 10:50:11 -08:00
test('should show the text "ZEC Wallet Starting" in loading screen', async () => {
expect(await app.client.getText('#loading-screen p')).toEqual(
'ZEC Wallet Starting',
);
});
test('should show the zcash logo in loading screen', async () => expect(await app.client.getAttribute('#loading-screen img', 'src')).toEqual(
expect.stringContaining('/assets/zcash-simple-icon.svg'),
));
test('should show the loading circle in loading screen', async () => {
expect(
await app.client.element('#loading-screen svg').isExisting(),
).toEqual(true);
2018-11-28 09:07:58 -08:00
});
});