@@ -19,7 +19,7 @@ const pastEventMock = {
1919 attributes : {
2020 ...strapiEventMock . attributes ,
2121 title : 'Past Event' ,
22- start : '2024-12-01T10:00:00.000Z ' ,
22+ startDate : '2024-12-01 ' ,
2323 eventTypes : [ { id : 1 , eventType : EventType . MEET_UP } ] ,
2424 languages : [ { id : 1 , language : 'English' , countryCode : 'GB' } ] ,
2525 } ,
@@ -30,7 +30,7 @@ const upcomingEventMock = {
3030 attributes : {
3131 ...strapiEventMock . attributes ,
3232 title : 'Upcoming Event' ,
33- start : '2025-02-01T10:00:00.000Z ' ,
33+ startDate : '2025-02-01 ' ,
3434 eventTypes : [ { id : 1 , eventType : EventType . CONFERENCE } ] ,
3535 languages : [ { id : 1 , language : 'German' , countryCode : 'DE' } ] ,
3636 } ,
@@ -68,7 +68,7 @@ describe('The Events slice', () => {
6868 const key = getKey ( 0 , null ) ;
6969 getKeyCalls . push ( key . toString ( ) ) ;
7070
71- if ( getKey . toString ( ) . includes ( 'filters[start ][$gte]' ) ) {
71+ if ( getKey . toString ( ) . includes ( 'filters[startDate ][$gte]' ) ) {
7272 return {
7373 data : [ { body : { data : [ upcomingEventMock ] } } ] ,
7474 isLoading : false ,
@@ -77,7 +77,7 @@ describe('The Events slice', () => {
7777 loadMore : jest . fn ( ) ,
7878 } ;
7979 }
80- if ( getKey . toString ( ) . includes ( 'filters[start ][$lt]' ) ) {
80+ if ( getKey . toString ( ) . includes ( 'filters[startDate ][$lt]' ) ) {
8181 return {
8282 data : [ { body : { data : [ pastEventMock ] } } ] ,
8383 isLoading : false ,
@@ -149,7 +149,7 @@ describe('The Events slice', () => {
149149 // Use past events for the testing, because the batch for past events is defined as 2 and
150150 // the "Load button" will be shown when there are more then 2 past events
151151 ( useEvents as jest . Mock ) . mockImplementation ( ( { getKey } ) => {
152- if ( getKey . toString ( ) . includes ( 'filters[start ][$lt]' ) ) {
152+ if ( getKey . toString ( ) . includes ( 'filters[startDate ][$lt]' ) ) {
153153 return {
154154 data : [
155155 {
@@ -243,7 +243,7 @@ describe('The Events slice', () => {
243243 await waitFor ( ( ) => {
244244 expect ( getKeyCalls . map ( decodeURIComponent ) ) . toEqual (
245245 expect . arrayContaining ( [
246- expect . stringContaining ( 'filters[start ][$gte]' ) ,
246+ expect . stringContaining ( 'filters[startDate ][$gte]' ) ,
247247 expect . stringContaining (
248248 'filters[$or][0][eventTypes][eventType]=Conference'
249249 ) ,
@@ -278,7 +278,7 @@ describe('The Events slice', () => {
278278 await waitFor ( ( ) => {
279279 expect ( getKeyCalls . map ( decodeURIComponent ) ) . toEqual (
280280 expect . arrayContaining ( [
281- expect . stringContaining ( 'filters[start ][$gte]' ) ,
281+ expect . stringContaining ( 'filters[startDate ][$gte]' ) ,
282282 expect . stringContaining (
283283 'filters[$or][0][languages][language]=German'
284284 ) ,
@@ -303,7 +303,7 @@ describe('The Events slice', () => {
303303 expect ( getKeyCalls . map ( decodeURIComponent ) ) . toEqual (
304304 expect . arrayContaining ( [
305305 expect . stringContaining (
306- `filters[start ][$gte]=${ NOW . toISOString ( ) } `
306+ `filters[startDate ][$gte]=${ NOW . toISOString ( ) } `
307307 ) ,
308308 ] )
309309 ) ;
@@ -341,7 +341,9 @@ describe('The Events slice', () => {
341341 await waitFor ( ( ) => {
342342 expect ( getKeyCalls . map ( decodeURIComponent ) ) . toEqual (
343343 expect . arrayContaining ( [
344- expect . stringContaining ( `filters[start][$lt]=${ NOW . toISOString ( ) } ` ) ,
344+ expect . stringContaining (
345+ `filters[startDate][$lt]=${ NOW . toISOString ( ) } `
346+ ) ,
345347 ] )
346348 ) ;
347349 } ) ;
0 commit comments