fix some integration tests now that PriceHistoryChart.test.tx is disabled
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Failing after 2m53s

This commit is contained in:
2025-11-27 18:31:22 -08:00
parent dbc677e0aa
commit 897e4531c6
10 changed files with 11 additions and 12 deletions

View File

@@ -1,6 +1,6 @@
// src/features/flyer/AnalysisPanel.test.tsx
import React from 'react';
import { render, screen, fireEvent, waitFor, act } from '@testing-library/react';
import { render, screen, fireEvent, waitFor } from '@testing-library/react';
import { describe, it, expect, vi, beforeEach, type Mock, type Mocked } from 'vitest';
import { AnalysisPanel } from './AnalysisPanel';
import * as aiApiClient from '../../services/aiApiClient';

View File

@@ -1,10 +1,10 @@
// src/components/ShoppingList.test.tsx
import React from 'react';
import { render, screen, fireEvent, waitFor, act } from '@testing-library/react';
import { render, screen, fireEvent, waitFor } from '@testing-library/react';
import { describe, it, expect, vi, beforeEach, afterEach, type Mock } from 'vitest';
import { ShoppingListComponent } from './ShoppingList'; // This path is now relative to the new folder
import type { User, ShoppingList } from '../../types';
import * as aiApiClient from '../../services/aiApiClient';
//import * as aiApiClient from '../../services/aiApiClient';
// The logger and aiApiClient are now mocked globally.
// Mock the AI API client (relative to new location)

View File

@@ -1,6 +1,6 @@
// src/components/WatchedItemsList.test.tsx
import React from 'react';
import { render, screen, fireEvent, waitFor, act } from '@testing-library/react';
import { render, screen, fireEvent, waitFor } from '@testing-library/react';
import { describe, it, expect, vi, beforeEach } from 'vitest';
import { WatchedItemsList } from './WatchedItemsList';
import type { MasterGroceryItem, User } from '../../types';

View File

@@ -1,7 +1,6 @@
// src/index.test.tsx
import React from 'react';
import { screen } from '@testing-library/react';
import { describe, it, expect, vi, afterEach, beforeEach } from 'vitest';
import { describe, it, vi, afterEach, beforeEach } from 'vitest';
// Mock the App component to isolate the test to index.tsx's mounting logic
vi.mock('./App', () => ({

View File

@@ -1,6 +1,6 @@
// src/pages/ResetPasswordPage.test.tsx
import React from 'react';
import { render, screen, fireEvent, waitFor, act } from '@testing-library/react';
import { render, screen, fireEvent, waitFor } from '@testing-library/react';
import { describe, it, expect, vi, beforeEach } from 'vitest';
import { MemoryRouter, Route, Routes } from 'react-router-dom';
import { ResetPasswordPage } from './ResetPasswordPage';

View File

@@ -1,6 +1,6 @@
// src/pages/admin/ActivityLog.test.tsx
import React from 'react';
import { render, screen, waitFor, fireEvent, act } from '@testing-library/react';
import { render, screen, waitFor, fireEvent } from '@testing-library/react';
import { describe, it, expect, vi, beforeEach } from 'vitest';
import { ActivityLog } from './ActivityLog';
import * as apiClient from '../../services/apiClient';

View File

@@ -1,6 +1,6 @@
// src/pages/admin/AdminStatsPage.test.tsx
import React from 'react';
import { render, screen, waitFor, act } from '@testing-library/react';
import { render, screen, waitFor } from '@testing-library/react';
import { describe, it, expect, vi, beforeEach } from 'vitest';
import { MemoryRouter } from 'react-router-dom';
import { AdminStatsPage } from './AdminStatsPage';

View File

@@ -1,6 +1,6 @@
// src/pages/admin/CorrectionsPage.test.tsx
import React from 'react';
import { render, screen, waitFor, act } from '@testing-library/react';
import { render, screen, waitFor } from '@testing-library/react';
import { describe, it, expect, vi, beforeEach } from 'vitest';
import { MemoryRouter } from 'react-router-dom';
import { CorrectionsPage } from './CorrectionsPage';

View File

@@ -1,6 +1,6 @@
// src/pages/admin/components/AdminBrandManager.test.tsx
import React from 'react';
import { render, screen, fireEvent, waitFor, act } from '@testing-library/react';
import { render, screen, fireEvent, waitFor } from '@testing-library/react';
import { describe, it, expect, vi, beforeEach } from 'vitest';
import toast from 'react-hot-toast';
import { AdminBrandManager } from './AdminBrandManager';

View File

@@ -1,6 +1,6 @@
// src/pages/admin/ProfileManager.test.tsx
import React from 'react';
import { render, screen, fireEvent, waitFor, cleanup, act } from '@testing-library/react';
import { render, screen, fireEvent, waitFor, cleanup } from '@testing-library/react';
import { describe, it, expect, vi, beforeEach, afterEach, type Mock } from 'vitest';
import { ProfileManager } from './ProfileManager';
import * as apiClient from '../../../services/apiClient';