feat(Android): Remove Open workspace from onboarding (#5065)
* Remove Open * Remove on Android only and comment tests out
This commit is contained in:
parent
edea063cf6
commit
c00ab98441
|
@ -22,7 +22,7 @@ import { sanitizeLikeString } from '../../lib/database/utils';
|
||||||
import UserPreferences from '../../lib/methods/userPreferences';
|
import UserPreferences from '../../lib/methods/userPreferences';
|
||||||
import { OutsideParamList } from '../../stacks/types';
|
import { OutsideParamList } from '../../stacks/types';
|
||||||
import { withTheme } from '../../theme';
|
import { withTheme } from '../../theme';
|
||||||
import { isTablet } from '../../lib/methods/helpers';
|
import { isIOS, isTablet } from '../../lib/methods/helpers';
|
||||||
import EventEmitter from '../../lib/methods/helpers/events';
|
import EventEmitter from '../../lib/methods/helpers/events';
|
||||||
import { BASIC_AUTH_KEY, setBasicAuth } from '../../lib/methods/helpers/fetch';
|
import { BASIC_AUTH_KEY, setBasicAuth } from '../../lib/methods/helpers/fetch';
|
||||||
import { showConfirmationAlert } from '../../lib/methods/helpers/info';
|
import { showConfirmationAlert } from '../../lib/methods/helpers/info';
|
||||||
|
@ -392,28 +392,32 @@ class NewServerView extends React.Component<INewServerViewProps, INewServerViewS
|
||||||
style={[styles.connectButton, { marginTop: verticalScale({ size: 16, height }) }]}
|
style={[styles.connectButton, { marginTop: verticalScale({ size: 16, height }) }]}
|
||||||
testID='new-server-view-button'
|
testID='new-server-view-button'
|
||||||
/>
|
/>
|
||||||
<OrSeparator theme={theme} />
|
{isIOS ? (
|
||||||
<Text
|
<>
|
||||||
style={[
|
<OrSeparator theme={theme} />
|
||||||
styles.description,
|
<Text
|
||||||
{
|
style={[
|
||||||
color: themes[theme].auxiliaryText,
|
styles.description,
|
||||||
fontSize: moderateScale({ size: 14, width }),
|
{
|
||||||
marginBottom: verticalScale({ size: 16, height })
|
color: themes[theme].auxiliaryText,
|
||||||
}
|
fontSize: moderateScale({ size: 14, width }),
|
||||||
]}
|
marginBottom: verticalScale({ size: 16, height })
|
||||||
>
|
}
|
||||||
{I18n.t('Onboarding_join_open_description')}
|
]}
|
||||||
</Text>
|
>
|
||||||
<Button
|
{I18n.t('Onboarding_join_open_description')}
|
||||||
title={I18n.t('Join_our_open_workspace')}
|
</Text>
|
||||||
type='secondary'
|
<Button
|
||||||
backgroundColor={themes[theme].chatComponentBackground}
|
title={I18n.t('Join_our_open_workspace')}
|
||||||
onPress={this.connectOpen}
|
type='secondary'
|
||||||
disabled={connecting}
|
backgroundColor={themes[theme].chatComponentBackground}
|
||||||
loading={connectingOpen && connecting}
|
onPress={this.connectOpen}
|
||||||
testID='new-server-view-open'
|
disabled={connecting}
|
||||||
/>
|
loading={connectingOpen && connecting}
|
||||||
|
testID='new-server-view-open'
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
) : null}
|
||||||
</FormContainerInner>
|
</FormContainerInner>
|
||||||
{this.renderCertificatePicker()}
|
{this.renderCertificatePicker()}
|
||||||
</FormContainer>
|
</FormContainer>
|
||||||
|
|
|
@ -33,9 +33,9 @@ describe('i18n', () => {
|
||||||
({ textMatcher } = platformTypes[device.getPlatform()]);
|
({ textMatcher } = platformTypes[device.getPlatform()]);
|
||||||
});
|
});
|
||||||
it("OS set to 'en' and proper translate to 'en'", async () => {
|
it("OS set to 'en' and proper translate to 'en'", async () => {
|
||||||
// if (device.getPlatform() === 'android') {
|
if (device.getPlatform() === 'android') {
|
||||||
// return; // FIXME: Passing language with launch parameters doesn't work with Android
|
return; // FIXME: Passing language with launch parameters doesn't work with Android
|
||||||
// }
|
}
|
||||||
await device.launchApp({
|
await device.launchApp({
|
||||||
...defaultLaunchArgs,
|
...defaultLaunchArgs,
|
||||||
languageAndLocale: {
|
languageAndLocale: {
|
||||||
|
@ -54,9 +54,9 @@ describe('i18n', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it("OS set to unavailable language and fallback to 'en'", async () => {
|
it("OS set to unavailable language and fallback to 'en'", async () => {
|
||||||
// if (device.getPlatform() === 'android') {
|
if (device.getPlatform() === 'android') {
|
||||||
// return; // FIXME: Passing language with launch parameters doesn't work with Android
|
return; // FIXME: Passing language with launch parameters doesn't work with Android
|
||||||
// }
|
}
|
||||||
await device.launchApp({
|
await device.launchApp({
|
||||||
...defaultLaunchArgs,
|
...defaultLaunchArgs,
|
||||||
languageAndLocale: {
|
languageAndLocale: {
|
||||||
|
|
|
@ -19,9 +19,9 @@ describe('Onboarding', () => {
|
||||||
await expect(element(by.id('new-server-view'))).toBeVisible();
|
await expect(element(by.id('new-server-view'))).toBeVisible();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should have "Join our open workspace"', async () => {
|
// it('should have "Join our open workspace"', async () => {
|
||||||
await expect(element(by.id('new-server-view-open'))).toBeVisible();
|
// await expect(element(by.id('new-server-view-open'))).toBeVisible();
|
||||||
});
|
// });
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Usage', () => {
|
describe('Usage', () => {
|
||||||
|
@ -34,12 +34,12 @@ describe('Onboarding', () => {
|
||||||
await element(by[textMatcher]('OK').and(by.type(alertButtonType))).tap();
|
await element(by[textMatcher]('OK').and(by.type(alertButtonType))).tap();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should tap on "Join our open workspace" and navigate', async () => {
|
// it('should tap on "Join our open workspace" and navigate', async () => {
|
||||||
await element(by.id('new-server-view-open')).tap();
|
// await element(by.id('new-server-view-open')).tap();
|
||||||
await waitFor(element(by.id('workspace-view')))
|
// await waitFor(element(by.id('workspace-view')))
|
||||||
.toBeVisible()
|
// .toBeVisible()
|
||||||
.withTimeout(60000);
|
// .withTimeout(60000);
|
||||||
});
|
// });
|
||||||
|
|
||||||
it('should enter a valid server without login services and navigate to login', async () => {
|
it('should enter a valid server without login services and navigate to login', async () => {
|
||||||
await device.launchApp({ newInstance: true });
|
await device.launchApp({ newInstance: true });
|
||||||
|
|
Loading…
Reference in New Issue