From 6f98bf8aa53b5d4d90d878d1c05cd46b9c9e8e1b Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Thu, 9 Feb 2023 16:53:19 -0600 Subject: [PATCH] Fix e2e tests --- e2e/tests/happyPath.test.js | 4 ++-- src/view/com/util/FAB.tsx | 12 ++++++++++-- src/view/screens/Home.tsx | 6 +++++- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/e2e/tests/happyPath.test.js b/e2e/tests/happyPath.test.js index b63a284c55..15d0b3e329 100644 --- a/e2e/tests/happyPath.test.js +++ b/e2e/tests/happyPath.test.js @@ -41,7 +41,7 @@ describe('Example', () => { it('As Alice, I can login, and post a text', async () => { await grantAccessToUserWithValidCredentials('alice') - await element(by.id('composePromptButton')).tap() + await element(by.id('composeFAB')).tap() await device.takeScreenshot('1- opened composer') await element(by.id('composerTextInput')).typeText( 'Greetings earthlings, I come in peace... and to run some tests.', @@ -49,7 +49,7 @@ describe('Example', () => { await device.takeScreenshot('2- entered text') await element(by.id('composerPublishButton')).tap() await device.takeScreenshot('3- opened general section') - await expect(element(by.id('composePromptButton'))).toBeVisible() + await expect(element(by.id('composeFAB'))).toBeVisible() }) it('I can create a new account', async () => { diff --git a/src/view/com/util/FAB.tsx b/src/view/com/util/FAB.tsx index 1129f3361a..ad3fe87d1c 100644 --- a/src/view/com/util/FAB.tsx +++ b/src/view/com/util/FAB.tsx @@ -14,10 +14,18 @@ import {useStores} from '../../../state' type OnPress = ((event: GestureResponderEvent) => void) | undefined export const FAB = observer( - ({icon, onPress}: {icon: IconProp; onPress: OnPress}) => { + ({ + testID, + icon, + onPress, + }: { + testID: string + icon: IconProp + onPress: OnPress + }) => { const store = useStores() return ( - + ) : undefined} - onPressCompose(false)} /> + onPressCompose(false)} + /> ) })