Closed andreit closed 10 years ago
@andreit I think our services module is growing pretty fast. Maybe we need to split it up into submodules (either in or after this PR)?
Maybe a structure like:
services/utils.js
services/behaviour.js
services/router/layout.js
services/router/view.js
...
services/conversation/layout.js
services/conversation/view.js
Just a suggestion, whatever makes more sense to you. Thoughts?
I think we still need tests for:
connectionComponent
connectionLayout
Otherwise looks good :) Thanks for splitting up the services.
oh right... forgot about those
@justinvdm Added tests for the connection component and the layout. I test for the bounding box in one of the dragBehavior
tests. Do you think we need some more?
Cool, thanks. I'd like a test for seeing that we draw the bounding box correctly (checking the positioning and sizing of the box, not just checking that exists). Might be overkill, but we have similar tests for every other svg component, so thought we might as well cover that one too.
@andreit sorry, didn't mention you in previous comment (so you might not have gotten a notification) ^^^
@justinvdm Yes, got it. Trying to figure out how to stub out getBBox
. It doesn't work properly in the tests because the element is not actually attached to the browser's dom. :(
@andreit Ah, I see. Hmm, maybe its more work than its worth. Happy for this to land as is.
:+1:
@justinvdm Cool thanks. Will read up on how to do this later.
Sorry, didn't realise tests were still to be coming. Will stop asking for tests until then. Happy with the general approach we are taking.