blob: 6b919cb86c7c98b085e1f9838c8c0c4a52340472 (
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
|
// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
import React from 'react';
import {shallow} from 'enzyme';
import EditCommand from 'components/integrations/components/edit_command/edit_command.jsx';
describe('components/integrations/EditCommand', () => {
test('should match snapshot', () => {
const emptyFunction = jest.fn();
const id = 'r5tpgt4iepf45jt768jz84djic';
global.window.mm_config = {};
global.window.mm_config.EnableCommands = 'true';
const wrapper = shallow(
<EditCommand
team={{
id,
name: 'test'
}}
commandId={id}
commands={[]}
editCommandRequest={{
status: 'not_started',
error: null
}}
actions={{
getCustomTeamCommands: emptyFunction,
editCommand: emptyFunction
}}
/>
);
expect(wrapper).toMatchSnapshot();
});
});
|