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; }; }; 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);