Fix React warnings in tests
This commit is contained in:
parent
c84d5e2a45
commit
977bf7caaf
|
|
@ -198,8 +198,11 @@ describe('Element', function() {
|
|||
it('should allow an undefined value to be updated to a value', function (done) {
|
||||
var TestInput = React.createClass({
|
||||
mixins: [Formsy.Mixin],
|
||||
changeValue: function (event) {
|
||||
this.setValue(event.target.value);
|
||||
},
|
||||
render: function () {
|
||||
return <input value={this.getValue()}/>
|
||||
return <input value={this.getValue()} onChange={this.changeValue}/>
|
||||
}
|
||||
});
|
||||
var TestForm = React.createClass({
|
||||
|
|
@ -237,7 +240,7 @@ it('should allow an undefined value to be updated to a value', function (done) {
|
|||
var TestInput = React.createClass({
|
||||
mixins: [Formsy.Mixin],
|
||||
render: function () {
|
||||
return <input value={this.getValue()}/>
|
||||
return <input/>
|
||||
}
|
||||
});
|
||||
var TestForm = React.createClass({
|
||||
|
|
@ -264,7 +267,7 @@ it('should allow an undefined value to be updated to a value', function (done) {
|
|||
var TestInput = React.createClass({
|
||||
mixins: [Formsy.Mixin],
|
||||
render: function () {
|
||||
return <input value={this.getValue()}/>
|
||||
return <input/>
|
||||
}
|
||||
});
|
||||
var TestForm = React.createClass({
|
||||
|
|
@ -368,7 +371,7 @@ it('should allow an undefined value to be updated to a value', function (done) {
|
|||
var TestInput = React.createClass({
|
||||
mixins: [Formsy.Mixin],
|
||||
render: function () {
|
||||
return <input value={this.getValue()}/>
|
||||
return <input/>
|
||||
}
|
||||
});
|
||||
var TestForm = React.createClass({
|
||||
|
|
@ -394,7 +397,7 @@ it('should allow an undefined value to be updated to a value', function (done) {
|
|||
var TestInput = React.createClass({
|
||||
mixins: [Formsy.Mixin],
|
||||
render: function () {
|
||||
return <input value={this.getValue()}/>
|
||||
return <input/>
|
||||
}
|
||||
});
|
||||
var TestForm = React.createClass({
|
||||
|
|
@ -428,7 +431,7 @@ it('should allow an undefined value to be updated to a value', function (done) {
|
|||
var TestInput = React.createClass({
|
||||
mixins: [Formsy.Mixin],
|
||||
render: function () {
|
||||
return <input value={this.getValue()}/>
|
||||
return <input/>
|
||||
}
|
||||
});
|
||||
var TestForm = React.createClass({
|
||||
|
|
@ -459,7 +462,7 @@ it('should allow an undefined value to be updated to a value', function (done) {
|
|||
var TestInput = React.createClass({
|
||||
mixins: [Formsy.Mixin],
|
||||
render: function () {
|
||||
return <input value={this.getValue()}/>
|
||||
return <input/>
|
||||
}
|
||||
});
|
||||
var TestForm = React.createClass({
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ describe('Formsy', function () {
|
|||
// Wait before adding the input
|
||||
setTimeout(function () {
|
||||
|
||||
inputs.push(<TestInput name="test" value=""/>);
|
||||
inputs.push(<TestInput key={inputs.length} name="test" value=""/>);
|
||||
|
||||
forceUpdate(function () {
|
||||
// Wait for next event loop, as that does the form
|
||||
|
|
@ -135,7 +135,7 @@ describe('Formsy', function () {
|
|||
// Wait before adding the input
|
||||
setTimeout(function () {
|
||||
|
||||
inputs.push(<TestInput name="test"/>);
|
||||
inputs.push(<TestInput key={inputs.length} name="test"/>);
|
||||
|
||||
forceUpdate(function () {
|
||||
|
||||
|
|
@ -377,7 +377,7 @@ describe('Formsy', function () {
|
|||
);
|
||||
|
||||
// Wait before adding the input
|
||||
inputs.push(<TestInput name='test'/>);
|
||||
inputs.push(<TestInput key={inputs.length} name='test'/>);
|
||||
|
||||
forceUpdate(function () {
|
||||
|
||||
|
|
@ -400,7 +400,7 @@ describe('Formsy', function () {
|
|||
var TestInput = React.createClass({
|
||||
mixins: [Formsy.Mixin],
|
||||
render: function () {
|
||||
return <input value={this.getValue()}/>
|
||||
return <input/>
|
||||
}
|
||||
});
|
||||
var TestForm = React.createClass({
|
||||
|
|
@ -438,7 +438,7 @@ describe('Formsy', function () {
|
|||
var TestInput = React.createClass({
|
||||
mixins: [Formsy.Mixin],
|
||||
render: function () {
|
||||
return <input value={this.getValue()}/>;
|
||||
return <input/>;
|
||||
}
|
||||
});
|
||||
var TestForm = React.createClass({
|
||||
|
|
@ -493,7 +493,7 @@ describe('Formsy', function () {
|
|||
var TestInput = React.createClass({
|
||||
mixins: [Formsy.Mixin],
|
||||
render: function () {
|
||||
return <input value={this.getValue()}/>;
|
||||
return <input/>;
|
||||
}
|
||||
});
|
||||
var TestForm = React.createClass({
|
||||
|
|
@ -523,7 +523,7 @@ describe('Formsy', function () {
|
|||
var TestInput = React.createClass({
|
||||
mixins: [Formsy.Mixin],
|
||||
render: function () {
|
||||
return <input value={this.getValue()}/>;
|
||||
return <input/>;
|
||||
}
|
||||
});
|
||||
var TestForm = React.createClass({
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ describe('Validation', function() {
|
|||
var TestInput = React.createClass({
|
||||
mixins: [Formsy.Mixin],
|
||||
render: function () {
|
||||
return <input value={this.getValue()}/>
|
||||
return <input/>
|
||||
}
|
||||
});
|
||||
var TestForm = React.createClass({
|
||||
|
|
@ -191,7 +191,7 @@ describe('Validation', function() {
|
|||
var TestInput = React.createClass({
|
||||
mixins: [Formsy.Mixin],
|
||||
render: function () {
|
||||
return <input value={this.getValue()}/>
|
||||
return <input/>
|
||||
}
|
||||
});
|
||||
var TestForm = React.createClass({
|
||||
|
|
@ -223,7 +223,7 @@ describe('Validation', function() {
|
|||
var TestInput = React.createClass({
|
||||
mixins: [Formsy.Mixin],
|
||||
render: function () {
|
||||
return <input value={this.getValue()}/>
|
||||
return <input/>
|
||||
}
|
||||
});
|
||||
var TestForm = React.createClass({
|
||||
|
|
@ -253,7 +253,7 @@ describe('Validation', function() {
|
|||
var TestInput = React.createClass({
|
||||
mixins: [Formsy.Mixin],
|
||||
render: function () {
|
||||
return <input value={this.getValue()}/>
|
||||
return <input/>
|
||||
}
|
||||
});
|
||||
var TestForm = React.createClass({
|
||||
|
|
|
|||
Loading…
Reference in New Issue