Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

make tests work on Rn 0.68

ammarahm-ed18bf3bb3730c
diff --git a/apps/mobile/.detoxrc.json b/apps/mobile/.detoxrc.json
index 668935617..28d5db0aa 100644
--- a/apps/mobile/.detoxrc.json
+++ b/apps/mobile/.detoxrc.json
@@ -11,20 +11,19 @@
}
},
"android.emu.debug": {
- "binaryPath": "android/app/build/outputs/apk/debug/app-arm64-v8a-debug.apk",
- "build":
- "cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug && cd ..",
- "type": "android.emulator",
- "name": "emu"
- },
+ "binaryPath": "android/app/build/outputs/apk/debug/app-arm64-v8a-debug.apk",
+ "build": "cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug && cd ..",
+ "type": "android.emulator",
+ "name": "emu"
+ },
"android.dev.debug": {
"binaryPath": "android/app/build/outputs/apk/debug/app-arm64-v8a-debug.apk",
"testBinaryPath": "android/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk",
"build": "cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug && cd ..",
"type": "android.attached",
"device": {
- "adbName": "192.168.10.2:5555",
- "adbNameAlt":"LMG710ULM3d3678f0"
+ "adbName": "LMG710ULM3d3678f0",
+ "adbNameAlt": "LMG710ULM3d3678f0"
}
},
"android.dev.release": {
diff --git a/apps/mobile/e2e/tests/index.e2e.js b/apps/mobile/e2e/tests/index.e2e.js
index 2ca95a272..29750dd7a 100644
--- a/apps/mobile/e2e/tests/index.e2e.js
+++ b/apps/mobile/e2e/tests/index.e2e.js
@@ -3,11 +3,11 @@ const { navigate, tapByText, prepare } = require('./utils');
const { sleep } = require('./utils');
describe('APP LAUNCH AND NAVIGATION', () => {
- it('App should launch successfully & hide welcome screen', async done => {
+ it('App should launch successfully & hide welcome screen', async () => {
await prepare();
});
- it('Basic navigation should work', async done => {
+ it('Basic navigation should work', async () => {
await prepare();
await navigate('Notebooks');
await tapByText('Skip introduction');
diff --git a/apps/mobile/e2e/tests/utils.js b/apps/mobile/e2e/tests/utils.js
index 8f65ef278..4b47c59dd 100644
--- a/apps/mobile/e2e/tests/utils.js
+++ b/apps/mobile/e2e/tests/utils.js
@@ -12,6 +12,7 @@ export const sleep = duration =>
export async function LaunchApp() {
await expect(element(by.id(notesnook.ids.default.root))).toBeVisible();
await expect(element(by.id('notesnook.splashscreen'))).toBeVisible();
+ await sleep(500);
await element(by.text('Get started')).tap();
await sleep(500);
await element(by.text('Next')).tap();
@@ -82,7 +83,7 @@ export async function navigate(screen) {
await sleep(500);
let menu = elementById(notesnook.ids.default.header.buttons.left);
await menu.tap();
- await sleep(100);
+ await sleep(500);
await elementByText(screen).tap();
}
diff --git a/apps/mobile/src/navigation/index.js b/apps/mobile/src/navigation/index.js
index 09c277297..9c3975ad9 100644
--- a/apps/mobile/src/navigation/index.js
+++ b/apps/mobile/src/navigation/index.js
@@ -1,7 +1,7 @@
import React from 'react';
-import { TabsHolder } from './tabs-holder';
import DialogProvider from '../components/dialog-provider';
import { Toast } from '../components/toast';
+import { TabsHolder } from './tabs-holder';
export const ApplicationHolder = React.memo(
() => {