zepio/__tests__/e2e/startup.test.js

37 lines
1.1 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();
});
2019-02-04 20:41:45 -08:00
2019-01-22 10:50:11 -08:00
afterAll(() => app.stop());
describe('Startup', () => {
2019-01-24 11:23:06 -08:00
test('should open the window', () => expect(app.client.getWindowCount()).resolves.toEqual(1));
2019-01-22 10:50:11 -08:00
2019-01-24 11:23:06 -08:00
test('should have the right title', () => {
2019-03-25 13:28:57 -07:00
expect(app.client.getTitle()).resolves.toEqual('Zepio');
2018-11-28 09:07:58 -08:00
});
test('should show the text "Zepio Starting" in loading screen', async () => {
expect(
app.client.element('div[data-testid~="LoadingScreen"]:first-child p').getHTML(),
).resolves.toEqual(expect.stringContaining('Zepio Starting'));
});
2019-01-22 10:50:11 -08:00
test('should show the zcash logo in loading screen', () => expect(
app.client.getAttribute('div[data-testid~="LoadingScreen"]:first-child img', 'src'),
).resolves.toEqual(expect.stringContaining('/assets/zcash-simple-icon.svg')));
2019-01-22 10:50:11 -08:00
2019-01-24 11:23:06 -08:00
test('should show the loading circle in loading screen', () => {
expect(
app.client.element('div[data-testid~="LoadingScreen"] svg').isExisting(),
).resolves.toEqual(true);
2018-11-28 09:07:58 -08:00
});
});