Revision 89b8fc37
Added by Amir Fefer over 4 years ago
webpack/assets/javascripts/react_app/components/common/forms/Actions.test.js | ||
---|---|---|
import toJson from 'enzyme-to-json';
|
||
import { shallow } from 'enzyme';
|
||
import { shallow } from '@theforeman/test';
|
||
import React from 'react';
|
||
|
||
import Actions from './Actions';
|
||
... | ... | |
it('should include a cancel / submit buttons', () => {
|
||
const wrapper = shallow(<Actions />);
|
||
|
||
expect(toJson(wrapper)).toMatchSnapshot();
|
||
expect(wrapper).toMatchSnapshot();
|
||
});
|
||
it('should show disabled submit button', () => {
|
||
const wrapper = shallow(<Actions disabled />);
|
||
|
||
expect(toJson(wrapper)).toMatchSnapshot();
|
||
expect(wrapper).toMatchSnapshot();
|
||
});
|
||
it('should show a spinner when submitting', () => {
|
||
const wrapper = shallow(<Actions submitting />);
|
||
|
||
expect(toJson(wrapper)).toMatchSnapshot();
|
||
expect(wrapper).toMatchSnapshot();
|
||
});
|
||
});
|
Also available in: Unified diff
Fixes #28488 - consume jest config from env