Skip to content

Commit 52a4e5c

Browse files
authored
fix: cohort name difference in filter and post view (#844)
1 parent 29da3f5 commit 52a4e5c

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

src/components/FilterBar.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ const FilterBar = ({
175175
<ActionItem
176176
key={toString(cohort.id)}
177177
id={toString(cohort.id)}
178-
label={capitalize(cohort.name)}
178+
label={cohort.name}
179179
value={toString(cohort.id)}
180180
selected={selectedFilters.cohort}
181181
/>

src/discussions/posts/PostsView.test.jsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import React from 'react';
2-
31
import { fireEvent, render, screen } from '@testing-library/react';
42
import MockAdapter from 'axios-mock-adapter';
53
import { act } from 'react-dom/test-utils';
@@ -232,7 +230,7 @@ describe('PostsView', () => {
232230

233231
test('test that the cohorts filter works', async () => {
234232
await act(async () => {
235-
fireEvent.click(screen.getByLabelText('Cohort 1'));
233+
fireEvent.click(screen.getByLabelText('cohort 1'));
236234
});
237235

238236
dropDownButton = screen.getByRole('button', {
@@ -280,7 +278,7 @@ describe('PostsView', () => {
280278
queryParam: { group_id: undefined },
281279
},
282280
{
283-
label: 'Cohort 1',
281+
label: 'cohort 1',
284282
queryParam: { group_id: 'cohort-1' },
285283
},
286284
])(

src/discussions/posts/post-filter-bar/PostFilterBar.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ const PostFilterBar = () => {
165165
<ActionItem
166166
key={cohort.id}
167167
id={toString(cohort.id)}
168-
label={capitalize(cohort.name)}
168+
label={cohort.name}
169169
value={toString(cohort.id)}
170170
selected={currentFilters.cohort}
171171
/>

0 commit comments

Comments
 (0)