From e5a787d9ead2680231fa73730d8d225bf76ec03b Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Tue, 5 Dec 2023 10:26:14 -0600 Subject: [PATCH] Fix profile tests --- __e2e__/tests/profile-screen.test.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/__e2e__/tests/profile-screen.test.ts b/__e2e__/tests/profile-screen.test.ts index 82722f381b..2152e9f8ff 100644 --- a/__e2e__/tests/profile-screen.test.ts +++ b/__e2e__/tests/profile-screen.test.ts @@ -1,5 +1,7 @@ /* eslint-env detox/detox */ +import {describe, beforeAll, it} from '@jest/globals' +import {expect} from 'detox' import {openApp, loginAsAlice, createServer, sleep} from '../util' describe('Profile screen', () => { @@ -11,17 +13,16 @@ describe('Profile screen', () => { }) it('Login and navigate to my profile', async () => { - await expect(element(by.id('signInButton'))).toBeVisible() await loginAsAlice() await element(by.id('bottomBarProfileBtn')).tap() }) it('Can see feeds', async () => { - await element(by.id('selector')).swipe('left') - await element(by.id('selector-4')).tap() + await element(by.id('profilePager-selector')).swipe('left') + await element(by.id('profilePager-selector-4')).tap() await expect(element(by.id('feed-alice-favs'))).toBeVisible() - await element(by.id('selector')).swipe('right') - await element(by.id('selector-0')).tap() + await element(by.id('profilePager-selector')).swipe('right') + await element(by.id('profilePager-selector-0')).tap() }) it('Open and close edit profile modal', async () => { @@ -135,6 +136,8 @@ describe('Profile screen', () => { }) it('Can like posts', async () => { + await element(by.id('postsFeed-flatlist')).swipe('down', 'fast') + const posts = by.id('feedItem-by-bob.test') await expect( element(by.id('likeCount').withAncestor(posts)).atIndex(0),