2023-03-31 20:17:26 +02:00
|
|
|
/* eslint-env detox/detox */
|
|
|
|
|
2023-09-21 04:47:56 +02:00
|
|
|
import {openApp, loginAsAlice, createServer} from '../util'
|
2023-03-31 20:17:26 +02:00
|
|
|
|
|
|
|
describe('Shell', () => {
|
|
|
|
beforeAll(async () => {
|
2023-09-21 04:47:56 +02:00
|
|
|
await createServer('?users')
|
2023-03-31 20:17:26 +02:00
|
|
|
await openApp({permissions: {notifications: 'YES'}})
|
|
|
|
})
|
|
|
|
|
|
|
|
it('Login', async () => {
|
2023-09-21 04:47:56 +02:00
|
|
|
await loginAsAlice()
|
2023-03-31 20:17:26 +02:00
|
|
|
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()
|
|
|
|
})
|
|
|
|
})
|