New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
COMPASS-468 schema shows undefined #689
Conversation
496b634
to
510ef58
Compare
510ef58
to
02355d3
Compare
02355d3
to
ebc92ab
Compare
// sets the active type to the first type in the props.types array | ||
this.setState({ | ||
types: types, | ||
activeType: this.props.types.length > 0 ? this.props.types[0] : null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the selection of activeType
needs to use types[0]
here instead of this.props.types[0]
otherwise it would still select Undefined
if it had higher probability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately still not working for me. Try with the dataset attached to ticket COMPASS-469.
|
||
fieldProp.types = typesWithUndefined; | ||
component = shallow(<Field {...fieldProp} />); | ||
expect(component.find(Type).at(0)).to.have.data('tip', 'String (40%)'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It also needs to test that the activeType (filled with the black bar) is String, not Undefined here.
ebc92ab
to
3dbb561
Compare
3dbb561
to
d69918a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Made this pull request but I'm writing a couple of enzyme test cases for the schema view and can be reviewed after.