[MM-16910] Set footerColor the same as navBarBackgroundColor (#3002)

* Set footerColor the same as navBarBackgroundColor

* Oops, forgot __snapshots__
This commit is contained in:
Miguel Alatzar 2019-07-19 17:29:17 -07:00 committed by GitHub
parent 6bfc1133e5
commit 8e48058fff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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();
});
});