* Set footerColor the same as navBarBackgroundColor * Oops, forgot __snapshots__
This commit is contained in:
parent
4d5422e98b
commit
a4284666a3
3 changed files with 52 additions and 1 deletions
|
|
@ -0,0 +1,13 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`ChannelSidebar should match, full snapshot 1`] = `
|
||||
<DrawerLayout
|
||||
drawerPosition="left"
|
||||
drawerWidth={-30}
|
||||
isTablet={false}
|
||||
onDrawerClose={[Function]}
|
||||
onDrawerOpen={[Function]}
|
||||
renderNavigationView={[Function]}
|
||||
useNativeAnimations={true}
|
||||
/>
|
||||
`;
|
||||
|
|
@ -378,7 +378,7 @@ export default class ChannelSidebar extends Component {
|
|||
<SafeAreaView
|
||||
navBarBackgroundColor={theme.sidebarBg}
|
||||
backgroundColor={theme.sidebarHeaderBg}
|
||||
footerColor={theme.sidebarHeaderBg}
|
||||
footerColor={theme.sidebarBg}
|
||||
>
|
||||
<DrawerSwiper
|
||||
ref={this.drawerSwiperRef}
|
||||
|
|
|
|||
38
app/components/sidebars/main/main_sidebar.test.js
Normal file
38
app/components/sidebars/main/main_sidebar.test.js
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import React from 'react';
|
||||
import {shallow} from 'enzyme';
|
||||
|
||||
import Preferences from 'mattermost-redux/constants/preferences';
|
||||
|
||||
import ChannelSidebar from './main_sidebar';
|
||||
|
||||
jest.mock('react-intl');
|
||||
|
||||
describe('ChannelSidebar', () => {
|
||||
const baseProps = {
|
||||
actions: {
|
||||
getTeams: jest.fn(),
|
||||
logChannelSwitch: jest.fn(),
|
||||
makeDirectChannel: jest.fn(),
|
||||
setChannelDisplayName: jest.fn(),
|
||||
setChannelLoading: jest.fn(),
|
||||
},
|
||||
blurPostTextBox: jest.fn(),
|
||||
currentTeamId: 'current-team-id',
|
||||
currentUserId: 'current-user-id',
|
||||
deviceWidth: 10,
|
||||
isLandscape: false,
|
||||
teamsCount: 2,
|
||||
theme: Preferences.THEMES.default,
|
||||
};
|
||||
|
||||
test('should match, full snapshot', () => {
|
||||
const wrapper = shallow(
|
||||
<ChannelSidebar {...baseProps}/>
|
||||
);
|
||||
|
||||
expect(wrapper.getElement()).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
Loading…
Reference in a new issue