about summary refs log tree commit diff
path: root/__e2e__/tests/search-screen.test.ts
blob: 1dbb3cbfaa6b82685569b71d3fb227362bb6fcc8 (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
25
/* eslint-env detox/detox */

import {describe, beforeAll, it} from '@jest/globals'
import {expect} from 'detox'
import {openApp, loginAsAlice, createServer} from '../util'

describe('Search screen', () => {
  beforeAll(async () => {
    await createServer('?users')
    await openApp({
      permissions: {notifications: 'YES', medialibrary: 'YES', photos: 'YES'},
    })
  })

  it('Login', async () => {
    await loginAsAlice()
  })

  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()
  })
})