mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-22 19:30:15 +01:00
🏷️ fix: Editing Bookmark Descriptions (#10685)
* fix: exclude the currently edited bookmark from duplicate checks * ci: Add comprehensive tests for BookmarkForm component - Introduced a new test suite for the BookmarkForm component to validate bookmark editing functionality. - Implemented tests for various scenarios including editing descriptions, renaming tags, and handling duplicate tags. - Ensured proper feedback through toasts for error cases and successful submissions. - Mocked necessary hooks and context to isolate component behavior during tests. --------- Co-authored-by: Danny Avila <danny@librechat.ai>
This commit is contained in:
parent
5b8f0cba04
commit
07ed2cfed4
2 changed files with 500 additions and 1 deletions
|
|
@ -72,7 +72,7 @@ const BookmarkForm = ({
|
|||
}
|
||||
const allTags =
|
||||
queryClient.getQueryData<TConversationTag[]>([QueryKeys.conversationTags]) ?? [];
|
||||
if (allTags.some((tag) => tag.tag === data.tag)) {
|
||||
if (allTags.some((tag) => tag.tag === data.tag && tag.tag !== bookmark?.tag)) {
|
||||
showToast({
|
||||
message: localize('com_ui_bookmarks_create_exists'),
|
||||
status: 'warning',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue