11/* eslint-disable @typescript-eslint/naming-convention */
22import * as NativeNavigation from '@react-navigation/native' ;
3- import { act , fireEvent , render , screen , waitFor , within } from '@testing-library/react-native' ;
3+ import { act , cleanup , fireEvent , render , screen , waitFor , within } from '@testing-library/react-native' ;
44import { addSeconds , format , subMinutes } from 'date-fns' ;
55import React from 'react' ;
66import Onyx from 'react-native-onyx' ;
@@ -286,6 +286,7 @@ async function signInAndGetApp(): Promise<void> {
286286describe ( 'Pagination' , ( ) => {
287287 afterEach ( async ( ) => {
288288 await waitForIdle ( ) ;
289+ cleanup ( ) ;
289290 await act ( async ( ) => {
290291 await Onyx . clear ( ) ;
291292
@@ -298,9 +299,7 @@ describe('Pagination', () => {
298299 jest . clearAllMocks ( ) ;
299300 } ) ;
300301
301- // @TODO : Adjust this test to work with the home page as a default screen.
302- // GitHub issue: https://github.com/Expensify/App/issues/80982
303- xit ( 'opens a chat and load initial messages' , async ( ) => {
302+ it ( 'opens a chat and load initial messages' , async ( ) => {
304303 mockOpenReport ( 5 , '5' ) ;
305304
306305 await signInAndGetApp ( ) ;
@@ -323,9 +322,7 @@ describe('Pagination', () => {
323322 TestHelper . expectAPICommandToHaveBeenCalled ( 'GetNewerActions' , 0 ) ;
324323 } ) ;
325324
326- // @TODO : Adjust this test to work with the home page as a default screen.
327- // GitHub issue: https://github.com/Expensify/App/issues/80982
328- xit ( 'opens a chat and load older messages' , async ( ) => {
325+ it ( 'opens a chat and load older messages' , async ( ) => {
329326 mockOpenReport ( CONST . REPORT . MIN_INITIAL_REPORT_ACTION_COUNT , '18' ) ;
330327 mockGetOlderActions ( 5 ) ;
331328
@@ -357,9 +354,7 @@ describe('Pagination', () => {
357354 } ) ;
358355 } ) ;
359356
360- // @TODO : Adjust this test to work with the home page as a default screen.
361- // GitHub issue: https://github.com/Expensify/App/issues/80982
362- xit ( 'opens a chat and load newer messages' , async ( ) => {
357+ it ( 'opens a chat and load newer messages' , async ( ) => {
363358 mockOpenReport ( 5 , '5' ) ;
364359 mockGetNewerActions ( 5 ) ;
365360
0 commit comments