You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This pull request includes significant refactoring and restructuring of
the component files and their corresponding tests. The main changes
involve renaming files and updating import paths to reflect the new
directory structure. Additionally, there are new test implementations
and mock setups for various components.
### Refactoring and File Restructuring:
*
[`src/App.tsx`](diffhunk://#diff-26ad4b834941d9b19ebf9db8082bd202aaf72ea0ddea85f5a8a0cb3c729cc6f2L7-R14):
Updated import paths for several components to reflect their new
locations.
*
[`src/components/ChatContainer/ChatContainer.tsx`](diffhunk://#diff-c0bfccaf03a29a5059f6a47c6dd2cdd194fcb1e06fe8e0e188d700a86204f073L2-R7):
Renamed from `src/components/ChatContainer.tsx` and updated import paths
accordingly.
*
[`src/components/ChatInput/ChatInput.tsx`](diffhunk://#diff-e56b5877d49403da7c452c9efab46ee9a6e3daa2be72e4aeca9bf085afd81b17L2-R3):
Renamed from `src/components/ChatInput.tsx` and updated import paths
accordingly.
*
[`src/components/Notification/NotificationContainer.tsx`](diffhunk://#diff-a7a3cccb312c200f36070589f838d8f5b6a55edcfbb0a3ebcacc18e664b6484fL4-R4):
Renamed from `src/components/NotificationContainer.tsx` and updated
import paths accordingly.
### New Test Implementations:
*
[`src/components/ChatContainer/ChatContainer.test.tsx`](diffhunk://#diff-5bc04b73d213740634c14cc7f3b8c028d08edba97c1c08197b8ed348a3112d47R1-R225):
Added comprehensive tests for `ChatContainer`, including mocks for
dependencies and various test cases for authentication, chat history
loading, and error handling.
*
[`src/components/ChatInputButton/ToolsModal.test.tsx`](diffhunk://#diff-5403659b7ee64a58dcfa7026e4f58e57a731ed7d0cd222e7c4391912bd6d10afR1-R160):
Added tests for `ToolsModal` component, including mock setups and test
cases for tool fetching, searching, selection, and modal interactions.
*
[`src/components/ChatInputButton/ToolsToggle.test.tsx`](diffhunk://#diff-c3ddc66de5ee3885a6fd20e64b040a3b73a35c93ffdb2ea88467ed3a23900c3aR1-R103):
Added tests for `ToolsToggle` component, including mock setups and test
cases for modal interactions and tool selection changes.
### Mock Setups:
*
[`src/components/ChatContainer/ChatContainer.test.tsx`](diffhunk://#diff-5bc04b73d213740634c14cc7f3b8c028d08edba97c1c08197b8ed348a3112d47R1-R225):
Implemented mocks for `auth0`, `ChatService`, `LLMService`, and
notification context to facilitate testing.
*
[`src/components/ChatInputButton/ToolsModal.test.tsx`](diffhunk://#diff-5403659b7ee64a58dcfa7026e4f58e57a731ed7d0cd222e7c4391912bd6d10afR1-R160):
Implemented mocks for `fetchTools`, `XMarkIcon`, `SearchBar`, and
`ToolItem` to facilitate testing.
### Additional Changes:
*
[`src/components/LLMProviderModal/LLMProviderCard.tsx`](diffhunk://#diff-e394d9143f494a3f02408949ee230b3809f82abba6e7fc0d51fb5b9d14ac82e4L2-R2):
Renamed from `src/components/LLMProviderCard.tsx` and updated import
paths accordingly.
*
[`src/components/LLMProviderModal/LLMProvidersModal.tsx`](diffhunk://#diff-c385676f231140450f28413936a90eb65351338cae8e5c0b6a168474ad2ecaf4L3-R6):
Renamed from `src/components/LLMProvidersModal.tsx` and updated import
paths accordingly.
*
[`src/components/LLMProviderToggle/LLMProviderToggle.tsx`](diffhunk://#diff-dcb11fe36b7000c9c4f60a42251b1a7fe9865e5440ce49c9e5155e454827ecc2L4-R4):
Renamed from `src/components/LLMProviderToggle.tsx`, updated import
paths, and added a `data-testid` attribute for testing.
[[1]](diffhunk://#diff-dcb11fe36b7000c9c4f60a42251b1a7fe9865e5440ce49c9e5155e454827ecc2L4-R4)
[[2]](diffhunk://#diff-dcb11fe36b7000c9c4f60a42251b1a7fe9865e5440ce49c9e5155e454827ecc2R28)
*
[`src/components/Notification/NotificationToast.tsx`](diffhunk://#diff-4ad828d25e4d67a1d71d71d523987d84f7515d38cd827796066b51e4f93bf2dcL1-R3):
Renamed from `src/components/NotificationToast.tsx` and updated import
paths accordingly.
0 commit comments