fix: minor issue after MEF rollout (#358)

* fix: update most votes filter name to most likes

* fix: add sorted word infilters description

* test: fixed post filter test case after sorted word addition
This commit is contained in:
Awais Ansari
2022-11-24 16:06:08 +05:00
committed by GitHub
parent 459511281d
commit ab18806fa6
4 changed files with 6 additions and 6 deletions

View File

@@ -101,7 +101,7 @@ function FilterBar({
<span className="text-primary-700 pr-4">
{intl.formatMessage(messages.sortFilterStatus, {
own: false,
type: selectedFilters.type,
type: selectedFilters.postType,
sort: selectedFilters.orderBy,
status: selectedFilters.status,
cohortType: selectedCohort?.name ? 'group' : 'all',

View File

@@ -45,7 +45,7 @@ const messages = defineMessages({
},
sortFilterStatus: {
id: 'discussions.learner.sortFilterStatus',
defaultMessage: `All learners by {sort, select,
defaultMessage: `All learners sorted by {sort, select,
flagged {reported activity}
activity {most activity}
other {{sort}}

View File

@@ -199,7 +199,7 @@ describe('PostsView', () => {
await renderComponent();
});
dropDownButton = screen.getByRole('button', {
name: /all posts by recent activity/i,
name: /all posts sorted by recent activity/i,
});
await act(async () => {
fireEvent.click(dropDownButton);
@@ -220,7 +220,7 @@ describe('PostsView', () => {
});
dropDownButton = screen.getByRole('button', {
name: /All posts in Cohort 1 by recent activity/i,
name: /All posts in Cohort 1 sorted by recent activity/i,
});
expect(dropDownButton).toBeInTheDocument();

View File

@@ -109,10 +109,10 @@ const messages = defineMessages({
all {}
group {in {cohort}}
other {{cohortType}}
} by {sort, select,
} sorted by {sort, select,
lastActivityAt {recent activity}
commentCount {most activity}
voteCount {most votes}
voteCount {most likes}
other {{sort}}
}`,
description: 'Status message showing current sorting and filtering status',