Files
mostlymatter/webapp/tests/components/integrations/edit_command.test.jsx
94117nl 6ec24867bc GH-6448 Migrate edit_command.jsx to be pure and use Redux (#6858)
* Migrate edit_command.jsx to be pure and use Redux, add basic test

* Update newCommand to reference modified command

* Fix typo

* Remove unnecessary re-renders
2017-07-31 08:26:04 -04:00

36 строки
1.1 KiB
JavaScript

// 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();
});
});