diff --git a/src/features/artist/components/ArtistBody/ArtistBody.native.test.tsx b/src/features/artist/components/ArtistBody/ArtistBody.native.test.tsx index 9f1d3840c83..5292ab3665b 100644 --- a/src/features/artist/components/ArtistBody/ArtistBody.native.test.tsx +++ b/src/features/artist/components/ArtistBody/ArtistBody.native.test.tsx @@ -47,8 +47,6 @@ const mockArtist = { bio: 'chanteuse', } -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') - describe('', () => { beforeEach(() => { setFeatureFlags() diff --git a/src/features/artist/components/ArtistPlaylist/ArtistPlaylist.native.test.tsx b/src/features/artist/components/ArtistPlaylist/ArtistPlaylist.native.test.tsx index 09502688cd6..fae49cde3f7 100644 --- a/src/features/artist/components/ArtistPlaylist/ArtistPlaylist.native.test.tsx +++ b/src/features/artist/components/ArtistPlaylist/ArtistPlaylist.native.test.tsx @@ -23,7 +23,7 @@ jest.mock('@shopify/flash-list', () => { FlashList: MockFlashList, } }) -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + describe('ArtistPlaylist', () => { beforeEach(() => { diff --git a/src/features/artist/components/ArtistTopOffers/ArtistTopOffers.native.test.tsx b/src/features/artist/components/ArtistTopOffers/ArtistTopOffers.native.test.tsx index 35d7d2d93a4..3de0d7681bf 100644 --- a/src/features/artist/components/ArtistTopOffers/ArtistTopOffers.native.test.tsx +++ b/src/features/artist/components/ArtistTopOffers/ArtistTopOffers.native.test.tsx @@ -8,7 +8,7 @@ import { reactQueryProviderHOC } from 'tests/reactQueryProviderHOC' import { render, screen } from 'tests/utils' jest.mock('libs/firebase/analytics/analytics') -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + describe('ArtistTopOffers', () => { beforeEach(() => { diff --git a/src/features/birthdayNotifications/pages/EighteenBirthday.native.test.tsx b/src/features/birthdayNotifications/pages/EighteenBirthday.native.test.tsx index 110bf652221..1a89edcf703 100644 --- a/src/features/birthdayNotifications/pages/EighteenBirthday.native.test.tsx +++ b/src/features/birthdayNotifications/pages/EighteenBirthday.native.test.tsx @@ -21,7 +21,6 @@ jest.mock('react-native/Libraries/Animated/createAnimatedComponent', () => { return Component } }) -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') describe('', () => { beforeEach(() => { diff --git a/src/features/birthdayNotifications/pages/EighteenBirthday.web.test.tsx b/src/features/birthdayNotifications/pages/EighteenBirthday.web.test.tsx index 9742c785ce6..609f85df10c 100644 --- a/src/features/birthdayNotifications/pages/EighteenBirthday.web.test.tsx +++ b/src/features/birthdayNotifications/pages/EighteenBirthday.web.test.tsx @@ -7,7 +7,7 @@ import { checkAccessibilityFor, render } from 'tests/utils/web' import { EighteenBirthday } from './EighteenBirthday' -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + jest.mock('shared/user/useDepositAmountsByAge') const mockUseDepositAmountsByAge = useDepositAmountsByAge as jest.Mock diff --git a/src/features/birthdayNotifications/pages/RecreditBirthdayNotification.native.test.tsx b/src/features/birthdayNotifications/pages/RecreditBirthdayNotification.native.test.tsx index e109f3c69d2..704d7c1372a 100644 --- a/src/features/birthdayNotifications/pages/RecreditBirthdayNotification.native.test.tsx +++ b/src/features/birthdayNotifications/pages/RecreditBirthdayNotification.native.test.tsx @@ -30,7 +30,7 @@ mockAuthContextWithUser({ }, }) -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + describe('', () => { beforeAll(() => { diff --git a/src/features/birthdayNotifications/pages/RecreditBirthdayNotification.web.test.tsx b/src/features/birthdayNotifications/pages/RecreditBirthdayNotification.web.test.tsx index ccd67cabb05..3f1422382bc 100644 --- a/src/features/birthdayNotifications/pages/RecreditBirthdayNotification.web.test.tsx +++ b/src/features/birthdayNotifications/pages/RecreditBirthdayNotification.web.test.tsx @@ -7,7 +7,7 @@ import { checkAccessibilityFor, render, screen } from 'tests/utils/web' import { RecreditBirthdayNotification } from './RecreditBirthdayNotification' -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + jest.mock('libs/firebase/analytics/analytics') jest.mock('libs/firebase/remoteConfig/remoteConfig.services') diff --git a/src/features/bookOffer/components/BookDuoChoice.native.test.tsx b/src/features/bookOffer/components/BookDuoChoice.native.test.tsx index ff6b4ff6ce8..ae54c06dcf1 100644 --- a/src/features/bookOffer/components/BookDuoChoice.native.test.tsx +++ b/src/features/bookOffer/components/BookDuoChoice.native.test.tsx @@ -40,7 +40,7 @@ let mockCreditOffer = 50000 jest.mock('features/offer/helpers/useHasEnoughCredit/useHasEnoughCredit', () => ({ useCreditForOffer: jest.fn(() => mockCreditOffer), })) -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + describe('BookDuoChoice', () => { beforeEach(() => { diff --git a/src/features/bookOffer/components/BookHourChoice.native.test.tsx b/src/features/bookOffer/components/BookHourChoice.native.test.tsx index be3ffb1bdf1..69b21dd5062 100644 --- a/src/features/bookOffer/components/BookHourChoice.native.test.tsx +++ b/src/features/bookOffer/components/BookHourChoice.native.test.tsx @@ -47,7 +47,7 @@ jest.mock('features/offer/helpers/useHasEnoughCredit/useHasEnoughCredit', () => useCreditForOffer: jest.fn(() => mockCreditOffer), })) -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + describe('BookHourChoice when hour is already selected', () => { beforeEach(() => { diff --git a/src/features/bookOffer/components/BookPricesChoice.native.test.tsx b/src/features/bookOffer/components/BookPricesChoice.native.test.tsx index b2408ebf96a..61ffe896b51 100644 --- a/src/features/bookOffer/components/BookPricesChoice.native.test.tsx +++ b/src/features/bookOffer/components/BookPricesChoice.native.test.tsx @@ -26,7 +26,7 @@ jest.mock('features/offer/helpers/useHasEnoughCredit/useHasEnoughCredit', () => useCreditForOffer: jest.fn(() => mockCreditOffer), })) -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + describe('BookPricesChoice', () => { beforeEach(() => { diff --git a/src/features/bookOffer/components/BookingDetails.native.test.tsx b/src/features/bookOffer/components/BookingDetails.native.test.tsx index 022514f6ac2..ddba2319504 100644 --- a/src/features/bookOffer/components/BookingDetails.native.test.tsx +++ b/src/features/bookOffer/components/BookingDetails.native.test.tsx @@ -147,7 +147,7 @@ jest.mock('react-native/Libraries/Animated/createAnimatedComponent', () => { } }) -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + describe('', () => { beforeAll(() => { diff --git a/src/features/bookOffer/components/BookingInformations.native.test.tsx b/src/features/bookOffer/components/BookingInformations.native.test.tsx index 1b6be5ba9aa..0766161c520 100644 --- a/src/features/bookOffer/components/BookingInformations.native.test.tsx +++ b/src/features/bookOffer/components/BookingInformations.native.test.tsx @@ -42,7 +42,7 @@ jest.mock('features/bookOffer/helpers/useBookingOffer', () => ({ // This line checks that there is no text content rendered. The regex /./ matches any character, so queryByText will return null if there is no content. const ANY_CHARACTER = /./ -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + describe('', () => { beforeEach(() => { diff --git a/src/features/bookOffer/components/PriceLine.native.test.tsx b/src/features/bookOffer/components/PriceLine.native.test.tsx index c4b88ef77c5..341f5f664f4 100644 --- a/src/features/bookOffer/components/PriceLine.native.test.tsx +++ b/src/features/bookOffer/components/PriceLine.native.test.tsx @@ -6,7 +6,7 @@ import { render, screen } from 'tests/utils' const attributes = ['VOSTFR', '3D', 'IMAX'] -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + describe('', () => { beforeEach(() => { diff --git a/src/features/bookOffer/pages/BookingConfirmation.native.test.tsx b/src/features/bookOffer/pages/BookingConfirmation.native.test.tsx index 6b5ae0437e3..23407922396 100644 --- a/src/features/bookOffer/pages/BookingConfirmation.native.test.tsx +++ b/src/features/bookOffer/pages/BookingConfirmation.native.test.tsx @@ -47,7 +47,7 @@ jest.mock('react-native/Libraries/Animated/createAnimatedComponent', () => { } }) -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + describe('', () => { beforeEach(() => { diff --git a/src/features/bookOffer/pages/BookingConfirmation.web.test.tsx b/src/features/bookOffer/pages/BookingConfirmation.web.test.tsx index 97e652158f1..a87411a0c5e 100644 --- a/src/features/bookOffer/pages/BookingConfirmation.web.test.tsx +++ b/src/features/bookOffer/pages/BookingConfirmation.web.test.tsx @@ -7,7 +7,7 @@ import { act, checkAccessibilityFor, render } from 'tests/utils/web' import { BookingConfirmation } from './BookingConfirmation' -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + jest.mock('shared/user/useAvailableCredit', () => ({ useAvailableCredit: jest.fn(() => ({ isExpired: false, amount: 2000 })), diff --git a/src/features/bookOffer/pages/BookingOfferModal.native.test.tsx b/src/features/bookOffer/pages/BookingOfferModal.native.test.tsx index b2531b971db..05b22eb66d3 100644 --- a/src/features/bookOffer/pages/BookingOfferModal.native.test.tsx +++ b/src/features/bookOffer/pages/BookingOfferModal.native.test.tsx @@ -134,7 +134,7 @@ jest.mock('react-native/Libraries/Animated/createAnimatedComponent', () => { } }) -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + describe('', () => { it('should dismiss modal when click on rightIconButton and reset state', async () => { diff --git a/src/features/bookOffer/pages/BookingOfferModal.web.test.tsx b/src/features/bookOffer/pages/BookingOfferModal.web.test.tsx index dca1e778bb4..b215a4f444a 100644 --- a/src/features/bookOffer/pages/BookingOfferModal.web.test.tsx +++ b/src/features/bookOffer/pages/BookingOfferModal.web.test.tsx @@ -11,7 +11,7 @@ import { checkAccessibilityFor, render, screen } from 'tests/utils/web' import { BookingOfferModalComponent } from './BookingOfferModal' -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + jest.mock('features/auth/context/AuthContext') jest.mock('features/bookOffer/helpers/useBookingStock') diff --git a/src/features/bookings/components/BookingPropertiesSection.native.test.tsx b/src/features/bookings/components/BookingPropertiesSection.native.test.tsx index 8cb69641061..b1284eafcca 100644 --- a/src/features/bookings/components/BookingPropertiesSection.native.test.tsx +++ b/src/features/bookings/components/BookingPropertiesSection.native.test.tsx @@ -14,8 +14,6 @@ jest.mock('features/auth/context/AuthContext') jest.mock('libs/firebase/analytics/analytics') -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') - describe('', () => { beforeEach(() => { setFeatureFlags() diff --git a/src/features/bookings/components/CancelBookingModal.native.test.tsx b/src/features/bookings/components/CancelBookingModal.native.test.tsx index a77615d17bb..75e8470e22f 100644 --- a/src/features/bookings/components/CancelBookingModal.native.test.tsx +++ b/src/features/bookings/components/CancelBookingModal.native.test.tsx @@ -40,7 +40,7 @@ jest.mock('react-native/Libraries/Animated/createAnimatedComponent', () => { } }) -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + describe('', () => { beforeEach(() => { diff --git a/src/features/bookings/pages/BookingDetails/BookingDetails.web.test.tsx b/src/features/bookings/pages/BookingDetails/BookingDetails.web.test.tsx index ef14477c8ea..adb3578722b 100644 --- a/src/features/bookings/pages/BookingDetails/BookingDetails.web.test.tsx +++ b/src/features/bookings/pages/BookingDetails/BookingDetails.web.test.tsx @@ -26,7 +26,7 @@ jest.mock('features/navigation/helpers/openUrl') jest.mock('libs/network/NetInfoWrapper') const mockUseNetInfoContext = jest.spyOn(useNetInfoContextDefault, 'useNetInfoContext') as jest.Mock -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + jest.mock('libs/firebase/analytics/analytics') jest.mock('libs/firebase/remoteConfig/remoteConfig.services') diff --git a/src/features/favorites/pages/Favorites.perf.test.tsx b/src/features/favorites/pages/Favorites.perf.test.tsx index 4b34bdeb4f5..6799aba9b4c 100644 --- a/src/features/favorites/pages/Favorites.perf.test.tsx +++ b/src/features/favorites/pages/Favorites.perf.test.tsx @@ -15,7 +15,7 @@ import { mockServer } from 'tests/mswServer' import { reactQueryProviderHOC } from 'tests/reactQueryProviderHOC' import { measurePerformance, screen } from 'tests/utils' -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + jest.mock('libs/firebase/analytics/analytics') diff --git a/src/features/gtlPlaylist/components/GtlPlaylist.native.test.tsx b/src/features/gtlPlaylist/components/GtlPlaylist.native.test.tsx index 1c849e14c1e..96cccf7e601 100644 --- a/src/features/gtlPlaylist/components/GtlPlaylist.native.test.tsx +++ b/src/features/gtlPlaylist/components/GtlPlaylist.native.test.tsx @@ -58,7 +58,7 @@ jest.mock('@shopify/flash-list', () => { } }) -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + jest.useFakeTimers() diff --git a/src/features/home/components/AttachedModuleCard/AttachedOfferCard.native.test.tsx b/src/features/home/components/AttachedModuleCard/AttachedOfferCard.native.test.tsx index ce1d04c1f01..3bdcd819c02 100644 --- a/src/features/home/components/AttachedModuleCard/AttachedOfferCard.native.test.tsx +++ b/src/features/home/components/AttachedModuleCard/AttachedOfferCard.native.test.tsx @@ -40,7 +40,7 @@ jest.mock('libs/location/hooks/useDistance') const mockUseDistance = useDistance as jest.Mock mockUseDistance.mockReturnValue('10 km') -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + describe('AttachedOfferCard', () => { beforeEach(() => { diff --git a/src/features/home/components/headers/HomeHeader.native.test.tsx b/src/features/home/components/headers/HomeHeader.native.test.tsx index 984292fa2f3..e82dc0753ad 100644 --- a/src/features/home/components/headers/HomeHeader.native.test.tsx +++ b/src/features/home/components/headers/HomeHeader.native.test.tsx @@ -46,7 +46,7 @@ mockUseAuthContext.mockReturnValue({ }) jest.mock('libs/firebase/analytics/analytics') -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + describe('HomeHeader', () => { beforeEach(() => { @@ -87,7 +87,7 @@ describe('HomeHeader', () => { mockGeolocBannerFromBackend() renderHomeHeader() - await act(async () => {}) + await act(async () => { }) expect(await screen.findByText(subtitle)).toBeOnTheScreen() } diff --git a/src/features/home/components/modules/HighlightOfferModule.native.test.tsx b/src/features/home/components/modules/HighlightOfferModule.native.test.tsx index 29c689c428b..7205bbd5769 100644 --- a/src/features/home/components/modules/HighlightOfferModule.native.test.tsx +++ b/src/features/home/components/modules/HighlightOfferModule.native.test.tsx @@ -30,7 +30,7 @@ jest.mock('react-native/Libraries/Animated/createAnimatedComponent', () => { return Component } }) -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + const user = userEvent.setup() @@ -66,7 +66,7 @@ describe('HighlightOfferModule', () => { renderHighlightModule() - await act(async () => {}) + await act(async () => { }) expect(screen.queryByText(highlightOfferModuleFixture.highlightTitle)).not.toBeOnTheScreen() }) @@ -74,7 +74,7 @@ describe('HighlightOfferModule', () => { it('should send analytics event on module display', async () => { renderHighlightModule() - await act(async () => {}) + await act(async () => { }) expect(analytics.logModuleDisplayedOnHomepage).toHaveBeenNthCalledWith(1, { homeEntryId: 'entryId', diff --git a/src/features/home/components/modules/HomeModule.web.test.tsx b/src/features/home/components/modules/HomeModule.web.test.tsx index 30a51336455..92eb41a537d 100644 --- a/src/features/home/components/modules/HomeModule.web.test.tsx +++ b/src/features/home/components/modules/HomeModule.web.test.tsx @@ -28,7 +28,7 @@ import { act, checkAccessibilityFor, render, screen, waitFor } from 'tests/utils import { HomeModule } from './HomeModule' -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + const index = 1 const homeEntryId = '7tfixfH64pd5TMZeEKfNQ' @@ -162,7 +162,7 @@ describe('', () => { mockServer.postApi('/v1/recommendation/playlist', recommendedOffers) const { container } = renderHomeModule(formattedRecommendedOffersModule) - await act(async () => {}) + await act(async () => { }) expect(screen.getByText('Tes évènements en ligne')).toBeInTheDocument() @@ -179,7 +179,7 @@ describe('', () => { const { container } = renderHomeModule(formattedThematicHighlightModule) - await act(async () => {}) + await act(async () => { }) expect(screen.getByText('Temps très fort')).toBeInTheDocument() @@ -191,7 +191,7 @@ describe('', () => { it('OffersModule should not have basic accessibility issues', async () => { const { container } = renderHomeModule(formattedOffersModule, defaultData) - await act(async () => {}) + await act(async () => { }) expect(screen.getByText('I want something more')).toBeInTheDocument() diff --git a/src/features/home/components/modules/OffersModule.native.test.tsx b/src/features/home/components/modules/OffersModule.native.test.tsx index bc45f40ba7c..10a1a14d052 100644 --- a/src/features/home/components/modules/OffersModule.native.test.tsx +++ b/src/features/home/components/modules/OffersModule.native.test.tsx @@ -72,7 +72,7 @@ jest.mock('@shopify/flash-list', () => { } }) -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + describe('OffersModule', () => { beforeEach(() => { diff --git a/src/features/home/components/modules/marketing/MarketingBlockExclusivity.native.test.tsx b/src/features/home/components/modules/marketing/MarketingBlockExclusivity.native.test.tsx index 565bafb483e..fb28447c5b3 100644 --- a/src/features/home/components/modules/marketing/MarketingBlockExclusivity.native.test.tsx +++ b/src/features/home/components/modules/marketing/MarketingBlockExclusivity.native.test.tsx @@ -28,7 +28,7 @@ jest.mock('libs/subcategories/useSubcategories', () => ({ }, }), })) -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + describe('MarketingBlockExclusivity', () => { beforeEach(() => { diff --git a/src/features/home/components/modules/video/VideoModal.web.test.tsx b/src/features/home/components/modules/video/VideoModal.web.test.tsx index e2973d99241..dacd8398a1f 100644 --- a/src/features/home/components/modules/video/VideoModal.web.test.tsx +++ b/src/features/home/components/modules/video/VideoModal.web.test.tsx @@ -12,7 +12,7 @@ import { mockServer } from 'tests/mswServer' import { reactQueryProviderHOC } from 'tests/reactQueryProviderHOC' import { act, fireEvent, render, screen } from 'tests/utils/web' -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + jest.mock('libs/network/NetInfoWrapper') jest.mock('libs/firebase/analytics/analytics') diff --git a/src/features/home/pages/Home.web.test.tsx b/src/features/home/pages/Home.web.test.tsx index 22b54e20011..71e07142b23 100644 --- a/src/features/home/pages/Home.web.test.tsx +++ b/src/features/home/pages/Home.web.test.tsx @@ -13,7 +13,7 @@ import { act, checkAccessibilityFor, render } from 'tests/utils/web' import { Home } from './Home' -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + jest.mock('libs/firebase/remoteConfig/remoteConfig.services') diff --git a/src/features/identityCheck/pages/confirmation/BeneficiaryAccountCreated.native.test.tsx b/src/features/identityCheck/pages/confirmation/BeneficiaryAccountCreated.native.test.tsx index 2f0cbbfa94d..beac7a1847b 100644 --- a/src/features/identityCheck/pages/confirmation/BeneficiaryAccountCreated.native.test.tsx +++ b/src/features/identityCheck/pages/confirmation/BeneficiaryAccountCreated.native.test.tsx @@ -27,7 +27,7 @@ jest.mock('react-native/Libraries/Animated/createAnimatedComponent', () => { } }) -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + describe('', () => { beforeEach(() => { diff --git a/src/features/identityCheck/pages/confirmation/BeneficiaryAccountCreated.web.test.tsx b/src/features/identityCheck/pages/confirmation/BeneficiaryAccountCreated.web.test.tsx index 86545486222..c214d1daaed 100644 --- a/src/features/identityCheck/pages/confirmation/BeneficiaryAccountCreated.web.test.tsx +++ b/src/features/identityCheck/pages/confirmation/BeneficiaryAccountCreated.web.test.tsx @@ -6,7 +6,7 @@ import { render, checkAccessibilityFor, screen } from 'tests/utils/web' import { BeneficiaryAccountCreated } from './BeneficiaryAccountCreated' -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + jest.mock('libs/firebase/remoteConfig/remoteConfig.services') diff --git a/src/features/offer/components/MovieScreeningCalendar/useSelectedDateScreenings.test.ts b/src/features/offer/components/MovieScreeningCalendar/useSelectedDateScreenings.test.ts index 8f6d167ce36..4eeb5c1fa68 100644 --- a/src/features/offer/components/MovieScreeningCalendar/useSelectedDateScreenings.test.ts +++ b/src/features/offer/components/MovieScreeningCalendar/useSelectedDateScreenings.test.ts @@ -2,8 +2,6 @@ import { convertToMinutes } from 'features/offer/components/MovieScreeningCalend import { setFeatureFlags } from 'libs/firebase/firestore/featureFlags/__tests__/setFeatureFlags' import { RemoteStoreFeatureFlags } from 'libs/firebase/firestore/types' -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') - jest.mock('libs/firebase/remoteConfig/remoteConfig.services') describe('convertToMinutes', () => { diff --git a/src/features/offer/components/OfferBody/OfferBody.native.test.tsx b/src/features/offer/components/OfferBody/OfferBody.native.test.tsx index 4dc040cfe2e..7be76907dc7 100644 --- a/src/features/offer/components/OfferBody/OfferBody.native.test.tsx +++ b/src/features/offer/components/OfferBody/OfferBody.native.test.tsx @@ -60,7 +60,7 @@ jest.mock('react-native/Libraries/Animated/createAnimatedComponent', () => { } }) -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + const useArtistResultsSpy = jest .spyOn(useArtistResults, 'useArtistResults') diff --git a/src/features/offer/components/OfferCine/CineBlock.native.test.tsx b/src/features/offer/components/OfferCine/CineBlock.native.test.tsx index 442a6d56f65..7cf645e5c2e 100644 --- a/src/features/offer/components/OfferCine/CineBlock.native.test.tsx +++ b/src/features/offer/components/OfferCine/CineBlock.native.test.tsx @@ -25,7 +25,7 @@ jest.mock('libs/subcategories/mappings', () => ({ useSubcategoriesMapping: jest.fn(() => mockUseSubcategoriesMapping()), })) -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + const mockUseOfferCTAButton = useOfferCTAButton as jest.MockedFunction diff --git a/src/features/offer/components/OfferContent/OfferContent.web.test.tsx b/src/features/offer/components/OfferContent/OfferContent.web.test.tsx index d2386eaebd7..3cf56f93111 100644 --- a/src/features/offer/components/OfferContent/OfferContent.web.test.tsx +++ b/src/features/offer/components/OfferContent/OfferContent.web.test.tsx @@ -19,7 +19,7 @@ import * as useModalAPI from 'ui/components/modals/useModal' import { OfferContent } from './OfferContent.web' -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + jest.mock('libs/firebase/remoteConfig/remoteConfig.services') diff --git a/src/features/offer/components/OfferPlace/OfferPlace.native.test.tsx b/src/features/offer/components/OfferPlace/OfferPlace.native.test.tsx index 007c89398b2..8dc4f71eae1 100644 --- a/src/features/offer/components/OfferPlace/OfferPlace.native.test.tsx +++ b/src/features/offer/components/OfferPlace/OfferPlace.native.test.tsx @@ -101,7 +101,7 @@ jest.mock('react-native/Libraries/Animated/createAnimatedComponent', () => { } }) -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + const user = userEvent.setup() diff --git a/src/features/offer/components/OfferPlaylistList/OfferPlaylistList.native.test.tsx b/src/features/offer/components/OfferPlaylistList/OfferPlaylistList.native.test.tsx index f2e01d8a66f..bc8ff00ffdb 100644 --- a/src/features/offer/components/OfferPlaylistList/OfferPlaylistList.native.test.tsx +++ b/src/features/offer/components/OfferPlaylistList/OfferPlaylistList.native.test.tsx @@ -48,7 +48,7 @@ jest.mock('@shopify/flash-list', () => { FlashList: MockFlashList, } }) -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + describe('', () => { describe('Similar offers', () => { diff --git a/src/features/offer/pages/Offer/Offer.web.test.tsx b/src/features/offer/pages/Offer/Offer.web.test.tsx index 3eb396f676d..764734ec1d6 100644 --- a/src/features/offer/pages/Offer/Offer.web.test.tsx +++ b/src/features/offer/pages/Offer/Offer.web.test.tsx @@ -10,7 +10,7 @@ import { mockServer } from 'tests/mswServer' import { reactQueryProviderHOC } from 'tests/reactQueryProviderHOC' import { checkAccessibilityFor, render, screen, act } from 'tests/utils/web' -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + jest.setTimeout(20000) // to avoid exceeded timeout diff --git a/src/features/profile/components/BeneficiaryCeilings/BeneficiaryCeilings.native.test.tsx b/src/features/profile/components/BeneficiaryCeilings/BeneficiaryCeilings.native.test.tsx index caa20474a49..570e184ad67 100644 --- a/src/features/profile/components/BeneficiaryCeilings/BeneficiaryCeilings.native.test.tsx +++ b/src/features/profile/components/BeneficiaryCeilings/BeneficiaryCeilings.native.test.tsx @@ -16,7 +16,7 @@ const mockUseIsUserUnderageBeneficiary = jest .mockReturnValue(false) jest.mock('libs/firebase/analytics/analytics') -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + describe('BeneficiaryCeilings', () => { beforeEach(() => { diff --git a/src/features/profile/components/EmptyCredit/EmptyCredit.native.test.tsx b/src/features/profile/components/EmptyCredit/EmptyCredit.native.test.tsx index ac24bd8d0d3..92e3a891a61 100644 --- a/src/features/profile/components/EmptyCredit/EmptyCredit.native.test.tsx +++ b/src/features/profile/components/EmptyCredit/EmptyCredit.native.test.tsx @@ -12,7 +12,7 @@ jest.mock('libs/firebase/remoteConfig/RemoteConfigProvider', () => ({ .mockReturnValue({ homeEntryIdFreeOffers: 'homeEntryIdFreeOffers' }), })) -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + describe('', () => { beforeEach(() => { diff --git a/src/features/profile/components/Header/CreditHeader/CreditHeader.native.test.tsx b/src/features/profile/components/Header/CreditHeader/CreditHeader.native.test.tsx index 94947542004..b391f8fedf2 100644 --- a/src/features/profile/components/Header/CreditHeader/CreditHeader.native.test.tsx +++ b/src/features/profile/components/Header/CreditHeader/CreditHeader.native.test.tsx @@ -35,7 +35,7 @@ const tomorrow = '2023-02-11T21:00:00' jest.mock('libs/firebase/analytics/analytics') -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + describe('CreditHeader', () => { beforeEach(() => { diff --git a/src/features/profile/components/Header/ProfileHeader/ProfileHeader.native.test.tsx b/src/features/profile/components/Header/ProfileHeader/ProfileHeader.native.test.tsx index ddfef8006b8..1a4730ed1e1 100644 --- a/src/features/profile/components/Header/ProfileHeader/ProfileHeader.native.test.tsx +++ b/src/features/profile/components/Header/ProfileHeader/ProfileHeader.native.test.tsx @@ -72,7 +72,7 @@ jest.mock('features/auth/context/AuthContext', () => ({ jest.mock('libs/firebase/analytics/analytics') -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + describe('ProfileHeader', () => { beforeEach(() => { diff --git a/src/features/profile/components/Header/ProfileHeader/ProfileHeader.web.test.tsx b/src/features/profile/components/Header/ProfileHeader/ProfileHeader.web.test.tsx index 39fd975adf7..2cbd775f7d9 100644 --- a/src/features/profile/components/Header/ProfileHeader/ProfileHeader.web.test.tsx +++ b/src/features/profile/components/Header/ProfileHeader/ProfileHeader.web.test.tsx @@ -8,7 +8,7 @@ import { setFeatureFlags } from 'libs/firebase/firestore/featureFlags/__tests__/ import { RemoteStoreFeatureFlags } from 'libs/firebase/firestore/types' import { render, screen } from 'tests/utils/web' -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + jest.mock('libs/firebase/remoteConfig/remoteConfig.services') diff --git a/src/features/profile/pages/Profile.native.test.tsx b/src/features/profile/pages/Profile.native.test.tsx index 1ac11a50dac..62e20e99e8a 100644 --- a/src/features/profile/pages/Profile.native.test.tsx +++ b/src/features/profile/pages/Profile.native.test.tsx @@ -106,7 +106,7 @@ jest.mock('react-native/Libraries/Animated/createAnimatedComponent', () => { } }) -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + const user = userEvent.setup() jest.useFakeTimers() diff --git a/src/features/search/components/SearchList/SearchList.web.test.tsx b/src/features/search/components/SearchList/SearchList.web.test.tsx index 0dd7d029131..5d7fe206866 100644 --- a/src/features/search/components/SearchList/SearchList.web.test.tsx +++ b/src/features/search/components/SearchList/SearchList.web.test.tsx @@ -10,7 +10,7 @@ import { Offer } from 'shared/offer/types' import { reactQueryProviderHOC } from 'tests/reactQueryProviderHOC' import { render, screen } from 'tests/utils/web' -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + const mockHits: Offer[] = mockedAlgoliaResponse.hits const mockNbHits = mockedAlgoliaResponse.nbHits diff --git a/src/features/search/components/SearchResultsContent/SearchResultsContent.native.test.tsx b/src/features/search/components/SearchResultsContent/SearchResultsContent.native.test.tsx index 5d889f1674d..9f73452418c 100644 --- a/src/features/search/components/SearchResultsContent/SearchResultsContent.native.test.tsx +++ b/src/features/search/components/SearchResultsContent/SearchResultsContent.native.test.tsx @@ -216,8 +216,6 @@ jest.mock('@gorhom/bottom-sheet', () => { } }) -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') - describe('SearchResultsContent component', () => { beforeEach(() => { setFeatureFlags() diff --git a/src/features/search/components/SearchResultsContent/SearchResultsContent.web.test.tsx b/src/features/search/components/SearchResultsContent/SearchResultsContent.web.test.tsx index 9ee745227d1..e079faa859c 100644 --- a/src/features/search/components/SearchResultsContent/SearchResultsContent.web.test.tsx +++ b/src/features/search/components/SearchResultsContent/SearchResultsContent.web.test.tsx @@ -16,8 +16,6 @@ import { render, screen } from 'tests/utils/web' import { SearchResultsContent } from './SearchResultsContent' -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') - const mockData = { pages: [{ nbHits: 0, hits: [], page: 0 }] } const mockHasNextPage = true const mockFetchNextPage = jest.fn() diff --git a/src/features/search/components/sections/Price/Price.native.test.tsx b/src/features/search/components/sections/Price/Price.native.test.tsx index 32e50e57aad..60610a8437c 100644 --- a/src/features/search/components/sections/Price/Price.native.test.tsx +++ b/src/features/search/components/sections/Price/Price.native.test.tsx @@ -28,7 +28,7 @@ jest.mock('react-native/Libraries/Animated/createAnimatedComponent', () => { } }) -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + const user = userEvent.setup() jest.useFakeTimers() diff --git a/src/features/search/pages/SearchFilter/SearchFilter.web.test.tsx b/src/features/search/pages/SearchFilter/SearchFilter.web.test.tsx index cf1cc1211b3..4659e842e3e 100644 --- a/src/features/search/pages/SearchFilter/SearchFilter.web.test.tsx +++ b/src/features/search/pages/SearchFilter/SearchFilter.web.test.tsx @@ -9,7 +9,7 @@ import { PLACEHOLDER_DATA } from 'libs/subcategories/placeholderData' import { reactQueryProviderHOC } from 'tests/reactQueryProviderHOC' import { act, checkAccessibilityFor, render, screen, waitFor } from 'tests/utils/web' -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + jest.mock('libs/firebase/firestore/featureFlags/useFeatureFlag') @@ -69,7 +69,7 @@ describe('', () => { it('should display back button on header', async () => { renderSearchFilter() - await act(async () => {}) // fixes 3 warnings "An update to %s inside a test was not wrapped in act" for LocationModal, PriceModal and DatesHoursModal + await act(async () => { }) // fixes 3 warnings "An update to %s inside a test was not wrapped in act" for LocationModal, PriceModal and DatesHoursModal await waitFor(() => { expect(screen.getByTestId('Revenir en arrière')).toBeInTheDocument() @@ -79,7 +79,7 @@ describe('', () => { it('should not display close button on header', async () => { renderSearchFilter() - await act(async () => {}) // fixes 3 warnings "An update to %s inside a test was not wrapped in act" for LocationModal, PriceModal and DatesHoursModal + await act(async () => { }) // fixes 3 warnings "An update to %s inside a test was not wrapped in act" for LocationModal, PriceModal and DatesHoursModal await waitFor(() => { expect(screen.queryByTestId('Fermer')).not.toBeInTheDocument() diff --git a/src/features/search/pages/SearchResults/SearchResults.web.test.tsx b/src/features/search/pages/SearchResults/SearchResults.web.test.tsx index e68925186b6..8a269f04771 100644 --- a/src/features/search/pages/SearchResults/SearchResults.web.test.tsx +++ b/src/features/search/pages/SearchResults/SearchResults.web.test.tsx @@ -16,7 +16,7 @@ import { mockServer } from 'tests/mswServer' import { reactQueryProviderHOC } from 'tests/reactQueryProviderHOC' import { act, checkAccessibilityFor, render } from 'tests/utils/web' -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + jest.mock('libs/network/NetInfoWrapper') @@ -97,7 +97,7 @@ describe('', () => { mockUseNetInfoContext.mockReturnValueOnce({ isConnected: true }) const { container } = render(reactQueryProviderHOC()) - await act(async () => {}) + await act(async () => { }) await act(async () => { const results = await checkAccessibilityFor(container) @@ -110,7 +110,7 @@ describe('', () => { mockUseNetInfoContext.mockReturnValueOnce({ isConnected: false }) const { container } = render(reactQueryProviderHOC()) - await act(async () => {}) + await act(async () => { }) await act(async () => { const results = await checkAccessibilityFor(container) diff --git a/src/features/search/pages/modals/PriceModal/PriceModal.native.test.tsx b/src/features/search/pages/modals/PriceModal/PriceModal.native.test.tsx index ffbb8d998b2..68d5db7bd67 100644 --- a/src/features/search/pages/modals/PriceModal/PriceModal.native.test.tsx +++ b/src/features/search/pages/modals/PriceModal/PriceModal.native.test.tsx @@ -48,7 +48,7 @@ jest.mock('react-native/Libraries/Animated/createAnimatedComponent', () => { } }) -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + const user = userEvent.setup() jest.useFakeTimers() diff --git a/src/features/search/pages/modals/PriceModal/PriceModal.web.test.tsx b/src/features/search/pages/modals/PriceModal/PriceModal.web.test.tsx index d46f0bcc464..a2d8be56265 100644 --- a/src/features/search/pages/modals/PriceModal/PriceModal.web.test.tsx +++ b/src/features/search/pages/modals/PriceModal/PriceModal.web.test.tsx @@ -8,7 +8,7 @@ import { act, checkAccessibilityFor, render, screen } from 'tests/utils/web' import { PriceModal } from './PriceModal' -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + jest.mock('libs/firebase/remoteConfig/remoteConfig.services') diff --git a/src/features/tutorial/components/profileTutorial/EighteenBlockDescription.native.test.tsx b/src/features/tutorial/components/profileTutorial/EighteenBlockDescription.native.test.tsx index f80608c0c64..d741964fdab 100644 --- a/src/features/tutorial/components/profileTutorial/EighteenBlockDescription.native.test.tsx +++ b/src/features/tutorial/components/profileTutorial/EighteenBlockDescription.native.test.tsx @@ -11,8 +11,6 @@ jest.mock('features/auth/context/AuthContext', () => ({ useAuthContext: () => mockUseAuthContext(), })) -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') - describe('', () => { beforeEach(() => { setFeatureFlags([RemoteStoreFeatureFlags.ENABLE_PACIFIC_FRANC_CURRENCY]) diff --git a/src/features/tutorial/components/profileTutorial/EligibleFooter.native.test.tsx b/src/features/tutorial/components/profileTutorial/EligibleFooter.native.test.tsx index 51908617eb5..677e782c89c 100644 --- a/src/features/tutorial/components/profileTutorial/EligibleFooter.native.test.tsx +++ b/src/features/tutorial/components/profileTutorial/EligibleFooter.native.test.tsx @@ -6,7 +6,7 @@ import { setFeatureFlags } from 'libs/firebase/firestore/featureFlags/__tests__/ import { RemoteStoreFeatureFlags } from 'libs/firebase/firestore/types' import { fireEvent, render, screen } from 'tests/utils' -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + describe('', () => { beforeEach(() => { diff --git a/src/features/tutorial/pages/onboarding/OnboardingAgeInformation.native.test.tsx b/src/features/tutorial/pages/onboarding/OnboardingAgeInformation.native.test.tsx index 9ac0b648c62..d9691c540e9 100644 --- a/src/features/tutorial/pages/onboarding/OnboardingAgeInformation.native.test.tsx +++ b/src/features/tutorial/pages/onboarding/OnboardingAgeInformation.native.test.tsx @@ -26,7 +26,7 @@ jest.mock('react-native/Libraries/Animated/createAnimatedComponent', () => { } }) -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + describe('OnboardingAgeInformation', () => { beforeEach(() => { diff --git a/src/features/tutorial/pages/profileTutorial/ProfileTutorialAgeInformation.native.test.tsx b/src/features/tutorial/pages/profileTutorial/ProfileTutorialAgeInformation.native.test.tsx index 4d8dc5c012e..f0bc8a35e16 100644 --- a/src/features/tutorial/pages/profileTutorial/ProfileTutorialAgeInformation.native.test.tsx +++ b/src/features/tutorial/pages/profileTutorial/ProfileTutorialAgeInformation.native.test.tsx @@ -18,7 +18,7 @@ import { ProfileTutorialAgeInformation } from './ProfileTutorialAgeInformation' jest.mock('features/auth/context/AuthContext') jest.unmock('react-native/Libraries/Animated/createAnimatedComponent') -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + const sixteenUser = { ...beneficiaryUser, birthDate: format(SIXTEEN_AGE_DATE, 'yyyy-MM-dd') } diff --git a/src/features/tutorial/pages/profileTutorial/ProfileTutorialAgeInformation.web.test.tsx b/src/features/tutorial/pages/profileTutorial/ProfileTutorialAgeInformation.web.test.tsx index 6018d687779..f48701ebcde 100644 --- a/src/features/tutorial/pages/profileTutorial/ProfileTutorialAgeInformation.web.test.tsx +++ b/src/features/tutorial/pages/profileTutorial/ProfileTutorialAgeInformation.web.test.tsx @@ -9,7 +9,7 @@ import { checkAccessibilityFor, render } from 'tests/utils/web' import { ProfileTutorialAgeInformation } from './ProfileTutorialAgeInformation' -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + const navProps = { route: { params: { age: 15 } } } as StackScreenProps< TutorialRootStackParamList, diff --git a/src/features/venue/components/VenueOffers/VenueOffers.native.test.tsx b/src/features/venue/components/VenueOffers/VenueOffers.native.test.tsx index 38100419ed3..899b9b18114 100644 --- a/src/features/venue/components/VenueOffers/VenueOffers.native.test.tsx +++ b/src/features/venue/components/VenueOffers/VenueOffers.native.test.tsx @@ -103,7 +103,7 @@ jest.mock('react-native/Libraries/Animated/createAnimatedComponent', () => { } }) -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + const user = userEvent.setup() diff --git a/src/features/venue/pages/Venue/Venue.web.test.tsx b/src/features/venue/pages/Venue/Venue.web.test.tsx index 11b2ca3a20a..db873264457 100644 --- a/src/features/venue/pages/Venue/Venue.web.test.tsx +++ b/src/features/venue/pages/Venue/Venue.web.test.tsx @@ -16,7 +16,7 @@ import { mockServer } from 'tests/mswServer' import { reactQueryProviderHOC } from 'tests/reactQueryProviderHOC' import { act, checkAccessibilityFor, fireEvent, render, screen } from 'tests/utils/web' -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + mockdate.set(new Date('2021-08-15T00:00:00Z')) diff --git a/src/shared/offer/components/FinishSubscriptionModal/FinishSubscriptionModal.native.test.tsx b/src/shared/offer/components/FinishSubscriptionModal/FinishSubscriptionModal.native.test.tsx index b1265d87fd1..b13c254e205 100644 --- a/src/shared/offer/components/FinishSubscriptionModal/FinishSubscriptionModal.native.test.tsx +++ b/src/shared/offer/components/FinishSubscriptionModal/FinishSubscriptionModal.native.test.tsx @@ -37,7 +37,7 @@ jest.mock('react-native/Libraries/Animated/createAnimatedComponent', () => { } }) -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + describe('', () => { beforeEach(() => { diff --git a/src/shared/offer/helpers/useBookOfferModal.native.test.tsx b/src/shared/offer/helpers/useBookOfferModal.native.test.tsx index 235e8cfeef8..4f804b4cd8f 100644 --- a/src/shared/offer/helpers/useBookOfferModal.native.test.tsx +++ b/src/shared/offer/helpers/useBookOfferModal.native.test.tsx @@ -35,7 +35,7 @@ jest.mock('react-native/Libraries/Animated/createAnimatedComponent', () => { return Component } }) -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') + describe('useOfferModal', () => { beforeEach(() => { diff --git a/src/shared/user/useGetDepositAmountsByAge.native.test.ts b/src/shared/user/useGetDepositAmountsByAge.native.test.ts index e1c1b090a31..517a9627d4d 100644 --- a/src/shared/user/useGetDepositAmountsByAge.native.test.ts +++ b/src/shared/user/useGetDepositAmountsByAge.native.test.ts @@ -6,8 +6,6 @@ import { renderHook } from 'tests/utils' import { useGetDepositAmountsByAge } from './useGetDepositAmountsByAge' -jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate') - const TODAY = '2022-10-24' mockdate.set(new Date(TODAY))