diff --git a/notesd-to-ai-2.txt b/notesd-to-ai-2.txt
index 7512d952..77a7b6f5 100644
--- a/notesd-to-ai-2.txt
+++ b/notesd-to-ai-2.txt
@@ -14,7 +14,7 @@ Price trend analysis - weekly - biweekly, monthly, seasonal, yearly, real food i
5) add comments when you can, as that will help ensure ideas persist into the app
6) Your knowledge of package version, like nodejs, is always old, like a year or more old - ask me for the best version to use, as your knowledge is incomplete
7) Stop making predictions and/or guessing at solutions. Focus on adding logging and debugging to issues that are not solved right away.
-8) Do not make obsequious statements - we're here to do a job, not get patted on the shoulder for insignificant acheivements.
+8) Do not make obsequious statements - we're here to do a job, not get patted on the shoulder for insignificant achievements.
9) Provide me with the npm command to execute rather than wanting to edit the package.json file. That is not the correct way to handle a package update.
10) Provide code changes in DIFF format
diff --git a/src/App.test.tsx b/src/App.test.tsx
index 15fd8161..aaace6a9 100644
--- a/src/App.test.tsx
+++ b/src/App.test.tsx
@@ -13,6 +13,18 @@ vi.mock('./hooks/useAuth', () => ({
useAuth: () => mockUseAuth(),
}));
+// Mock the new data hooks
+const mockUseFlyers = vi.fn();
+vi.mock('./hooks/useFlyers', () => ({
+ useFlyers: () => mockUseFlyers(),
+}));
+const mockUseMasterItems = vi.fn();
+vi.mock('./hooks/useMasterItems', () => ({
+ useMasterItems: () => mockUseMasterItems(),
+}));
+const mockUseUserData = vi.fn();
+vi.mock('./hooks/useUserData', () => ({ useUserData: () => mockUseUserData() }));
+
// Mock top-level components rendered by App's routes
vi.mock('./components/Header', () => ({ Header: (props: any) =>
{error}
+No deals for your watched items found in any currently valid flyers.
; } diff --git a/src/features/charts/PriceHistoryChart.test.tsx b/src/features/charts/PriceHistoryChart.test.tsx index 2e8c3953..dcaa033d 100644 --- a/src/features/charts/PriceHistoryChart.test.tsx +++ b/src/features/charts/PriceHistoryChart.test.tsx @@ -1,14 +1,18 @@ // src/features/charts/PriceHistoryChart.test.tsx import React from 'react'; import { render, screen, waitFor } from '@testing-library/react'; -import { describe, it, expect, vi, beforeEach, type Mocked } from 'vitest'; +import { describe, it, expect, vi, beforeEach, type Mock } from 'vitest'; import { PriceHistoryChart } from './PriceHistoryChart'; +import { useUserData } from '../../hooks/useUserData'; import * as apiClient from '../../services/apiClient'; -import { MasterGroceryItem, ItemPriceHistory } from '../../types'; +import type { MasterGroceryItem, ItemPriceHistory } from '../../types'; // Mock the apiClient vi.mock('../../services/apiClient'); -const mockedApiClient = apiClient as MockedCould not load flyer items: {itemsError.message}
; + } const resultText = results[activeTab]; + const sourceList = sources[activeTab] || []; if (resultText) { - const isSearchType = activeTab === AnalysisType.WEB_SEARCH || activeTab === AnalysisType.PLAN_TRIP; + const isSearchType = activeTab === AnalysisType.WEB_SEARCH || activeTab === AnalysisType.PLAN_TRIP || activeTab === AnalysisType.COMPARE_PRICES; return (