WebApp icon indicating copy to clipboard operation
WebApp copied to clipboard

Add reply-comments.test, extend comments.model, extend comments.hooks

Open Mastercuber opened this issue 6 years ago • 14 comments

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?

Mastercuber avatar Aug 10 '18 18:08 Mastercuber

Just adding the parent Id should be enough. Why do you need another Boolean?

appinteractive avatar Aug 10 '18 19:08 appinteractive

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 avatar Aug 11 '18 09:08 Mastercuber

@Mastercuber still a work in progress? Do you need any assistence?

appinteractive avatar Aug 15 '18 10:08 appinteractive

Some tests are always great :wink:

Although I have to admit, that I'm still struggling with testing and nuxtjs+vuejs

roschaefer avatar Aug 21 '18 10:08 roschaefer

@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!

Mastercuber avatar Aug 21 '18 13:08 Mastercuber

the $this was just a try an will be removed!

Mastercuber avatar Aug 31 '18 14:08 Mastercuber

@roschaefer with tests you mean ava component tests? I thought, I will wait for a stable component testing toolchain till writting the tests.

Mastercuber avatar Sep 05 '18 16:09 Mastercuber

@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!

roschaefer avatar Sep 05 '18 16:09 roschaefer

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 avatar Sep 05 '18 21:09 mattwr18

@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 =)

Mastercuber avatar Sep 06 '18 12:09 Mastercuber

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.

mattwr18 avatar Sep 06 '18 13:09 mattwr18

status

Lulalaby avatar Oct 04 '18 22:10 Lulalaby

Not yet done.

Mastercuber avatar Oct 10 '18 20:10 Mastercuber

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 ^^

Mastercuber avatar Oct 29 '18 23:10 Mastercuber