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

#161282285 Track if User has liked/disliked current comment #67

Merged
merged 3 commits into from
Oct 19, 2018

Conversation

CEOehis
Copy link
Contributor

@CEOehis CEOehis commented Oct 17, 2018

What does this PR do?

Enable tracking user like/dislike state for each comment

Description of Task to be completed?

  • Fix comment like/dislike creation handler

What are the relevant pivotal tracker stories?

#161282285

@coveralls
Copy link

coveralls commented Oct 17, 2018

Pull Request Test Coverage Report for Build 589

  • 6 of 6 (100.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.01%) to 92.046%

Totals Coverage Status
Change from base Build 583: 0.01%
Covered Lines: 2514
Relevant Lines: 2672

💛 - Coveralls

Copy link
Contributor

@emmaadesile emmaadesile left a comment

Choose a reason for hiding this comment

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

LGTM

@CEOehis CEOehis force-pushed the bg-track-comment-likes-161282285 branch from 9879f60 to cba5f06 Compare October 18, 2018 09:37
Copy link
Contributor

@emekafredy emekafredy left a comment

Choose a reason for hiding this comment

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

LGTM

@CEOehis CEOehis force-pushed the bg-track-comment-likes-161282285 branch from cba5f06 to 91f6425 Compare October 19, 2018 08:34
Copy link
Contributor

@waleCloud waleCloud left a comment

Choose a reason for hiding this comment

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

How come you're reducing coverage 🤔
Please cover the uncovered lines.

*/
const hasReaction = (reactions, userId) => reactions.some(
reaction => reaction.userId === userId
);

Choose a reason for hiding this comment

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

Unexpected newline before ')' function-paren-newline

*
* @returns {bool} retrurns true/false
*/
const hasReaction = (reactions, userId) => reactions.some(

Choose a reason for hiding this comment

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

Unexpected newline after '(' function-paren-newline

@@ -0,0 +1,47 @@
import { expect } from 'chai';
import hasReaction from '../../utils/hasReaction';

Choose a reason for hiding this comment

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

Missing file extension for "../../utils/hasReaction" import/extensions

@@ -0,0 +1,47 @@
import { expect } from 'chai';

Choose a reason for hiding this comment

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

Missing file extension for "chai" import/extensions

@@ -3,6 +3,7 @@ import {
Article, Comment, User, Reply, CommentLikesDislike, CommentHistory
} from '../models';
import isEmpty from '../utils/is_empty';
import hasReaction from '../utils/hasReaction';

Choose a reason for hiding this comment

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

Missing file extension for "../utils/hasReaction" import/extensions

@CEOehis
Copy link
Contributor Author

CEOehis commented Oct 19, 2018

@waleCloud I have covered the uncovered lines. Thanks.

@waleCloud waleCloud merged commit ea8e34f into develop Oct 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants