about summary refs log tree commit diff
path: root/__e2e__/tests/search-screen.test.ts
blob: 093d97c892b73c1d6b7e2a8d12098f50d4b7d501 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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()
  })
})