Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions tests/ui/PaginationTest.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/naming-convention */
import * as NativeNavigation from '@react-navigation/native';
import {act, fireEvent, render, screen, waitFor, within} from '@testing-library/react-native';
import {act, cleanup, fireEvent, render, screen, waitFor, within} from '@testing-library/react-native';
import {addSeconds, format, subMinutes} from 'date-fns';
import React from 'react';
import Onyx from 'react-native-onyx';
Expand Down Expand Up @@ -286,6 +286,7 @@ async function signInAndGetApp(): Promise<void> {
describe('Pagination', () => {
afterEach(async () => {
await waitForIdle();
cleanup();
await act(async () => {
await Onyx.clear();

Expand All @@ -298,9 +299,7 @@ describe('Pagination', () => {
jest.clearAllMocks();
});

// @TODO: Adjust this test to work with the home page as a default screen.
// GitHub issue: https://github.com/Expensify/App/issues/80982
xit('opens a chat and load initial messages', async () => {
it('opens a chat and load initial messages', async () => {
mockOpenReport(5, '5');

await signInAndGetApp();
Expand All @@ -323,9 +322,7 @@ describe('Pagination', () => {
TestHelper.expectAPICommandToHaveBeenCalled('GetNewerActions', 0);
});

// @TODO: Adjust this test to work with the home page as a default screen.
// GitHub issue: https://github.com/Expensify/App/issues/80982
xit('opens a chat and load older messages', async () => {
it('opens a chat and load older messages', async () => {
mockOpenReport(CONST.REPORT.MIN_INITIAL_REPORT_ACTION_COUNT, '18');
mockGetOlderActions(5);

Expand Down Expand Up @@ -357,9 +354,7 @@ describe('Pagination', () => {
});
});

// @TODO: Adjust this test to work with the home page as a default screen.
// GitHub issue: https://github.com/Expensify/App/issues/80982
xit('opens a chat and load newer messages', async () => {
it('opens a chat and load newer messages', async () => {
mockOpenReport(5, '5');
mockGetNewerActions(5);

Expand Down
Loading