* 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
58 lines
1.5 KiB
JavaScript
58 lines
1.5 KiB
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 {General} from '@mm-redux/constants';
|
|
import Preferences from '@mm-redux/constants/preferences';
|
|
|
|
import UserStatus from './user_status';
|
|
|
|
describe('UserStatus', () => {
|
|
const baseProps = {
|
|
size: 32,
|
|
theme: Preferences.THEMES.denim,
|
|
};
|
|
|
|
test('should match snapshot, should default to offline status', () => {
|
|
const wrapper = shallow(
|
|
<UserStatus {...baseProps}/>,
|
|
);
|
|
|
|
expect(wrapper.getElement()).toMatchSnapshot();
|
|
});
|
|
|
|
test('should match snapshot, away status', () => {
|
|
const wrapper = shallow(
|
|
<UserStatus
|
|
{...baseProps}
|
|
status={General.AWAY}
|
|
/>,
|
|
);
|
|
|
|
expect(wrapper.getElement()).toMatchSnapshot();
|
|
});
|
|
|
|
test('should match snapshot, dnd status', () => {
|
|
const wrapper = shallow(
|
|
<UserStatus
|
|
{...baseProps}
|
|
status={General.DND}
|
|
/>,
|
|
);
|
|
|
|
expect(wrapper.getElement()).toMatchSnapshot();
|
|
});
|
|
|
|
test('should match snapshot, online status', () => {
|
|
const wrapper = shallow(
|
|
<UserStatus
|
|
{...baseProps}
|
|
status={General.ONLINE}
|
|
/>,
|
|
);
|
|
|
|
expect(wrapper.getElement()).toMatchSnapshot();
|
|
});
|
|
});
|