forked from mattermost/mattermost-webapp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
text_setting.test.tsx
41 lines (39 loc) · 1.18 KB
/
text_setting.test.tsx
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
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import React from 'react';
import {shallow} from 'enzyme';
import AdminTextSetting from './text_setting';
describe('components/admin_console/TextSetting', () => {
test('render component with required props', () => {
const onChange = jest.fn();
const wrapper = shallow(
<AdminTextSetting
id='string.id'
label='some label'
value='some value'
onChange={onChange}
setByEnv={false}
labelClassName=''
inputClassName=''
maxLength={-1}
resizable={true}
type='input'
/>,
);
expect(wrapper).toMatchInlineSnapshot(`
<TextSetting
disabled={false}
footer={null}
id="string.id"
inputClassName="col-sm-8"
label="some label"
labelClassName="col-sm-4"
maxLength={-1}
onChange={[MockFunction]}
resizable={true}
type="input"
value="some value"
/>
`);
});
});