about summary refs log tree commit diff
path: root/__e2e__/tests/shell.test.skip.ts
blob: 69619dd81b07cdd166091de8a6bdb42e8dabd5e2 (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
26
27
28
29
30
31
32
33
/* eslint-env detox/detox */

import {openApp, loginAsAlice, createServer} from '../util'

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

  it('Login', async () => {
    await loginAsAlice()
    await element(by.id('homeScreenFeedTabs-Following')).tap()
  })

  it('Can swipe the shelf open', async () => {
    await element(by.id('homeScreen')).swipe('right', 'fast', 0.75)
    await expect(element(by.id('drawer'))).toBeVisible()
    await element(by.id('drawer')).swipe('left', 'fast', 0.75)
    await expect(element(by.id('drawer'))).not.toBeVisible()
  })

  it('Can open the shelf by pressing the header avi', async () => {
    await element(by.id('viewHeaderDrawerBtn')).tap()
    await expect(element(by.id('drawer'))).toBeVisible()
  })

  it('Can navigate using the shelf', async () => {
    await element(by.id('menuItemButton-Notifications')).tap()
    await expect(element(by.id('drawer'))).not.toBeVisible()
    await expect(element(by.id('notificationsScreen'))).toBeVisible()
  })
})