* Add Report a Problem functionality * update cache pinned SHA version from 4.0.2 to 4.2.0 * Address feedback * Fix tests * Fix some issues and update kotlin coroutines version * Fix delete file for iOS * Bump 1 more version for coroutines * Use rxjava instead of kotlin coroutines to avoid security issue * Move path prefix to avoid test error * Address feedback * Address feedback * Address feedback * Use mailto on iOS * Fix tests related to button changes * Address feedback * Update icon and fix onboarding buttons * Fix test --------- Co-authored-by: Angelos Kyratzakos <angelos.kyratzakos@mattermost.com> Co-authored-by: Mattermost Build <build@mattermost.com>
52 lines
1.3 KiB
TypeScript
52 lines
1.3 KiB
TypeScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import {render} from '@testing-library/react-native';
|
|
import React from 'react';
|
|
|
|
import {Preferences} from '@constants';
|
|
|
|
import MenuDivider from './index';
|
|
|
|
describe('components/menu_divider', () => {
|
|
const theme = Preferences.THEMES.denim;
|
|
|
|
it('should render divider with default margins', () => {
|
|
const {root} = render(<MenuDivider/>);
|
|
|
|
expect(root).toHaveStyle({
|
|
marginTop: 8,
|
|
marginBottom: 8,
|
|
marginLeft: 0,
|
|
marginRight: 0,
|
|
});
|
|
});
|
|
|
|
it('should render divider with custom margins', () => {
|
|
const margins = {
|
|
marginTop: 16,
|
|
marginBottom: 24,
|
|
marginLeft: 12,
|
|
marginRight: 13,
|
|
};
|
|
|
|
const {root} = render(<MenuDivider {...margins}/>);
|
|
|
|
expect(root).toHaveStyle({
|
|
marginTop: 16,
|
|
marginBottom: 24,
|
|
marginLeft: 12,
|
|
marginRight: 13,
|
|
});
|
|
});
|
|
|
|
it('should apply correct theme styles', () => {
|
|
const {root} = render(<MenuDivider/>);
|
|
|
|
expect(root).toHaveStyle({
|
|
backgroundColor: theme.centerChannelColor,
|
|
height: 1,
|
|
opacity: 0.08,
|
|
});
|
|
});
|
|
});
|