Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions src/libs/Navigation/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
};
Expand Down
8 changes: 7 additions & 1 deletion tests/ui/BottomTabBarTest.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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(() => {
Expand Down
7 changes: 6 additions & 1 deletion tests/ui/FloatingActionButtonTest.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -46,6 +46,11 @@ describe('FloatingActionButton hover', () => {
</NavigationContainer>,
);

afterEach(() => {
cleanup();
jest.clearAllMocks();
});

it('changes background color on hover', () => {
renderFAB();
const fab = screen.getByTestId('floating-action-button');
Expand Down
7 changes: 6 additions & 1 deletion tests/ui/NavigationTabBarAvatarTest.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -29,6 +29,11 @@ describe('NavigationTabBarAvatar hover', () => {
</OnyxListItemProvider>,
);

afterEach(() => {
cleanup();
jest.clearAllMocks();
});

it('shows green ring while hovered', () => {
renderAvatar();
const button = screen.getByRole(CONST.ROLE.BUTTON);
Expand Down
Loading