Skip to content
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

Merged
merged 10 commits into from Dec 21, 2016

Conversation

satyasinha
Copy link

Made this pull request but I'm writing a couple of enzyme test cases for the schema view and can be reviewed after.

@satyasinha satyasinha force-pushed the COMPASS-468-Schema-Shows-Undefined branch from 496b634 to 510ef58 Compare December 15, 2016 05:09
@satyasinha satyasinha force-pushed the COMPASS-468-Schema-Shows-Undefined branch from 510ef58 to 02355d3 Compare December 15, 2016 13:06
@satyasinha satyasinha force-pushed the COMPASS-468-Schema-Shows-Undefined branch from 02355d3 to ebc92ab Compare December 15, 2016 21:48
@rueckstiess rueckstiess changed the title Compass 468 schema shows undefined COMPASS-468 schema shows undefined Dec 19, 2016
// 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
Copy link
Member

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.

Copy link
Member

@rueckstiess rueckstiess left a 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.

screen shot 2016-12-19 at 12 27 22


fieldProp.types = typesWithUndefined;
component = shallow(<Field {...fieldProp} />);
expect(component.find(Type).at(0)).to.have.data('tip', 'String (40%)');
Copy link
Member

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.

@satyasinha satyasinha force-pushed the COMPASS-468-Schema-Shows-Undefined branch from ebc92ab to 3dbb561 Compare December 19, 2016 04:56
@satyasinha satyasinha force-pushed the COMPASS-468-Schema-Shows-Undefined branch from 3dbb561 to d69918a Compare December 20, 2016 04:19
Copy link
Member

@rueckstiess rueckstiess left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rueckstiess rueckstiess merged commit 57ee4a0 into master Dec 21, 2016
@rueckstiess rueckstiess deleted the COMPASS-468-Schema-Shows-Undefined branch December 21, 2016 00:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants