Skip to content

Commit

Permalink
(PC-33683) feat(NC): remove deprecated useGetPacificFrancToEuroRate mock
Browse files Browse the repository at this point in the history
  • Loading branch information
lbeneston-pass committed Jan 16, 2025
1 parent 50d8859 commit e2c7029
Show file tree
Hide file tree
Showing 63 changed files with 65 additions and 80 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ const mockArtist = {
bio: 'chanteuse',
}

jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate')

describe('<ArtistBody />', () => {
beforeEach(() => {
setFeatureFlags()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jest.mock('@shopify/flash-list', () => {
FlashList: MockFlashList,
}
})
jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate')


Check failure on line 27 in src/features/artist/components/ArtistPlaylist/ArtistPlaylist.native.test.tsx

View workflow job for this annotation

GitHub Actions / yarn-linter / yarn_lint

Delete `⏎`
describe('ArtistPlaylist', () => {
beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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')


Check failure on line 12 in src/features/artist/components/ArtistTopOffers/ArtistTopOffers.native.test.tsx

View workflow job for this annotation

GitHub Actions / yarn-linter / yarn_lint

Delete `⏎`
describe('ArtistTopOffers', () => {
beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ jest.mock('react-native/Libraries/Animated/createAnimatedComponent', () => {
return Component
}
})
jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate')

describe('<EighteenBirthday />', () => {
beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { checkAccessibilityFor, render } from 'tests/utils/web'

import { EighteenBirthday } from './EighteenBirthday'

jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate')

Check failure on line 10 in src/features/birthdayNotifications/pages/EighteenBirthday.web.test.tsx

View workflow job for this annotation

GitHub Actions / yarn-linter / yarn_lint

Delete `⏎⏎`

jest.mock('shared/user/useDepositAmountsByAge')
const mockUseDepositAmountsByAge = useDepositAmountsByAge as jest.Mock
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ mockAuthContextWithUser({
},
})

jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate')

Check failure on line 33 in src/features/birthdayNotifications/pages/RecreditBirthdayNotification.native.test.tsx

View workflow job for this annotation

GitHub Actions / yarn-linter / yarn_lint

Delete `⏎⏎`

describe('<RecreditBirthdayNotification />', () => {
beforeAll(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { checkAccessibilityFor, render, screen } from 'tests/utils/web'

import { RecreditBirthdayNotification } from './RecreditBirthdayNotification'

jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate')

Check failure on line 10 in src/features/birthdayNotifications/pages/RecreditBirthdayNotification.web.test.tsx

View workflow job for this annotation

GitHub Actions / yarn-linter / yarn_lint

Delete `⏎⏎`

jest.mock('libs/firebase/analytics/analytics')
jest.mock('libs/firebase/remoteConfig/remoteConfig.services')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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')


Check failure on line 44 in src/features/bookOffer/components/BookDuoChoice.native.test.tsx

View workflow job for this annotation

GitHub Actions / yarn-linter / yarn_lint

Delete `⏎`
describe('BookDuoChoice', () => {
beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jest.mock('features/offer/helpers/useHasEnoughCredit/useHasEnoughCredit', () =>
useCreditForOffer: jest.fn(() => mockCreditOffer),
}))

jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate')

Check failure on line 50 in src/features/bookOffer/components/BookHourChoice.native.test.tsx

View workflow job for this annotation

GitHub Actions / yarn-linter / yarn_lint

Delete `⏎⏎`

describe('BookHourChoice when hour is already selected', () => {
beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jest.mock('features/offer/helpers/useHasEnoughCredit/useHasEnoughCredit', () =>
useCreditForOffer: jest.fn(() => mockCreditOffer),
}))

jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate')

Check failure on line 29 in src/features/bookOffer/components/BookPricesChoice.native.test.tsx

View workflow job for this annotation

GitHub Actions / yarn-linter / yarn_lint

Delete `⏎⏎`

describe('BookPricesChoice', () => {
beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ jest.mock('react-native/Libraries/Animated/createAnimatedComponent', () => {
}
})

jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate')

Check failure on line 150 in src/features/bookOffer/components/BookingDetails.native.test.tsx

View workflow job for this annotation

GitHub Actions / yarn-linter / yarn_lint

Delete `⏎⏎`

describe('<BookingDetails />', () => {
beforeAll(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Check failure on line 45 in src/features/bookOffer/components/BookingInformations.native.test.tsx

View workflow job for this annotation

GitHub Actions / yarn-linter / yarn_lint

Delete `⏎⏎`

describe('<BookingInformations />', () => {
beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { render, screen } from 'tests/utils'

const attributes = ['VOSTFR', '3D', 'IMAX']

jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate')


describe('<PriceLine />', () => {
beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jest.mock('react-native/Libraries/Animated/createAnimatedComponent', () => {
}
})

jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate')


describe('<BookingConfirmation />', () => {
beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 })),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ jest.mock('react-native/Libraries/Animated/createAnimatedComponent', () => {
}
})

jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate')


describe('<BookingOfferModalComponent />', () => {
it('should dismiss modal when click on rightIconButton and reset state', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ jest.mock('features/auth/context/AuthContext')

jest.mock('libs/firebase/analytics/analytics')

jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate')

describe('<BookingPropertiesSection />', () => {
beforeEach(() => {
setFeatureFlags()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jest.mock('react-native/Libraries/Animated/createAnimatedComponent', () => {
}
})

jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate')


describe('<CancelBookingModal />', () => {
beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
2 changes: 1 addition & 1 deletion src/features/favorites/pages/Favorites.perf.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jest.mock('@shopify/flash-list', () => {
}
})

jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate')


jest.useFakeTimers()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ mockUseAuthContext.mockReturnValue({
})

jest.mock('libs/firebase/analytics/analytics')
jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate')


describe('HomeHeader', () => {
beforeEach(() => {
Expand Down Expand Up @@ -87,7 +87,7 @@ describe('HomeHeader', () => {
mockGeolocBannerFromBackend()

renderHomeHeader()
await act(async () => {})
await act(async () => { })

expect(await screen.findByText(subtitle)).toBeOnTheScreen()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jest.mock('react-native/Libraries/Animated/createAnimatedComponent', () => {
return Component
}
})
jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate')


const user = userEvent.setup()

Expand Down Expand Up @@ -66,15 +66,15 @@ describe('HighlightOfferModule', () => {

renderHighlightModule()

await act(async () => {})
await act(async () => { })

expect(screen.queryByText(highlightOfferModuleFixture.highlightTitle)).not.toBeOnTheScreen()
})

it('should send analytics event on module display', async () => {
renderHighlightModule()

await act(async () => {})
await act(async () => { })

expect(analytics.logModuleDisplayedOnHomepage).toHaveBeenNthCalledWith(1, {
homeEntryId: 'entryId',
Expand Down
8 changes: 4 additions & 4 deletions src/features/home/components/modules/HomeModule.web.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -162,7 +162,7 @@ describe('<HomeModule />', () => {
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()

Expand All @@ -179,7 +179,7 @@ describe('<HomeModule />', () => {

const { container } = renderHomeModule(formattedThematicHighlightModule)

await act(async () => {})
await act(async () => { })

expect(screen.getByText('Temps très fort')).toBeInTheDocument()

Expand All @@ -191,7 +191,7 @@ describe('<HomeModule />', () => {
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()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jest.mock('@shopify/flash-list', () => {
}
})

jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate')


describe('OffersModule', () => {
beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jest.mock('libs/subcategories/useSubcategories', () => ({
},
}),
}))
jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate')


describe('MarketingBlockExclusivity', () => {
beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
2 changes: 1 addition & 1 deletion src/features/home/pages/Home.web.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jest.mock('react-native/Libraries/Animated/createAnimatedComponent', () => {
}
})

jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate')


describe('<BeneficiaryAccountCreated/>', () => {
beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jest.mock('react-native/Libraries/Animated/createAnimatedComponent', () => {
}
})

jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate')


const useArtistResultsSpy = jest
.spyOn(useArtistResults, 'useArtistResults')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<typeof useOfferCTAButton>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jest.mock('react-native/Libraries/Animated/createAnimatedComponent', () => {
}
})

jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate')


const user = userEvent.setup()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jest.mock('@shopify/flash-list', () => {
FlashList: MockFlashList,
}
})
jest.mock('libs/firebase/firestore/exchangeRates/useGetPacificFrancToEuroRate')


describe('<OfferPlaylistList />', () => {
describe('Similar offers', () => {
Expand Down
Loading

0 comments on commit e2c7029

Please sign in to comment.