* 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
31 lines
942 B
TypeScript
31 lines
942 B
TypeScript
// 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 Avatars from './avatars';
|
|
|
|
describe('Avatars', () => {
|
|
test('should match snapshot for single avatar', () => {
|
|
const baseProps = {
|
|
theme: Preferences.THEMES.denim,
|
|
userIds: ['user1'],
|
|
};
|
|
|
|
const wrapper = shallow(<Avatars {...baseProps}/>);
|
|
expect(wrapper.getElement()).toMatchSnapshot();
|
|
});
|
|
|
|
test('should match snapshot for overflow', () => {
|
|
const baseProps = {
|
|
theme: Preferences.THEMES.denim,
|
|
userIds: ['user1', 'user2', 'user3', 'user4', 'user5', 'user6'],
|
|
};
|
|
|
|
const wrapper = shallow(<Avatars {...baseProps}/>);
|
|
expect(wrapper.getElement()).toMatchSnapshot();
|
|
});
|
|
});
|