Introducing detox
This commit is contained in:
@@ -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
@@ -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();
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
--recursive --timeout 120000 --bail --file e2e/init.js
|
||||
Reference in New Issue
Block a user