Introducing detox

This commit is contained in:
Sofiya Tepikin
2019-07-21 15:58:12 +02:00
parent 888be9531d
commit 7e807dba7f
11 changed files with 680 additions and 35 deletions
+12
View File
@@ -0,0 +1,12 @@
describe('Example', () => {
beforeEach(async () => {
await device.reloadReactNative();
});
it('should navigate to home on accepting the license agreement', async () => {
await expect(element(by.id('licensePage'))).toBeVisible();
await element(by.id('licenseOkButton')).tap();
await expect(
element(by.id('pageTitle').and(by.text('home')))
).toBeVisible();
});
});
+19
View File
@@ -0,0 +1,19 @@
const detox = require('detox');
const config = require('../package.json').detox;
const adapter = require('detox/runners/mocha/adapter');
before(async () => {
await detox.init(config);
});
beforeEach(async function () {
await adapter.beforeEach(this);
});
afterEach(async function () {
await adapter.afterEach(this);
});
after(async () => {
await detox.cleanup();
});
+1
View File
@@ -0,0 +1 @@
--recursive --timeout 120000 --bail --file e2e/init.js