Automated cherry pick of #3002 (#3004)

* Set footerColor the same as navBarBackgroundColor

* Oops, forgot __snapshots__
This commit is contained in:
Mattermost Build 2019-07-20 03:17:32 +02:00 committed by Saturnino Abril
parent 4d5422e98b
commit a4284666a3
3 changed files with 52 additions and 1 deletions

View file

@ -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}
/>
`;

View file

@ -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}

View 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();
});
});