Commit Graph

23 Commits

Author SHA1 Message Date
508583809b minor sql fix in schema check 2025-12-25 17:53:21 -08:00
03b5af39e1 consolidate some testing functions 2025-12-23 23:50:03 -08:00
a10f84aa48 complete project using prettier! 2025-12-22 09:45:14 -08:00
bc2c24bcff more refactor
Some checks failed
Deploy to Test Environment / deploy-to-test (push) Has been cancelled
2025-12-21 20:34:32 -08:00
15f759cbc4 more unit test fixes + some integration
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 1h21m56s
2025-12-21 14:54:41 -08:00
74ed4d2d3d mock mock mock !
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 1h1m15s
2025-12-19 22:55:51 -08:00
e62739810e moar fixes + unit test review of routes
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 57m53s
2025-12-19 14:20:22 -08:00
2a8b1b8617 moar fixes + unit test review of routes
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 55m32s
2025-12-19 05:58:28 -08:00
e6968987b9 Refactor: Add centralized error handling middleware to improve test stability and error reporting across all route tests
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 8m59s
2025-12-15 20:08:35 -08:00
0c590675b3 Refactor and enhance error handling across various routes and hooks
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 9m29s
- Added error logging for image generation in useAiAnalysis hook.
- Updated useAuth tests to relax strict call count checks for compatibility with React Strict Mode.
- Improved user data tests to handle multiple renders and mock API responses more effectively.
- Enhanced watched items tests to ensure isolation and proper mock behavior.
- Updated validation middleware tests to accommodate potential variations in error messages.
- Removed flaky test for invalid job ID format in AI routes due to routing limitations.
- Adjusted auth routes tests to check for error messages in a more resilient manner.
- Improved flyer routes to ensure proper validation and error handling.
- Enhanced gamification routes tests to check for error messages using regex for flexibility.
- Updated recipe routes to ensure type safety and proper error handling for query parameters.
- Enhanced stats routes to ensure proper validation and error handling for query parameters.
- Improved system routes tests to accommodate variations in validation error messages.
- Updated user routes tests to ensure proper validation and error handling for various scenarios.
- Refactored user routes to ensure type safety and proper handling of query parameters.
2025-12-15 11:43:52 -08:00
6e8a8343e0 Refactor tests and API context integration
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 5m55s
- Updated tests in `useShoppingLists`, `useWatchedItems`, and various components to use `waitFor` for asynchronous assertions.
- Enhanced error handling in `errorHandler` middleware tests to include validation errors and status codes.
- Modified `AuthView`, `ProfileManager.Auth`, and `ProfileManager.Authenticated` tests to check for `AbortSignal` in API calls.
- Removed duplicate assertions in `auth.routes.test`, `budget.routes.test`, and `gamification.routes.test`.
- Introduced reusable logger matcher in `budget.routes.test`, `deals.routes.test`, `flyer.routes.test`, and `user.routes.test`.
- Simplified API client mock in `aiApiClient.test` to handle token overrides correctly.
- Removed unused `apiUtils.ts` file.
- Added `ApiContext` and `ApiProvider` for better API client management in React components.
2025-12-14 23:28:58 -08:00
d4739b5784 Refactor and update various service and route tests for improved type safety and clarity
Some checks failed
Deploy to Test Environment / deploy-to-test (push) Has been cancelled
- Added a new notes file regarding the deprecation of the Google AI JavaScript SDK.
- Removed unused imports and fixed duplicate imports in admin and auth route tests.
- Enhanced type safety in error handling for unique constraint violations in auth routes.
- Simplified gamification route tests by removing unnecessary imports.
- Updated price route to improve type safety by casting request body.
- Improved mock implementations in system route tests for better type handling.
- Cleaned up user routes by removing unused imports.
- Enhanced AI API client tests with more robust type definitions for form data.
- Updated recipe database tests to remove unused error imports.
- Refactored flyer processing service tests for better type safety and clarity.
- Improved logger client to use `unknown` instead of `any` for better type safety.
- Cleaned up notification service tests to ensure proper type casting.
- Updated queue service tests to remove unnecessary imports and improve type handling.
- Refactored queue service workers tests for better type safety in job processors.
- Cleaned up user routes integration tests by removing unused imports.
- Enhanced tests setup for unit tests to improve type safety in mocked Express requests.
- Updated PDF converter tests for better type safety in mocked return values.
- Improved price parser tests to ensure proper handling of null and undefined inputs.
2025-12-14 18:02:16 -08:00
f73b1422ab feat: Update AI service to use new Google Generative AI SDK
Some checks are pending
Deploy to Test Environment / deploy-to-test (push) Has started running
- Refactored AIService to integrate with the latest GoogleGenAI SDK, updating the generateContent method signature and response handling.
- Adjusted error handling and logging for improved clarity and consistency.
- Enhanced mock implementations in tests to align with the new SDK structure.
refactor: Modify Admin DB service to use Profile type
- Updated AdminRepository to replace User type with Profile in relevant methods.
- Enhanced test cases to utilize mock factories for creating Profile and AdminUserView objects.
fix: Improve error handling in BudgetRepository
- Implemented type-safe checks for PostgreSQL error codes to enhance error handling in createBudget method.
test: Refactor Deals DB tests for type safety
- Updated DealsRepository tests to use Pool type for mock instances, ensuring type safety.
chore: Add new mock factories for testing
- Introduced mock factories for UserWithPasswordHash, Profile, WatchedItemDeal, LeaderboardUser, and UnmatchedFlyerItem to streamline test data creation.
style: Clean up queue service tests
- Refactored queue service tests to improve readability and maintainability, including better handling of mock worker instances.
docs: Update types to include UserWithPasswordHash
- Added UserWithPasswordHash interface to types for better clarity on user authentication data structure.
chore: Remove deprecated Google AI SDK references
- Updated code and documentation to reflect the migration to the new Google Generative AI SDK, removing references to the deprecated SDK.
2025-12-14 17:14:44 -08:00
eb0e183f61 Refactor test setup and improve mock implementations
Some checks are pending
Deploy to Test Environment / deploy-to-test (push) Has started running
- Introduced `createTestApp` utility to standardize Express app creation for tests, including JSON parsing, mock logger, and error handling.
- Updated all route tests to utilize `createTestApp`, enhancing consistency and reducing boilerplate code.
- Implemented `mockLogger` for cleaner test output and easier logging mock management.
- Adjusted passport mocks to ensure proper user authentication simulation across tests.
- Enhanced type safety by augmenting Express Request interface with `req.log` and `req.user` properties.
- Removed redundant code and improved readability in various test files.
2025-12-14 14:47:19 -08:00
56f14f6342 feat: Enhance API validation and error handling across routes
Some checks failed
Deploy to Test Environment / deploy-to-test (push) Has been cancelled
- Added tests for invalid request bodies in price and recipe routes.
- Improved type safety in request handlers using Zod schemas.
- Introduced a consistent validation pattern for empty request bodies.
- Enhanced error messages for invalid query parameters in stats and user routes.
- Implemented middleware to inject mock logging for tests.
- Created a custom type for validated requests to streamline type inference.
2025-12-14 12:53:10 -08:00
e37a32c890 route testing refactoring using zod - ADR-003
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 16m3s
2025-12-12 13:16:58 -08:00
99d0dba296 better errors for routes
Some checks failed
Deploy to Test Environment / deploy-to-test (push) Failing after 8m2s
2025-12-10 22:53:30 -08:00
158778c2ec DB refactor for easier testsing
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Failing after 5m16s
App.ts refactor into hooks
unit tests
2025-12-08 20:46:12 -08:00
0eda796fad App.tsx refactor + even more unit tests
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 8m28s
2025-12-08 12:18:46 -08:00
19d431057f lootsa tests fixes
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 4m35s
2025-12-05 16:59:20 -08:00
88b3b0fe95 lootsa tests fixes
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 4m29s
2025-12-05 16:00:04 -08:00
5cf1e610b3 lootsa tests fixes
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 4m35s
2025-12-05 15:08:59 -08:00
64afc5853d work on icon display
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 4m27s
2025-12-05 13:32:29 -08:00