diff --git a/src/earn/EarnPoolInfoScreen.test.tsx b/src/earn/EarnPoolInfoScreen.test.tsx index ab74f5c781c..b36cb820f4f 100644 --- a/src/earn/EarnPoolInfoScreen.test.tsx +++ b/src/earn/EarnPoolInfoScreen.test.tsx @@ -9,7 +9,7 @@ import { Screens } from 'src/navigator/Screens' import { EarnPosition } from 'src/positions/types' import { navigateToURI } from 'src/utils/linking' import MockedNavigator from 'test/MockedNavigator' -import { createMockStore, getMockStackScreenProps } from 'test/utils' +import { createMockStore } from 'test/utils' import { mockArbUsdcTokenId, mockEarnPositions, mockTokenBalances } from 'test/values' const mockPoolTokenId = mockEarnPositions[0].dataProps.depositTokenId @@ -23,17 +23,16 @@ const store = createMockStore({ const renderEarnPoolInfoScreen = (pool: EarnPosition) => render( - ( - - )} - /> + ) describe('EarnPoolInfoScreen', () => { beforeEach(() => { jest.clearAllMocks() + jest.useFakeTimers({ + now: new Date('2024-08-15T00:00:00.000Z'), + }) }) it('renders correctly when not deposited in pool', () => { @@ -255,17 +254,7 @@ describe('EarnPoolInfoScreen', () => { it('navigate to EarnEnterAmount when Deposit button is tapped', () => { const { getByText } = render( - { - return ( - - ) - }} - /> + ) fireEvent.press(getByText('earnFlow.poolInfoScreen.deposit')) @@ -284,14 +273,9 @@ describe('EarnPoolInfoScreen', () => { const { getByText } = render( { - return ( - - ) + component={EarnPoolInfoScreen} + params={{ + pool: { ...mockEarnPositions[0], balance: '100' }, }} />