From ac013349a77138ed1d7e0f1e841aca45d10ef14b Mon Sep 17 00:00:00 2001 From: Test Date: Wed, 22 Oct 2025 15:33:14 +0200 Subject: [PATCH 1/3] fix test workflow job failing --- .github/workflows/test.yml | 2 +- tests/ui/BottomTabBarTest.tsx | 8 +++++++- tests/ui/FloatingActionButtonTest.tsx | 7 ++++++- tests/ui/NavigationTabBarAvatarTest.tsx | 7 ++++++- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e0af3c151f26..b6607a88d80b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,7 +20,7 @@ jobs: strategy: fail-fast: false matrix: - chunk: [ 1, 2, 3 ] + chunk: [ 1, 2, 3, 4 ] name: test (job ${{ fromJSON(matrix.chunk) }}) steps: - name: Checkout diff --git a/tests/ui/BottomTabBarTest.tsx b/tests/ui/BottomTabBarTest.tsx index 2a9d9669d85b..cfa24f335bbe 100644 --- a/tests/ui/BottomTabBarTest.tsx +++ b/tests/ui/BottomTabBarTest.tsx @@ -1,5 +1,5 @@ import {NavigationContainer} from '@react-navigation/native'; -import {render, screen} from '@testing-library/react-native'; +import {cleanup, render, screen} from '@testing-library/react-native'; import React from 'react'; import Onyx from 'react-native-onyx'; import ComposeProviders from '@components/ComposeProviders'; @@ -72,6 +72,12 @@ describe('NavigationTabBar', () => { beforeEach(() => { Onyx.clear([ONYXKEYS.NVP_PREFERRED_LOCALE]); }); + + afterEach(async () => { + cleanup(); + jest.clearAllMocks(); + await Onyx.clear(); + }); describe('Home tab', () => { describe('Debug mode enabled', () => { beforeEach(() => { diff --git a/tests/ui/FloatingActionButtonTest.tsx b/tests/ui/FloatingActionButtonTest.tsx index 2b32dafc0f48..ed32b967bbb5 100644 --- a/tests/ui/FloatingActionButtonTest.tsx +++ b/tests/ui/FloatingActionButtonTest.tsx @@ -1,5 +1,5 @@ import {NavigationContainer} from '@react-navigation/native'; -import {fireEvent, render, screen} from '@testing-library/react-native'; +import {cleanup, fireEvent, render, screen} from '@testing-library/react-native'; import React from 'react'; import FloatingActionButton from '@components/FloatingActionButton'; import colors from '@styles/theme/colors'; @@ -46,6 +46,11 @@ describe('FloatingActionButton hover', () => { , ); + afterEach(() => { + cleanup(); + jest.clearAllMocks(); + }); + it('changes background color on hover', () => { renderFAB(); const fab = screen.getByTestId('floating-action-button'); diff --git a/tests/ui/NavigationTabBarAvatarTest.tsx b/tests/ui/NavigationTabBarAvatarTest.tsx index 108b0466bcd0..534045444281 100644 --- a/tests/ui/NavigationTabBarAvatarTest.tsx +++ b/tests/ui/NavigationTabBarAvatarTest.tsx @@ -1,4 +1,4 @@ -import {fireEvent, render, screen} from '@testing-library/react-native'; +import {cleanup, fireEvent, render, screen} from '@testing-library/react-native'; import React from 'react'; import OnyxListItemProvider from '@components/OnyxListItemProvider'; import NavigationTabBarAvatar from '@pages/home/sidebar/NavigationTabBarAvatar'; @@ -29,6 +29,11 @@ describe('NavigationTabBarAvatar hover', () => { , ); + afterEach(() => { + cleanup(); + jest.clearAllMocks(); + }); + it('shows green ring while hovered', () => { renderAvatar(); const button = screen.getByRole(CONST.ROLE.BUTTON); From 955d806dc18d6c0bcab740e6ccea8064190bbf7b Mon Sep 17 00:00:00 2001 From: Test Date: Thu, 23 Oct 2025 11:32:46 +0200 Subject: [PATCH 2/3] remove extra runner --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b6607a88d80b..e0af3c151f26 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,7 +20,7 @@ jobs: strategy: fail-fast: false matrix: - chunk: [ 1, 2, 3, 4 ] + chunk: [ 1, 2, 3 ] name: test (job ${{ fromJSON(matrix.chunk) }}) steps: - name: Checkout From 2b74bc1dc3cb8f6cdbef4f583bc6bd15ac03da1d Mon Sep 17 00:00:00 2001 From: Test Date: Thu, 23 Oct 2025 12:05:00 +0200 Subject: [PATCH 3/3] fix lint --- src/libs/Navigation/types.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libs/Navigation/types.ts b/src/libs/Navigation/types.ts index 75cbc387460b..8b43df571378 100644 --- a/src/libs/Navigation/types.ts +++ b/src/libs/Navigation/types.ts @@ -1349,6 +1349,7 @@ type NewReportWorkspaceSelectionNavigatorParamList = { type SetDefaultWorkspaceNavigatorParamList = { [SCREENS.SET_DEFAULT_WORKSPACE.ROOT]: { + // eslint-disable-next-line no-restricted-syntax -- `backTo` usages in this file are legacy. Do not add new `backTo` params to screens. See contributingGuides/NAVIGATION.md backTo?: Routes; }; };