Summary Adds an avatar list component. It is required for the new collapsed reply threads feature. The feature design is at https://www.figma.com/file/t2KIwZnxb7h94249k6XdOp/MM-18107-Mobile-Threads-Overhaul and https://mattermost.atlassian.net/wiki/spaces/Threads/pages/1003945985/Mobile+User+Experience Ticket Link https://mattermost.atlassian.net/browse/MM-29104
31 lines
946 B
TypeScript
31 lines
946 B
TypeScript
// 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 '@mm-redux/constants/preferences';
|
|
|
|
import Avatars from './avatars';
|
|
|
|
describe('Avatars', () => {
|
|
test('should match snapshot for single avatar', () => {
|
|
const baseProps = {
|
|
theme: Preferences.THEMES.default,
|
|
userIds: ['user1'],
|
|
};
|
|
|
|
const wrapper = shallow(<Avatars {...baseProps}/>);
|
|
expect(wrapper.getElement()).toMatchSnapshot();
|
|
});
|
|
|
|
test('should match snapshot for overflow', () => {
|
|
const baseProps = {
|
|
theme: Preferences.THEMES.default,
|
|
userIds: ['user1', 'user2', 'user3', 'user4', 'user5', 'user6'],
|
|
};
|
|
|
|
const wrapper = shallow(<Avatars {...baseProps}/>);
|
|
expect(wrapper.getElement()).toMatchSnapshot();
|
|
});
|
|
});
|