WebApp
WebApp copied to clipboard
Add reply-comments.test, extend comments.model, extend comments.hooks
Is it enough, at creation time of a comment, to check if the "isReply" is true and if so just add "parentCommentId" to the form?
Just adding the parent Id should be enough. Why do you need another Boolean?
The isReply is for opening or closing the commentForm when you click on reply to a comment. To indicate that you reply on a comment and not writting a new one, a commentForm should appear directly under the comment you want to reply to. Any other suggestions?
The isReply was also for adding, or not adding, the parentCommentId. But I solved this through the replyComment.
@Mastercuber still a work in progress? Do you need any assistence?
Some tests are always great :wink:
Although I have to admit, that I'm still struggling with testing and nuxtjs+vuejs
@roschaefer In the reply-comments.test.js
there is a userId
needed, so I can't remove the userId in the reply-comments, but in comments.test.js it worked.
Changes are pushed!
the $this was just a try an will be removed!
@roschaefer with tests you mean ava component tests? I thought, I will wait for a stable component testing toolchain till writting the tests.
@Mastercuber I believe we're responsible to write the testing toolchain ourselves, right now it's only you, me and maybe @mattwr18 who are able to set it up. If you would make a first stab at it, that would be great!
I am definitely keen to write more tests!! I wrote a simple test for that small PR I put in, and interested in suggestions on writing more/helping write unit tests for other components. Just let me know. @roschaefer @Mastercuber @appinteractive
@mattwr18 Ok so I will use the same deps and so on as in your PR. I think we need component test for all components. So feel free start writting some tests =)
hey @Mastercuber feel free to reuse what I have, and I can write more such tests for components; although, they it's just a simple should render test. I have run into some snags due to using the ~
in the component, which seems to not be supported by Ava. Also, I was trying to write a render test for LanguageSelect and got held up here: https://github.com/Human-Connection/WebApp/blob/develop/components/layout/LanguageSelect.vue#L71, saying that import and export may only appear at top-level. So, I think there is some tweaking of the code that needs to be done as well.
status
Not yet done.
I needed to add the sockets-client to be able to start the WebApp. It is used in the WebApp Repo -> plugins dir -> api.js. Maybe the dependency got lost somehow.. Please do not ask how ^^