Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Implemented DC.toModel #718

Merged
merged 2 commits into from
Dec 8, 2016
Merged

Implemented DC.toModel #718

merged 2 commits into from
Dec 8, 2016

Conversation

Reinmar
Copy link
Member

@Reinmar Reinmar commented Dec 8, 2016

@Reinmar
Copy link
Member Author

Reinmar commented Dec 8, 2016

Besides adding the new method I also added tests for the other ones, to confirm that they work with document fragments. We used doc frag convertion already in the clipboard, so the engine code was outdated.

@Reinmar Reinmar requested a review from scofalik December 8, 2016 13:21

const viewElement = data.toView( modelElement ).getChild( 0 );
const viewElement = viewDocumentFragment.getChild( 0 );
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be more complete if you check both children.

Copy link
Member Author

Choose a reason for hiding this comment

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

Agree. But this is not a test for conversion itself, but for methods utilising conversion.

Copy link
Member Author

Choose a reason for hiding this comment

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

I mean – there are a lot more things which could be broken below, but it'd be unwise to try to test them so late. I'm checking the number of children and the first child to verify that enough elements were converted and that they make some sense.

@scofalik scofalik merged commit 83e0f21 into master Dec 8, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants