mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2026-01-07 13:07:22 +00:00
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:
parent
0c6ded3ae3
commit
fe1bc83635
@ -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 ({
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user