Files
mattermost-mobile/app/components/server_icon/server_icon.test.tsx
Elias Nahum d14ce66897 [Gekidou] Multi-Server support UI (#5912)
* Multi-Server support UI

* feedback review

* Apply suggestions from code review

Co-authored-by: Avinash Lingaloo <avinashlng1080@gmail.com>

Co-authored-by: Avinash Lingaloo <avinashlng1080@gmail.com>
2022-01-28 09:51:30 -03:00

44 lines
1.1 KiB
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import React from 'react';
import {renderWithIntlAndTheme} from '@test/intl-test-helper';
import Icon from './index';
describe('Server Icon', () => {
test('Server Icon Component should match snapshot', () => {
const {toJSON} = renderWithIntlAndTheme(
<Icon
hasUnreads={false}
mentionCount={0}
/>,
);
expect(toJSON()).toMatchSnapshot();
});
test('Server Icon Component should match snapshot with unreads', () => {
const {toJSON} = renderWithIntlAndTheme(
<Icon
hasUnreads={true}
mentionCount={0}
/>,
);
expect(toJSON()).toMatchSnapshot();
});
test('Server Icon Component should match snapshot with mentions', () => {
const {toJSON} = renderWithIntlAndTheme(
<Icon
hasUnreads={false}
mentionCount={1}
/>,
);
expect(toJSON()).toMatchSnapshot();
});
});