Added more webdriver tests testing against a real browser.

This commit is contained in:
orangemug
2018-01-05 17:45:55 +00:00
parent 6e86c60f89
commit 942b2240a7
47 changed files with 2244 additions and 637 deletions

View File

@@ -3,6 +3,7 @@ import PropTypes from 'prop-types'
class StringInput extends React.Component {
static propTypes = {
"data-wd-key": PropTypes.string,
value: PropTypes.string,
style: PropTypes.object,
default: PropTypes.string,
@@ -18,6 +19,7 @@ class StringInput extends React.Component {
}
componentWillReceiveProps(nextProps) {
console.log("@@ STRING componentWillReceiveProps", JSON.stringify(nextProps))
this.setState({ value: nextProps.value || '' })
}
@@ -40,12 +42,19 @@ class StringInput extends React.Component {
}
return React.createElement(tag, {
"data-wd-key": this.props["data-wd-key"],
className: classes.join(" "),
style: this.props.style,
value: this.state.value,
placeholder: this.props.default,
onChange: e => this.setState({ value: e.target.value }),
onChange: e => {
console.log("@@ STRING CHANGE", JSON.stringify(e.target.value));
this.setState({
value: e.target.value
})
},
onBlur: () => {
console.log("@@ STRING BLUR", JSON.stringify(this.state.value), "props:", JSON.stringify(this.props.value));
if(this.state.value!==this.props.value) this.props.onChange(this.state.value)
}
});