about summary refs log tree commit diff
path: root/__e2e__
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2023-11-29 17:35:57 -0800
committerPaul Frazee <pfrazee@gmail.com>2023-11-29 17:35:57 -0800
commit4c7b9652dbe858d5357d4e983c110c84c9e5a46e (patch)
treecf012d95b87edaec87c492ab4a20d8fd64d9b1c5 /__e2e__
parentdc53ef1ec17d4c89ace36ed64d1217caaa54cdb9 (diff)
parent3fbac466ac8554fcb690fccbe0053a5be07801d7 (diff)
downloadvoidsky-4c7b9652dbe858d5357d4e983c110c84c9e5a46e.tar.zst
Merge branch '2011-link-in-feeds-tab-bar' of https://github.com/CooperEdmunds/social-app into CooperEdmunds-2011-link-in-feeds-tab-bar
Diffstat (limited to '__e2e__')
-rw-r--r--__e2e__/tests/home-screen.test.ts25
1 files changed, 21 insertions, 4 deletions
diff --git a/__e2e__/tests/home-screen.test.ts b/__e2e__/tests/home-screen.test.ts
index 7647b55cb..b6cd19195 100644
--- a/__e2e__/tests/home-screen.test.ts
+++ b/__e2e__/tests/home-screen.test.ts
@@ -4,7 +4,7 @@ import {openApp, loginAsAlice, createServer} from '../util'
 
 describe('Home screen', () => {
   beforeAll(async () => {
-    await createServer('?users&follows&posts')
+    await createServer('?users&follows&posts&feeds')
     await openApp({permissions: {notifications: 'YES'}})
   })
 
@@ -13,6 +13,23 @@ describe('Home screen', () => {
     await element(by.id('homeScreenFeedTabs-Following')).tap()
   })
 
+  it('Can go to feeds page using feeds button in tab bar', async () => {
+    await element(by.id('homeScreenFeedTabs-Feeds ✨')).tap()
+    await expect(element(by.text('Discover new feeds'))).toBeVisible()
+  })
+
+  it('Feeds button disappears after pinning a feed', async () => {
+    await element(by.id('bottomBarProfileBtn')).tap()
+    await element(by.id('profilePager-selector')).swipe('left')
+    await element(by.id('profilePager-selector-4')).tap()
+    await element(by.id('feed-alice-favs')).tap()
+    await element(by.id('pinBtn')).tap()
+    await element(by.id('bottomBarHomeBtn')).tap()
+    await expect(
+      element(by.id('homeScreenFeedTabs-Feeds ✨')),
+    ).not.toBeVisible()
+  })
+
   it('Can like posts', async () => {
     const carlaPosts = by.id('feedItem-by-carla.test')
     await expect(
@@ -65,14 +82,14 @@ describe('Home screen', () => {
 
   it('Can swipe between feeds', async () => {
     await element(by.id('homeScreen')).swipe('left', 'fast', 0.75)
-    await expect(element(by.id('whatshotFeedPage'))).toBeVisible()
+    await expect(element(by.id('customFeedPage'))).toBeVisible()
     await element(by.id('homeScreen')).swipe('right', 'fast', 0.75)
     await expect(element(by.id('followingFeedPage'))).toBeVisible()
   })
 
   it('Can tap between feeds', async () => {
-    await element(by.id("homeScreenFeedTabs-What's hot")).tap()
-    await expect(element(by.id('whatshotFeedPage'))).toBeVisible()
+    await element(by.id('homeScreenFeedTabs-alice-favs')).tap()
+    await expect(element(by.id('customFeedPage'))).toBeVisible()
     await element(by.id('homeScreenFeedTabs-Following')).tap()
     await expect(element(by.id('followingFeedPage'))).toBeVisible()
   })