2
0
mirror of synced 2025-01-17 09:50:56 +00:00
2018-03-23 13:40:07 +00:00

27 lines
823 B
JavaScript
Executable File

const {device, expect, element, by, waitFor} = require('detox');
describe('Example', () => {
beforeEach(async () => {
await device.reloadReactNative();
});
it('should have welcome screen', async () => {
await expect(element(by.id('welcome'))).toBeVisible();
});
it('should show hello screen after tap', async () => {
await element(by.id('hello_button')).tap();
await expect(element(by.text('Hello!!!'))).toBeVisible();
});
it('should show world screen after tap', async () => {
await element(by.id('world_button')).tap();
await expect(element(by.text('World!!!'))).toBeVisible();
});
it('waitFor should be exported', async () => {
await waitFor(element(by.id('welcome'))).toExist().withTimeout(2000);
await expect(element(by.id('welcome'))).toExist();
});
});