Fix e2e tests
This commit is contained in:
@@ -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 () => {
|
||||
|
||||
@@ -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 (
|
||||
<TouchableWithoutFeedback onPress={onPress}>
|
||||
<TouchableWithoutFeedback testID={testID} onPress={onPress}>
|
||||
<View
|
||||
style={[
|
||||
styles.outer,
|
||||
|
||||
@@ -120,7 +120,11 @@ export const Home = observer(function Home({navIdx, visible}: ScreenParams) {
|
||||
</LinearGradient>
|
||||
</TouchableOpacity>
|
||||
) : undefined}
|
||||
<FAB icon="pen-nib" onPress={() => onPressCompose(false)} />
|
||||
<FAB
|
||||
testID="composeFAB"
|
||||
icon="pen-nib"
|
||||
onPress={() => onPressCompose(false)}
|
||||
/>
|
||||
</View>
|
||||
)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user