* new themes and theme type updates * update theme processing port newer functionality from webapp * update theme UI including new svg-based thumbnail * lint fixes * update snapshots and tests * update theme tile border approach * remove unused path component * remove old variable typo * remove old variable type from theme type * lint and snapshot updates * update snapshots
35 lines
1,022 B
JavaScript
35 lines
1,022 B
JavaScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import {shallow} from 'enzyme';
|
|
import React from 'react';
|
|
|
|
import Preferences from '@mm-redux/constants/preferences';
|
|
|
|
import ReactionPicker from './reaction_picker';
|
|
|
|
describe('Reactions', () => {
|
|
const baseProps = {
|
|
addReaction: jest.fn(),
|
|
openReactionScreen: jest.fn(),
|
|
recentEmojis: [],
|
|
theme: Preferences.THEMES.denim,
|
|
};
|
|
|
|
test('Should match snapshot with default emojis', () => {
|
|
const wrapper = shallow(<ReactionPicker {...baseProps}/>);
|
|
expect(wrapper.getElement()).toMatchSnapshot();
|
|
});
|
|
|
|
test('Should match snapshot with default emojis', () => {
|
|
const props = {
|
|
...baseProps,
|
|
recentEmojis: [
|
|
'rocket',
|
|
'100',
|
|
],
|
|
};
|
|
const wrapper = shallow(<ReactionPicker {...props}/>);
|
|
expect(wrapper.getElement()).toMatchSnapshot();
|
|
});
|
|
});
|