* MM_36721 : Added testscript for AppVersion component + Corrected imported Type definition * Added CompassIcon component * Adding TextProps to FormattedText component * Added status bar component * Added User status component * Added ProfilePicture, did_update hook and sorted imports * Added ChannelIcon component * Added ChannelTitle component * Added Channel Nav Bar component * Added channel screen * Added withSafeAreaInsets HOC and Added font compassIcon to Xcode * Fix Android crashes as it is looking for MainSidebar and SettingsSidebar * Revert "Fix Android crashes as it is looking for MainSidebar and SettingsSidebar" This reverts commit 62ea11ae691e83bbe3c5e81c243b8ed89fa96083. * Channel Icon clean up * Updated assets/compass-icons files * Updated channel title component * ProfilePicture - Code clean up * UserStatus component - cleaned * Channel screen fix * Fix TS issue * Update index.tsx * Removed ProfilePicture component To be added when needed * Removed UserStatus component * Added IS_LANDSCAPE constant * Code review correction * Fix ts issue * Added channel.displayName to reinforce security for findAndObserve on potential null teammate profile Co-authored-by: Elias Nahum <nahumhbl@gmail.com> * Fix observation on array vs single element * Refactored ChannelTitle component Co-authored-by: Elias Nahum <nahumhbl@gmail.com> * Refactored ChannelGuestLabel * Refactored ChannelDisplayName * ChannelTitle cleaned up * Fix roles check * Removing unused user utils * Minor clean up * Fix TS issue * Code Refactored. * Fix render bug in channel_display_name * Added logout button * refactored code Co-authored-by: Avinash Lingaloo <> Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
29 lines
834 B
TypeScript
29 lines
834 B
TypeScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import React from 'react';
|
|
import {render} from '@testing-library/react-native';
|
|
|
|
import {Preferences} from '@constants';
|
|
|
|
import ErrorText from './index';
|
|
|
|
describe('ErrorText', () => {
|
|
const baseProps = {
|
|
testID: 'error.text',
|
|
textStyle: {
|
|
fontSize: 14,
|
|
marginHorizontal: 15,
|
|
},
|
|
theme: Preferences.THEMES.default,
|
|
error: 'Username must begin with a letter and contain between 3 and 22 characters including numbers, lowercase letters, and the symbols',
|
|
};
|
|
|
|
test('should match snapshot', () => {
|
|
const wrapper = render(
|
|
<ErrorText {...baseProps}/>,
|
|
);
|
|
|
|
expect(wrapper.toJSON()).toMatchSnapshot();
|
|
});
|
|
});
|