diff --git a/packages/mobile/e2e/multi.test.js b/packages/mobile/e2e/multi.test.js new file mode 100644 index 0000000000..9e5b8107ef --- /dev/null +++ b/packages/mobile/e2e/multi.test.js @@ -0,0 +1,43 @@ +import press from './utils/press' +import write from './utils/write' +import info from './utils/info' +import { BASIC, LONG, STARTUP } from './utils/consts/timeouts' + +const { ios } = info + +const username = `user_${Math.random().toString(36).substring(2, 6)}` + +describe('User', () => { + beforeAll(async () => { + await device.launchApp({ newInstance: true, launchArgs: { detoxDebugVisibility: 'YES' } }) + }) + + test('should see join community screen', async () => { + await waitFor(element(by.text('Join community'))) + .toBeVisible() + .withTimeout(STARTUP) + }) + + test('enters invitation code', async () => { + await write(element(by.id('input')), process.env.INVITATION_CODE) + + if (!ios) await device.pressBack() + + await press(element(by.text('Continue'))) + + await waitFor(element(by.text('Register a username'))) + .toBeVisible() + .withTimeout(BASIC) + }) + + test('enters username', async () => { + await write(element(by.id('input')), username) + await press(element(by.text('Continue'))) + }) + + // test('sees channels list', async () => { + // await waitFor(element(by.id('channels_list'))) + // .toBeVisible() + // .withTimeout(STARTUP) + // }) +}) diff --git a/packages/mobile/src/components/Button/Button.component.tsx b/packages/mobile/src/components/Button/Button.component.tsx index 9c9fc97999..e698b1d03e 100644 --- a/packages/mobile/src/components/Button/Button.component.tsx +++ b/packages/mobile/src/components/Button/Button.component.tsx @@ -1,7 +1,6 @@ import React, { FC } from 'react' import { TouchableWithoutFeedback, View } from 'react-native' import { ButtonProps } from './Button.types' -import * as Progress from 'react-native-progress' import { Typography } from '../Typography/Typography.component' import { defaultTheme } from '../../styles/themes/default.theme' @@ -26,13 +25,9 @@ export const Button: FC = ({ onPress, title, width, loading, negati width, }} > - {!loading ? ( - - {title} - - ) : ( - - )} + + {title} + ) diff --git a/packages/mobile/src/components/Registration/UsernameRegistration.component.tsx b/packages/mobile/src/components/Registration/UsernameRegistration.component.tsx index 7c0301ae07..a5d64412ed 100644 --- a/packages/mobile/src/components/Registration/UsernameRegistration.component.tsx +++ b/packages/mobile/src/components/Registration/UsernameRegistration.component.tsx @@ -146,7 +146,6 @@ export const UsernameRegistration: FC = ({ )} -