From 9c3684984e4b3f0ac674d76d5d96e35ddd2331a1 Mon Sep 17 00:00:00 2001 From: Ivan Melnik Date: Wed, 22 May 2024 11:45:37 +0300 Subject: [PATCH] fix: upcoming event types (#697) --- .../upcomingEvents/__tests__/upcomingEventsSection.test.tsx | 3 ++- packages/components/src/components/domain/event/queryUtils.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/sports-helsinki/src/domain/venue/upcomingEvents/__tests__/upcomingEventsSection.test.tsx b/apps/sports-helsinki/src/domain/venue/upcomingEvents/__tests__/upcomingEventsSection.test.tsx index 4ace1f7f1..07d8f305e 100644 --- a/apps/sports-helsinki/src/domain/venue/upcomingEvents/__tests__/upcomingEventsSection.test.tsx +++ b/apps/sports-helsinki/src/domain/venue/upcomingEvents/__tests__/upcomingEventsSection.test.tsx @@ -1,4 +1,5 @@ import { EVENT_SORT_OPTIONS } from '@events-helsinki/components/constants'; +import { EventTypeId } from '@events-helsinki/components/types'; import * as React from 'react'; import { render, screen, waitFor } from '@/test-utils'; import { translations } from '@/test-utils/initI18n'; @@ -29,7 +30,7 @@ const similarEventQueryVariables = { keywordNot: undefined, publisher: undefined, keywordOrSet2: undefined, - eventType: undefined, + eventType: [EventTypeId.Course, EventTypeId.General], }; const mocks = [ diff --git a/packages/components/src/components/domain/event/queryUtils.ts b/packages/components/src/components/domain/event/queryUtils.ts index 25a369479..042458c85 100644 --- a/packages/components/src/components/domain/event/queryUtils.ts +++ b/packages/components/src/components/domain/event/queryUtils.ts @@ -7,7 +7,7 @@ import { SIMILAR_EVENTS_AMOUNT, } from '../../../constants/event-constants'; import type { EventFields } from '../../../types/event-types'; -import type { +import { EventListQuery, EventListQueryVariables, EventTypeId, @@ -222,6 +222,7 @@ export const useLocationUpcomingEventsQuery = ({ publisherAncestor: null, // superEventType: 'none', // Removed to experiment LIIKUNTA-512 (https://helsinkisolutionoffice.atlassian.net/browse/LIIKUNTA-512). pageSize, + eventType: [EventTypeId.Course, EventTypeId.General], }; return useEventListQuery({ variables, ssr: false }); };