blob: a1c44a0371b2a6a29b751decbf23148a1cf02d9f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
import React from 'react';
import {shallow} from 'enzyme';
import ColorSetting from 'components/admin_console/color_setting.jsx';
describe('components/ColorSetting', () => {
test('should match snapshot, all', () => {
function emptyFunction() {} //eslint-disable-line no-empty-function
const wrapper = shallow(
<ColorSetting
id='id'
label='label'
helpText='helptext'
value='#fff'
onChange={emptyFunction}
disabled={false}
/>
);
expect(wrapper).toMatchSnapshot();
});
test('should match snapshot, no help text', () => {
function emptyFunction() {} //eslint-disable-line no-empty-function
const wrapper = shallow(
<ColorSetting
id='id'
label='label'
value='#fff'
onChange={emptyFunction}
disabled={false}
/>
);
expect(wrapper).toMatchSnapshot();
});
test('should match snapshot, disabled', () => {
function emptyFunction() {} //eslint-disable-line no-empty-function
const wrapper = shallow(
<ColorSetting
id='id'
label='label'
value='#fff'
onChange={emptyFunction}
disabled={true}
/>
);
expect(wrapper).toMatchSnapshot();
});
});
|