|
@@ -7,14 +7,13 @@ import {RangeField} from 'app/components/forms';
|
|
describe('RangeField', function() {
|
|
describe('RangeField', function() {
|
|
describe('render()', function() {
|
|
describe('render()', function() {
|
|
it('renders', function() {
|
|
it('renders', function() {
|
|
- const wrapper = shallow(<RangeField name="fieldName" />, {
|
|
|
|
|
|
+ shallow(<RangeField name="fieldName" />, {
|
|
disableLifecycleMethods: true,
|
|
disableLifecycleMethods: true,
|
|
});
|
|
});
|
|
- expect(wrapper).toMatchSnapshot();
|
|
|
|
});
|
|
});
|
|
|
|
|
|
it('renders with optional attributes', function() {
|
|
it('renders with optional attributes', function() {
|
|
- const wrapper = shallow(
|
|
|
|
|
|
+ shallow(
|
|
<RangeField
|
|
<RangeField
|
|
name="fieldName"
|
|
name="fieldName"
|
|
min={0}
|
|
min={0}
|
|
@@ -25,18 +24,16 @@ describe('RangeField', function() {
|
|
/>,
|
|
/>,
|
|
{disableLifecycleMethods: true}
|
|
{disableLifecycleMethods: true}
|
|
);
|
|
);
|
|
- expect(wrapper).toMatchSnapshot();
|
|
|
|
});
|
|
});
|
|
|
|
|
|
it('renders with value', function() {
|
|
it('renders with value', function() {
|
|
- const wrapper = shallow(<RangeField name="fieldName" value={2} />, {
|
|
|
|
|
|
+ shallow(<RangeField name="fieldName" value={2} />, {
|
|
disableLifecycleMethods: true,
|
|
disableLifecycleMethods: true,
|
|
});
|
|
});
|
|
- expect(wrapper).toMatchSnapshot();
|
|
|
|
});
|
|
});
|
|
|
|
|
|
it('renders with form context', function() {
|
|
it('renders with form context', function() {
|
|
- const wrapper = shallow(<RangeField name="fieldName" />, {
|
|
|
|
|
|
+ shallow(<RangeField name="fieldName" />, {
|
|
disableLifecycleMethods: true,
|
|
disableLifecycleMethods: true,
|
|
context: {
|
|
context: {
|
|
form: {
|
|
form: {
|
|
@@ -47,7 +44,6 @@ describe('RangeField', function() {
|
|
},
|
|
},
|
|
},
|
|
},
|
|
});
|
|
});
|
|
- expect(wrapper).toMatchSnapshot();
|
|
|
|
});
|
|
});
|
|
|
|
|
|
it('renders with value=0 in form context', function() {
|
|
it('renders with value=0 in form context', function() {
|