about summary refs log tree commit diff
path: root/__e2e__/tests/shell.test.ts
diff options
context:
space:
mode:
Diffstat (limited to '__e2e__/tests/shell.test.ts')
-rw-r--r--__e2e__/tests/shell.test.ts34
1 files changed, 34 insertions, 0 deletions
diff --git a/__e2e__/tests/shell.test.ts b/__e2e__/tests/shell.test.ts
new file mode 100644
index 000000000..5cfd4277f
--- /dev/null
+++ b/__e2e__/tests/shell.test.ts
@@ -0,0 +1,34 @@
+/* eslint-env detox/detox */
+
+import {openApp, login, createServer} from '../util'
+
+describe('Shell', () => {
+  let service: string
+  beforeAll(async () => {
+    service = await createServer('?users')
+    await openApp({permissions: {notifications: 'YES'}})
+  })
+
+  it('Login', async () => {
+    await login(service, 'alice', 'hunter2')
+    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()
+  })
+})