* 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>
22 lines
745 B
TypeScript
22 lines
745 B
TypeScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import {Alert} from 'react-native';
|
|
|
|
import {unsupportedServer} from './supported_server';
|
|
|
|
describe('Unsupported Server Alert', () => {
|
|
const formatMessage = jest.fn();
|
|
|
|
it('should show the alert for sysadmin', () => {
|
|
const alert = jest.spyOn(Alert, 'alert');
|
|
unsupportedServer(true, formatMessage);
|
|
expect(alert?.mock?.calls?.[0]?.[2]?.length).toBe(2);
|
|
});
|
|
|
|
it('should show the alert for team admin / user', () => {
|
|
const alert = jest.spyOn(Alert, 'alert');
|
|
unsupportedServer(false, formatMessage);
|
|
expect(alert?.mock?.calls?.[0]?.[2]?.length).toBe(1);
|
|
});
|
|
});
|