From bba2d813679173eb47404cd9e4fa802cf1513934 Mon Sep 17 00:00:00 2001 From: AmbrishRamachandiran Date: Wed, 9 Aug 2023 14:07:35 +0530 Subject: [PATCH] Limit the use of the same shortcut title and url when adding a shortcut Signed-off-by: AmbrishRamachandiran --- plugins/shortcuts/src/ShortcutForm.test.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/shortcuts/src/ShortcutForm.test.tsx b/plugins/shortcuts/src/ShortcutForm.test.tsx index 773c5491da..56309b4a64 100644 --- a/plugins/shortcuts/src/ShortcutForm.test.tsx +++ b/plugins/shortcuts/src/ShortcutForm.test.tsx @@ -53,6 +53,12 @@ describe('ShortcutForm', () => { expect( screen.getByText('Must be at least 2 characters'), ).toBeInTheDocument(); + expect( + screen.queryByText('A shortcut with this title already exists'), + ).not.toBeInTheDocument(); + expect( + screen.queryByText('A shortcut with this url already exists'), + ).not.toBeInTheDocument(); }); });