Skip to content

Commit

Permalink
React/Enzyme test warnings (#652)
Browse files Browse the repository at this point in the history
* Fix one <Rule/> serverVersion prop warning in tests

Warning: Failed prop type: The prop `serverVersion` is marked as required in `Rule`, but its value is `undefined`.
    in Rule

* Fix <RuleCategoryRange/> serverVersion prop warning in tests

Warning: Failed prop type: The prop `isWritable` is marked as required in `RuleCategoryRange`, but its value is `undefined`.
    in RuleCategoryRange

* Fix <RuleCategoryRange/> isWritable prop warning in tests

Warning: Failed prop type: The prop `isWritable` is marked as required in `RuleCategoryRange`, but its value is `undefined`.
    in RuleCategoryRange

* Remove unused ControlLabel import

* More <Rule/> test warning fixes

    when category "range" is supplied
Warning: Failed prop type: The prop `serverVersion` is marked as required in `Rule`, but its value is `undefined`.
    in Rule
Warning: Failed prop type: The prop `isWritable` is marked as required in `Rule`, but its value is `undefined`.
    in Rule
Warning: Failed prop type: The prop `isWritable` is marked as required in `RuleCategoryRange`, but its value is `undefined`.
    in RuleCategoryRange

* Fix <SidebarInstanceProperties/> test warning for activeNamespace

Warning: Failed prop type: The prop `activeNamespace` is marked as required in `SidebarInstanceProperties`, but its value is `undefined`.
    in SidebarInstanceProperties
  • Loading branch information
pzrq authored and Satya committed Dec 1, 2016
1 parent 736ce32 commit 282c3c2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions test/sidebar-instance.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ describe('<SidebarInstanceProperties />', () => {
<SidebarInstanceProperties
connection={connection}
instance={instance}
activeNamespace={''}
/>);

it('renders the endpoint host name and port as text', () => {
Expand Down Expand Up @@ -62,6 +63,7 @@ describe('<SidebarInstanceProperties />', () => {
<SidebarInstanceProperties
connection={connection}
instance={instance}
activeNamespace={''}
/>);

it('renders the endpoint host name and port as text', () => {
Expand Down
3 changes: 2 additions & 1 deletion test/validation.range.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const _ = require('lodash');
const shallow = require('enzyme').shallow;
const mount = require('enzyme').mount;
const bootstrap = require('react-bootstrap');
const ControlLabel = bootstrap.ControlLabel;
const FormControl = bootstrap.FormControl;
const RangeInput = require('../src/internal-packages/validation/lib/components/common/range-input');
const RuleCategoryRange = require('../src/internal-packages/validation/lib/components/rule-categories/range');
Expand Down Expand Up @@ -66,6 +65,8 @@ describe('<RuleCategoryRange />', function() {
upperBoundValue: '5'
},
nullable: false,
serverVersion: '3.4.0',
isWritable: true,
validate: function() {}
};

Expand Down
5 changes: 4 additions & 1 deletion test/validation.rule.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ describe('<Rule />', function() {
category: 'type',
parameters: {type: 9}, // type "date"
nullable: false,
serverVersion: '3.4.0',
isWritable: true,
validate: function() {}
};
Expand Down Expand Up @@ -96,7 +97,9 @@ describe('<Rule />', function() {
field: 'created_at',
category: 'range',
parameters: {type: 9}, // type "date"
nullable: false
nullable: false,
serverVersion: '3.2.11',
isWritable: true
};

it('has a category of "range"', function() {
Expand Down

0 comments on commit 282c3c2

Please sign in to comment.