diff options
author | Samuel Newman <mozzius@protonmail.com> | 2023-11-30 17:11:51 +0000 |
---|---|---|
committer | Samuel Newman <mozzius@protonmail.com> | 2023-11-30 17:11:51 +0000 |
commit | b164f151cc352c62212a815e77dbdd23be530e7f (patch) | |
tree | 4df0df19dcd07afb1909171429ddc3ebcbfa42c5 /__e2e__/tests/home-screen.test.ts | |
parent | ee5d7a63ce08f2b395c71fb35dbdb0d9bb0f1dee (diff) | |
parent | fcd22d4ccb0718db1c9b64fccd90a8bfe3e885d4 (diff) | |
download | voidsky-b164f151cc352c62212a815e77dbdd23be530e7f.tar.zst |
Merge remote-tracking branch 'upstream/main' into invite-code-warning
Diffstat (limited to '__e2e__/tests/home-screen.test.ts')
-rw-r--r-- | __e2e__/tests/home-screen.test.ts | 25 |
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() }) |