fix: cohort name difference in filter and post view (#841)

* fix: cohort name difference in filter and post view

* test: fix cohort test cases

---------

Co-authored-by: Awais  Ansari <awais.ansari@A006-01824.local>
This commit is contained in:
Awais Ansari
2025-12-16 20:07:40 +05:00
committed by GitHub
parent 4917da3245
commit 911b8b3fc5
3 changed files with 4 additions and 6 deletions

View File

@@ -175,7 +175,7 @@ const FilterBar = ({
<ActionItem
key={toString(cohort.id)}
id={toString(cohort.id)}
label={capitalize(cohort.name)}
label={cohort.name}
value={toString(cohort.id)}
selected={selectedFilters.cohort}
/>

View File

@@ -1,5 +1,3 @@
import React from 'react';
import { fireEvent, render, screen } from '@testing-library/react';
import MockAdapter from 'axios-mock-adapter';
import { act } from 'react-dom/test-utils';
@@ -232,7 +230,7 @@ describe('PostsView', () => {
test('test that the cohorts filter works', async () => {
await act(async () => {
fireEvent.click(screen.getByLabelText('Cohort 1'));
fireEvent.click(screen.getByLabelText('cohort 1'));
});
dropDownButton = screen.getByRole('button', {
@@ -280,7 +278,7 @@ describe('PostsView', () => {
queryParam: { group_id: undefined },
},
{
label: 'Cohort 1',
label: 'cohort 1',
queryParam: { group_id: 'cohort-1' },
},
])(

View File

@@ -165,7 +165,7 @@ const PostFilterBar = () => {
<ActionItem
key={cohort.id}
id={toString(cohort.id)}
label={capitalize(cohort.name)}
label={cohort.name}
value={toString(cohort.id)}
selected={currentFilters.cohort}
/>