zepio/__tests__/e2e/console.test.js

28 lines
680 B
JavaScript
Raw Normal View History

2019-01-23 09:04:29 -08:00
// @flow
2019-02-04 20:41:45 -08:00
2019-01-23 09:04:29 -08:00
import { getApp } from '../setup/utils';
const app = getApp();
beforeAll(async () => {
await app.start();
await app.client.waitUntilWindowLoaded();
2019-01-24 11:23:06 -08:00
await app.client.waitUntilTextExists('#sidebar', 'Console');
2019-01-23 09:04:29 -08:00
});
2019-02-04 20:41:45 -08:00
2019-01-23 09:04:29 -08:00
afterAll(() => app.stop());
describe('Console', () => {
2019-01-23 11:34:17 -08:00
test('should load "Console Page"', async () => {
2019-01-23 09:04:29 -08:00
await app.client.element('#sidebar a:nth-child(6)').click();
2019-01-24 11:23:06 -08:00
expect(app.client.getText('#header p:first-child')).resolves.toEqual('Console');
2019-01-23 09:04:29 -08:00
2019-02-04 20:41:45 -08:00
expect(app.client.element('#console-wrapper img')
.getAttribute('src'))
.resolves.toEqual(
expect.stringContaining('/assets/console_zcash.png'),
);
2019-01-23 09:04:29 -08:00
});
});