Skip to content

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

update tests

ammarahm-edda38e79bc4c2
diff --git a/apps/mobile/e2e/tests/index.e2e.js b/apps/mobile/e2e/tests/index.e2e.js
index 7ca505fb1..41c0fb33f 100644
--- a/apps/mobile/e2e/tests/index.e2e.js
+++ b/apps/mobile/e2e/tests/index.e2e.js
@@ -1,5 +1,5 @@
const detox = require('detox');
-const {beforeAll} = require('jest-circus');
+const {beforeAll, test} = require('jest-circus');
const {notesnook} = require('../test.ids');
const {
LaunchApp,
@@ -32,21 +32,28 @@ describe('Basic tests', () => {
await navigate('Notes');
});
- it('App should create a note successfully', async () => {
- let title = 'Test note description that ';
- let body =
- 'Test note description that is very long and should not fit in text.';
-
- await tapById(notesnook.buttons.add);
- await elementById(notesnook.editor.id).tap({
- x: 15,
- y: 15
- });
- await elementById(notesnook.editor.id).typeText(body);
- await tapById(notesnook.editor.back);
- await expect(elementByText(title).atIndex(0)).toBeVisible();
-
- await tapById(notesnook.ids.note.get(1));
- await tapById(notesnook.editor.back);
+ it('Create 10 notes', async () => {
+ let numOfnotes = 10;
+
+ for (let i = 0; i < numOfnotes; i++) {
+ let title = 'Test note description that ';
+ let body =
+ 'Test note description that is very long and should not fit in text.' + i;
+
+ await tapById(notesnook.buttons.add);
+ await elementById(notesnook.editor.id).tap({
+ x: 15,
+ y: 15
+ });
+ await elementById(notesnook.editor.id).typeText(body);
+ await tapById(notesnook.editor.back);
+ await expect(elementByText(title).atIndex(0)).toBeVisible();
+ }
+
+ for (let i = 0; i < 10; i++) {
+ await tapById(notesnook.ids.note.get(1));
+ await tapById(notesnook.editor.back);
+ };
+
});
});