From 8d74b49cd41e783d181e360aa92171e41f50109c Mon Sep 17 00:00:00 2001 From: Myroslav Sviderok Date: Thu, 2 Jan 2025 17:40:31 +0200 Subject: [PATCH] fix: new 2025 year causing one of the PointsHistoryBottomSheet tests to fail (#6392) ### Description As per the title. This change tweaks the test to not expect an exact string but to just check for a partial match. Context: [thread](https://valora-app.slack.com/archives/C029Z1QMD7B/p1735811485840799) GH run with an error: [run](https://github.com/valora-inc/wallet/actions/runs/12580445142/job/35062355717?pr=6247) ### Test plan Tests pass ### Related issues N/A ### Backwards compatibility Yes ### Network scalability If a new NetworkId and/or Network are added in the future, the changes in this PR will: - [x] Continue to work without code changes, OR trigger a compilation error (guaranteeing we find it when a new network is added) --- src/points/PointsHistoryBottomSheet.test.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/points/PointsHistoryBottomSheet.test.tsx b/src/points/PointsHistoryBottomSheet.test.tsx index d4759832e60..54aaf98277e 100644 --- a/src/points/PointsHistoryBottomSheet.test.tsx +++ b/src/points/PointsHistoryBottomSheet.test.tsx @@ -2,8 +2,8 @@ import { fireEvent, render, waitFor } from '@testing-library/react-native' import { FetchMock } from 'jest-fetch-mock/types' import * as React from 'react' import { Provider } from 'react-redux' -import { PointsEvents } from 'src/analytics/Events' import AppAnalytics from 'src/analytics/AppAnalytics' +import { PointsEvents } from 'src/analytics/Events' import PointsHistoryBottomSheet from 'src/points/PointsHistoryBottomSheet' import { getHistoryStarted } from 'src/points/slice' import { GetHistoryResponse } from 'src/points/types' @@ -127,7 +127,7 @@ describe(PointsHistoryBottomSheet, () => { ).toBeTruthy() expect(tree.getByText('points.history.cards.createWallet.subtitle')).toBeTruthy() - expect(tree.getByText('March')).toBeTruthy() + expect(tree.getByText('March', { exact: false })).toBeTruthy() expect(tree.getByText('December 2023')).toBeTruthy() expect(tree.getByTestId('PointsHistoryBottomSheet/Loading')).toBeTruthy() })