11import React from 'react' ;
2- import ContributeList from '../../components/Contribute' ;
32import { render , fireEvent } from '@testing-library/react' ;
43import '@testing-library/jest-dom' ;
54import { BrowserRouter as Router } from 'react-router-dom' ;
65import { Provider } from "react-redux" ;
76import configureMockStore from 'redux-mock-store'
87import thunk from 'redux-thunk'
9- import { MAINTENANCE_MESSAGE } from '../../util/constants' ;
108
11- jest . mock ( '@material-ui/core/Popper' , ( ) => {
12- return ( { children } ) => children ;
13- } ) ;
9+ import ContributeList from '../../components/Contribute' ;
10+ import { MAINTENANCE_MESSAGE } from '../../util/constants' ;
1411
15- jest . mock ( '@material-ui/core/Portal' , ( ) => {
16- return ( { children } ) => children ;
17- } ) ;
12+ jest . mock ( '@material-ui/core/Popper' , ( ) => ( { children } ) => children ) ;
13+ jest . mock ( '@material-ui/core/Portal' , ( ) => ( { children } ) => children ) ;
1814
1915afterEach ( ( ) => {
20- jest . resetAllMocks ( ) ;
16+ jest . resetAllMocks ( ) ;
2117} ) ;
2218
2319const createMockStore = ( featureFlags , baseState ) => {
@@ -91,20 +87,20 @@ describe('SubmitListUploadingButton component without DISABLE_LIST_UPLOADING', (
9187 "ITEM_REMOVED" : 1
9288 } ,
9389 "contributor_id" : 2371 ,
94- "created_at" : "2023-02-24T11 :12:05.895943Z " ,
90+ "created_at" : "2024-01-13T10 :12:05.895143Z " ,
9591 "match_responsibility" : "moderator" ,
96- "status" : "REJECTED " ,
92+ "status" : "AUTOMATIC " ,
9793 "status_change_reason" : "test" ,
9894 "file" : "/Template_Excel_KdIAiX9.xlsx" ,
9995 "parsing_errors" : [ ]
10096 } , ] ,
10197 fetchingFacilityLists : false , } ,
102- embeddedMap : { isEmbeded :false } ,
103- fetching :false ,
104- error : null ,
105- fetchingFacilityLists :false ,
106- } ;
107- const preloadedState = {
98+ embeddedMap : { isEmbeded :true } ,
99+ fetching :false ,
100+ error : null ,
101+ fetchingFacilityLists :false ,
102+ } ;
103+ const newPreloadedState = {
108104 userHasSignedIn : true ,
109105 fetchingSessionSignIn : false ,
110106 } ;
@@ -114,7 +110,7 @@ describe('SubmitListUploadingButton component without DISABLE_LIST_UPLOADING', (
114110 render (
115111 < Provider store = { store } >
116112 < Router >
117- < ContributeList { ...preloadedState } { ...props } />
113+ < ContributeList { ...newPreloadedState } { ...props } />
118114 </ Router > ,
119115 </ Provider >
120116 ) ;
0 commit comments