Fix(ui): Reply count being shown as 0 in task feed card (#21952)

* fix reply count being shown as 0 in feed card

* updated condition

* address pr comment
This commit is contained in:
Shrushti Polekar 2025-06-25 23:08:57 +05:30 committed by GitHub
parent 0c6ded3ae3
commit fe1bc83635
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 2 deletions

View File

@ -415,6 +415,9 @@ test.describe('Activity feed', () => {
expect(descriptionTask).toContain('Request to update description');
// check initial replies count
await expect(page.getByTestId('replies-count')).not.toBeVisible();
for (let i = 0; i < 10; i++) {
const commentInput = page.locator('[data-testid="comments-input-field"]');
commentInput.click();
@ -441,6 +444,9 @@ test.describe('Activity feed', () => {
page.locator('.right-container [data-testid="feed-replies"]')
).toContainText(`Reply message ${i}`);
}
// check replies count in feed card
await expect(page.getByTestId('replies-count')).toHaveText('10 Replies');
});
test('Open and Closed Task Tab with approve from Task Feed Card', async ({

View File

@ -335,7 +335,7 @@ const TaskFeedCard = ({
width={20}
onClick={isForFeedTab ? showReplies : undefined}
/>
{feed?.postsCount && feed?.postsCount > 0 && (
{feed?.postsCount && feed?.postsCount > 0 ? (
<Button
className="posts-length m-r-xss p-0 remove-button-default-styling"
data-testid="replies-count"
@ -348,7 +348,7 @@ const TaskFeedCard = ({
{ number: feed.postsCount }
)}
</Button>
)}
) : null}
</Col>
<Col