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 () => {
|
it('As Alice, I can login, and post a text', async () => {
|
||||||
await grantAccessToUserWithValidCredentials('alice')
|
await grantAccessToUserWithValidCredentials('alice')
|
||||||
await element(by.id('composePromptButton')).tap()
|
await element(by.id('composeFAB')).tap()
|
||||||
await device.takeScreenshot('1- opened composer')
|
await device.takeScreenshot('1- opened composer')
|
||||||
await element(by.id('composerTextInput')).typeText(
|
await element(by.id('composerTextInput')).typeText(
|
||||||
'Greetings earthlings, I come in peace... and to run some tests.',
|
'Greetings earthlings, I come in peace... and to run some tests.',
|
||||||
@@ -49,7 +49,7 @@ describe('Example', () => {
|
|||||||
await device.takeScreenshot('2- entered text')
|
await device.takeScreenshot('2- entered text')
|
||||||
await element(by.id('composerPublishButton')).tap()
|
await element(by.id('composerPublishButton')).tap()
|
||||||
await device.takeScreenshot('3- opened general section')
|
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 () => {
|
it('I can create a new account', async () => {
|
||||||
|
|||||||
@@ -14,10 +14,18 @@ import {useStores} from '../../../state'
|
|||||||
|
|
||||||
type OnPress = ((event: GestureResponderEvent) => void) | undefined
|
type OnPress = ((event: GestureResponderEvent) => void) | undefined
|
||||||
export const FAB = observer(
|
export const FAB = observer(
|
||||||
({icon, onPress}: {icon: IconProp; onPress: OnPress}) => {
|
({
|
||||||
|
testID,
|
||||||
|
icon,
|
||||||
|
onPress,
|
||||||
|
}: {
|
||||||
|
testID: string
|
||||||
|
icon: IconProp
|
||||||
|
onPress: OnPress
|
||||||
|
}) => {
|
||||||
const store = useStores()
|
const store = useStores()
|
||||||
return (
|
return (
|
||||||
<TouchableWithoutFeedback onPress={onPress}>
|
<TouchableWithoutFeedback testID={testID} onPress={onPress}>
|
||||||
<View
|
<View
|
||||||
style={[
|
style={[
|
||||||
styles.outer,
|
styles.outer,
|
||||||
|
|||||||
@@ -120,7 +120,11 @@ export const Home = observer(function Home({navIdx, visible}: ScreenParams) {
|
|||||||
</LinearGradient>
|
</LinearGradient>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
) : undefined}
|
) : undefined}
|
||||||
<FAB icon="pen-nib" onPress={() => onPressCompose(false)} />
|
<FAB
|
||||||
|
testID="composeFAB"
|
||||||
|
icon="pen-nib"
|
||||||
|
onPress={() => onPressCompose(false)}
|
||||||
|
/>
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user