Skip to content

Commit

Permalink
(PC-33973) fix(VideoModal): remove unnecessary test
Browse files Browse the repository at this point in the history
  • Loading branch information
imouandjolobe-pass committed Jan 17, 2025
1 parent 906c78a commit a23edcb
Showing 1 changed file with 5 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { subcategoriesDataTest } from 'libs/subcategories/fixtures/subcategories
import { MODAL_TO_SHOW_TIME } from 'tests/constants'
import { mockServer } from 'tests/mswServer'
import { reactQueryProviderHOC } from 'tests/reactQueryProviderHOC'
import { act, fireEvent, render, screen } from 'tests/utils'
import { act, userEvent, render, screen } from 'tests/utils'

jest.mock('libs/network/NetInfoWrapper')

Expand All @@ -28,6 +28,9 @@ jest.mock('react-native/Libraries/Animated/createAnimatedComponent', () => {
}
})

jest.useFakeTimers()
const user = userEvent.setup()

describe('VideoModal', () => {
beforeEach(() => {
setFeatureFlags()
Expand All @@ -49,9 +52,7 @@ describe('VideoModal', () => {

const closeButton = screen.getByTestId('Fermer la modale vidéo')

await act(async () => {
fireEvent.press(closeButton)
})
await user.press(closeButton)

expect(analytics.logHasDismissedModal).toHaveBeenNthCalledWith(1, {
moduleId: 'abcd',
Expand All @@ -60,13 +61,6 @@ describe('VideoModal', () => {
seenDuration: 135,
})
})

it('should render properly with FF on', async () => {
// TODO(PC-33973): test passes with no FF on
renderVideoModal()

expect(await screen.findByText('Découvre Lujipeka')).toBeOnTheScreen()
})
})

function renderVideoModal() {
Expand Down

0 comments on commit a23edcb

Please sign in to comment.