about summary refs log tree commit diff
path: root/__e2e__/tests/search-screen.test.ts
diff options
context:
space:
mode:
Diffstat (limited to '__e2e__/tests/search-screen.test.ts')
-rw-r--r--__e2e__/tests/search-screen.test.ts24
1 files changed, 24 insertions, 0 deletions
diff --git a/__e2e__/tests/search-screen.test.ts b/__e2e__/tests/search-screen.test.ts
new file mode 100644
index 000000000..093d97c89
--- /dev/null
+++ b/__e2e__/tests/search-screen.test.ts
@@ -0,0 +1,24 @@
+/* eslint-env detox/detox */
+
+import {openApp, login, createServer} from '../util'
+
+describe('Search screen', () => {
+  let service: string
+  beforeAll(async () => {
+    service = await createServer('?users')
+    await openApp({
+      permissions: {notifications: 'YES', medialibrary: 'YES', photos: 'YES'},
+    })
+  })
+
+  it('Login', async () => {
+    await login(service, 'alice', 'hunter2')
+  })
+
+  it('Navigate to another user profile via autocomplete', async () => {
+    await element(by.id('bottomBarSearchBtn')).tap()
+    await element(by.id('searchTextInput')).typeText('bob')
+    await element(by.id('searchAutoCompleteResult-bob.test')).tap()
+    await expect(element(by.id('profileView'))).toBeVisible()
+  })
+})