Skip to content

Commit

Permalink
Call clearPendingReportsAction when no judge is selected in setPendin…
Browse files Browse the repository at this point in the history
…gReportSelectedJudgeSequence and rephrase two tests for consistency
  • Loading branch information
akuny committed Aug 20, 2024
1 parent f58728d commit 4bd6e7b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('pendingReportListHelper', () => {
applicationContext,
);

it('should display load more button if more results are to be loaded', () => {
it('should set showLoadMore to true when there are additional results to load', () => {
const mockState = {
pendingReports: {
hasPendingItemsResults: true,
Expand All @@ -26,7 +26,7 @@ describe('pendingReportListHelper', () => {
expect(showLoadMore).toBe(true);
});

it('should hide the load more button if more results are to be loaded', () => {
it('should set showLoadMore to false when there are no additional results to load', () => {
const mockState = {
pendingReports: {
hasPendingItemsResults: true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { clearPendingReportsAction } from '@web-client/presenter/actions/PendingItems/clearPendingReportsAction';
import { fetchPendingItemsAction } from '../../actions/PendingItems/fetchPendingItemsAction';
import { isJudgeSelectedAction } from '../../actions/PendingItems/isJudgeSelectedAction';
import { setPendingItemsAction } from '../../actions/PendingItems/setPendingItemsAction';
Expand All @@ -8,7 +9,7 @@ export const setPendingReportSelectedJudgeSequence = [
setPendingReportSelectedJudgeAction,
isJudgeSelectedAction,
{
no: [],
no: [clearPendingReportsAction],
yes: [
showProgressSequenceDecorator([
fetchPendingItemsAction,
Expand Down

0 comments on commit 4bd6e7b

Please sign in to comment.