diff --git a/frontend/app/components/comment/comment-votes.spec.tsx b/frontend/app/components/comment/comment-votes.spec.tsx
index 2f02109f..807a7a3e 100644
--- a/frontend/app/components/comment/comment-votes.spec.tsx
+++ b/frontend/app/components/comment/comment-votes.spec.tsx
@@ -99,8 +99,10 @@ describe('', () => {
it('should allow only upvote ability', () => {
StaticStore.config.positive_score = true;
render();
- expect(screen.queryByTitle('Vote down')).not.toBeInTheDocument();
+ expect(screen.queryByTitle('Vote down')).toBeVisible();
+ expect(screen.queryByTitle('Vote down')).toBeDisabled();
expect(screen.getByTitle('Vote up')).toBeVisible();
+ expect(screen.getByTitle('Vote up')).not.toBeDisabled();
});
it('should disable downvote ability when `low_score` is reached', async () => {
@@ -111,6 +113,7 @@ describe('', () => {
fireEvent(screen.getByTitle('Vote down'), new Event('click'));
await waitFor(() => {
expect(screen.getByTitle('Vote down')).toBeDisabled();
+ expect(screen.getByTitle('Vote up')).toBeDisabled();
});
});
});
diff --git a/frontend/app/components/comment/comment-votes.tsx b/frontend/app/components/comment/comment-votes.tsx
index 771b3142..890207d9 100644
--- a/frontend/app/components/comment/comment-votes.tsx
+++ b/frontend/app/components/comment/comment-votes.tsx
@@ -48,16 +48,17 @@ export function CommentVotes({ id, votes, vote, disabled, controversy = 0 }: Pro
const positiveScore = StaticStore.config.positive_score;
const isUpvoted = vote === 1;
const isDownvoted = vote === -1;
+ const value = loadingState?.votes ?? votes;
return (
- {Boolean(!disabled && !positiveScore) && (
+ {Boolean(!disabled) && (
@@ -80,7 +81,7 @@ export function CommentVotes({ id, votes, vote, disabled, controversy = 0 }: Pro
[styles.votesPositive]: votes > 0,
})}
>
- {loadingState?.votes ?? votes}
+ {value}
{!disabled && (