diff --git a/apps/ai-dial-admin/src/components/Common/FilePath/FilePath.tsx b/apps/ai-dial-admin/src/components/Common/FilePath/FilePath.tsx index aff068d36..d1bd932eb 100644 --- a/apps/ai-dial-admin/src/components/Common/FilePath/FilePath.tsx +++ b/apps/ai-dial-admin/src/components/Common/FilePath/FilePath.tsx @@ -141,7 +141,7 @@ const FilePath: FC = ({ searchable: false, }} showCreateFolderButton={shouldAbleToCreateNewFolder} - excludedPaths={['/platform']} + excludedPaths={['platform/']} /> diff --git a/apps/ai-dial-admin/src/components/Common/FilePath/tests/FilePath.spec.tsx b/apps/ai-dial-admin/src/components/Common/FilePath/tests/FilePath.spec.tsx index 0108f0fa4..5f2497549 100644 --- a/apps/ai-dial-admin/src/components/Common/FilePath/tests/FilePath.spec.tsx +++ b/apps/ai-dial-admin/src/components/Common/FilePath/tests/FilePath.spec.tsx @@ -26,7 +26,7 @@ vi.mock('@epam/ai-dial-ui-kit', async (importOriginal) => { }) => { if (!open) return null; - const isExcluded = (path?: string) => !!path && excludedPaths.some((excluded) => `/${path}`.startsWith(excluded)); + const isExcluded = (path?: string) => !!path && excludedPaths.some((excluded) => path.startsWith(excluded)); return (
@@ -69,7 +69,7 @@ describe('FilePath', () => { await user.click(screen.getByRole('button', { name: 'ActionMenuOperation.Move_to' })); expect(screen.getByText('item:public')).toBeInTheDocument(); - expect(screen.queryByText('root:platform')).not.toBeInTheDocument(); + expect(screen.queryByText('item:platform')).not.toBeInTheDocument(); expect(screen.queryByText('item:platform')).not.toBeInTheDocument(); });