fix tooltip implementation

This commit is contained in:
Abbey Campbell
2025-11-17 12:48:22 -08:00
parent df348283ae
commit 578f1d5ce4
2 changed files with 26 additions and 11 deletions

View File

@@ -1,14 +1,13 @@
import { screen } from "@testing-library/react-native";
import AddObsButton from "components/AddObsBottomSheet/AddObsButton";
import { navigationRef } from "navigation/navigationUtils";
import React from "react";
import { renderComponent } from "tests/helpers/render";
// Mock getCurrentRoute to return ObsList
jest.mock( "navigation/navigationUtils", () => ( {
getCurrentRoute: () => ( {
name: "ObsList"
} )
} ) );
// Mock methods needed to get the current route
navigationRef.isReady = jest.fn( () => true );
navigationRef.getCurrentRoute = jest.fn( () => ( { name: "ObsList" } ) );
navigationRef.addListener = jest.fn( () => jest.fn() );
jest.mock( "sharedHooks/useCurrentUser", () => ( {
__esModule: true,