Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active
TypeScript aianthropicartifactsawsazurechatgptchatgpt-cloneclaudeclonedeepseekgeminigooglegpt-5librechatmcpo1openairesponses-apivisionwebui
🧪 ci: Update Test Files & fix ESLint issues
Danny Avila74e029e78ffa
diff --git a/api/server/routes/files/files.test.js b/api/server/routes/files/files.test.jsindex 02aaf3c688..d02caf79fd 100644--- a/api/server/routes/files/files.test.js+++ b/api/server/routes/files/files.test.js@@ -61,11 +61,8 @@ describe('File Routes - Delete with Agent Access', () => {let Agent;let AclEntry;let User;- let AccessRole;let methods;let modelsToCleanup = [];- // eslint-disable-next-line no-unused-vars- let agentId;beforeAll(async () => {mongoServer = await MongoMemoryServer.create();@@ -90,7 +87,6 @@ describe('File Routes - Delete with Agent Access', () => {Agent = models.Agent;AclEntry = models.AclEntry;User = models.User;- AccessRole = models.AccessRole;// Seed default roles using our methodsawait methods.seedDefaultRoles();@@ -139,7 +135,6 @@ describe('File Routes - Delete with Agent Access', () => {// Create test dataauthorId = new mongoose.Types.ObjectId();otherUserId = new mongoose.Types.ObjectId();- agentId = uuidv4();fileId = uuidv4();// Create users in databasediff --git a/api/server/services/start/interface.spec.js b/api/server/services/start/interface.spec.jsindex 4ee3f78724..d9f3d4e067 100644--- a/api/server/services/start/interface.spec.js+++ b/api/server/services/start/interface.spec.js@@ -419,6 +419,7 @@ describe('loadDefaultInterface', () => {[Permissions.VIEW_USERS]: undefined,},[PermissionTypes.FILE_SEARCH]: { [Permissions.USE]: undefined },+ [PermissionTypes.FILE_CITATIONS]: { [Permissions.USE]: true },});});@@ -450,6 +451,7 @@ describe('loadDefaultInterface', () => {[Permissions.VIEW_USERS]: undefined,},[PermissionTypes.FILE_SEARCH]: { [Permissions.USE]: true },+ [PermissionTypes.FILE_CITATIONS]: { [Permissions.USE]: undefined },});});@@ -481,6 +483,7 @@ describe('loadDefaultInterface', () => {[Permissions.VIEW_USERS]: undefined,},[PermissionTypes.FILE_SEARCH]: { [Permissions.USE]: false },+ [PermissionTypes.FILE_CITATIONS]: { [Permissions.USE]: undefined },});});@@ -517,7 +520,7 @@ describe('loadDefaultInterface', () => {[Permissions.VIEW_USERS]: undefined,},[PermissionTypes.FILE_SEARCH]: { [Permissions.USE]: true },- [PermissionTypes.FILE_CITATIONS]: { [Permissions.USE]: true },+ [PermissionTypes.FILE_CITATIONS]: { [Permissions.USE]: undefined },});});@@ -530,13 +533,22 @@ describe('loadDefaultInterface', () => {expect(updateAccessPermissions).toHaveBeenCalledWith(SystemRoles.USER, {[PermissionTypes.PROMPTS]: { [Permissions.USE]: undefined },[PermissionTypes.BOOKMARKS]: { [Permissions.USE]: undefined },- [PermissionTypes.MEMORIES]: { [Permissions.USE]: undefined },+ [PermissionTypes.MEMORIES]: {+ [Permissions.USE]: undefined,+ [Permissions.OPT_OUT]: undefined,+ },[PermissionTypes.MULTI_CONVO]: { [Permissions.USE]: undefined },[PermissionTypes.AGENTS]: { [Permissions.USE]: undefined },[PermissionTypes.TEMPORARY_CHAT]: { [Permissions.USE]: undefined },[PermissionTypes.RUN_CODE]: { [Permissions.USE]: undefined },[PermissionTypes.WEB_SEARCH]: { [Permissions.USE]: undefined },[PermissionTypes.FILE_CITATIONS]: { [Permissions.USE]: true },+ [PermissionTypes.MARKETPLACE]: { [Permissions.USE]: undefined },+ [PermissionTypes.PEOPLE_PICKER]: {+ [Permissions.VIEW_GROUPS]: undefined,+ [Permissions.VIEW_USERS]: undefined,+ },+ [PermissionTypes.FILE_SEARCH]: { [Permissions.USE]: undefined },});});@@ -549,13 +561,22 @@ describe('loadDefaultInterface', () => {expect(updateAccessPermissions).toHaveBeenCalledWith(SystemRoles.USER, {[PermissionTypes.PROMPTS]: { [Permissions.USE]: undefined },[PermissionTypes.BOOKMARKS]: { [Permissions.USE]: undefined },- [PermissionTypes.MEMORIES]: { [Permissions.USE]: undefined },+ [PermissionTypes.MEMORIES]: {+ [Permissions.USE]: undefined,+ [Permissions.OPT_OUT]: undefined,+ },[PermissionTypes.MULTI_CONVO]: { [Permissions.USE]: undefined },[PermissionTypes.AGENTS]: { [Permissions.USE]: undefined },[PermissionTypes.TEMPORARY_CHAT]: { [Permissions.USE]: undefined },[PermissionTypes.RUN_CODE]: { [Permissions.USE]: undefined },[PermissionTypes.WEB_SEARCH]: { [Permissions.USE]: undefined },[PermissionTypes.FILE_CITATIONS]: { [Permissions.USE]: false },+ [PermissionTypes.MARKETPLACE]: { [Permissions.USE]: undefined },+ [PermissionTypes.PEOPLE_PICKER]: {+ [Permissions.VIEW_GROUPS]: undefined,+ [Permissions.VIEW_USERS]: undefined,+ },+ [PermissionTypes.FILE_SEARCH]: { [Permissions.USE]: undefined },});});});diff --git a/client/src/components/SidePanel/Agents/__tests__/Accessibility.spec.tsx b/client/src/components/SidePanel/Agents/__tests__/Accessibility.spec.tsxindex 2121226f22..768d27471d 100644--- a/client/src/components/SidePanel/Agents/__tests__/Accessibility.spec.tsx+++ b/client/src/components/SidePanel/Agents/__tests__/Accessibility.spec.tsx@@ -503,8 +503,11 @@ describe('Accessibility Improvements', () => {);const tab = screen.getByRole('tab');- expect(tab.className).toContain('focus:outline-none');- expect(tab.className).toContain('focus:bg-gray-100');+ // Check that the tab has proper ARIA attributes for accessibility+ expect(tab).toHaveAttribute('aria-selected', 'true');+ expect(tab).toHaveAttribute('tabIndex', '0');+ // Check that tab has proper role and can receive focus+ expect(tab).toHaveAttribute('role', 'tab');});});diff --git a/client/src/components/SidePanel/Agents/__tests__/AgentDetail.spec.tsx b/client/src/components/SidePanel/Agents/__tests__/AgentDetail.spec.tsxindex 9bf44b1f96..b9c1fd7302 100644--- a/client/src/components/SidePanel/Agents/__tests__/AgentDetail.spec.tsx+++ b/client/src/components/SidePanel/Agents/__tests__/AgentDetail.spec.tsx@@ -178,12 +178,12 @@ describe('AgentDetail', () => {expect(screen.getByText('com_agents_no_description')).toBeInTheDocument();});- it('should render 3-dot menu button', () => {+ it('should render copy link button', () => {renderWithProviders(<AgentDetail {...defaultProps} />);- const menuButton = screen.getByRole('button', { name: 'com_agents_more_options' });- expect(menuButton).toBeInTheDocument();- expect(menuButton).toHaveAttribute('aria-haspopup', 'menu');+ const copyLinkButton = screen.getByRole('button', { name: 'com_agents_copy_link' });+ expect(copyLinkButton).toBeInTheDocument();+ expect(copyLinkButton).toHaveAttribute('aria-label', 'com_agents_copy_link');});it('should render Start Chat button', () => {@@ -241,46 +241,11 @@ describe('AgentDetail', () => {expect(mockNavigate).not.toHaveBeenCalled();});- it('should open dropdown when 3-dot menu is clicked', async () => {- const user = userEvent.setup();- renderWithProviders(<AgentDetail {...defaultProps} />);-- const menuButton = screen.getByRole('button', { name: 'com_agents_more_options' });- await user.click(menuButton);-- expect(screen.getByRole('button', { name: 'com_agents_copy_link' })).toBeInTheDocument();- });-- it('should close dropdown when clicking outside', async () => {- const user = userEvent.setup();- renderWithProviders(<AgentDetail {...defaultProps} />);-- // Open dropdown- const menuButton = screen.getByRole('button', { name: 'com_agents_more_options' });- await user.click(menuButton);-- expect(screen.getByRole('button', { name: 'com_agents_copy_link' })).toBeInTheDocument();-- // Click outside (on the agent name)- const agentName = screen.getByText('Test Agent');- await user.click(agentName);-- await waitFor(() => {- expect(- screen.queryByRole('button', { name: 'com_agents_copy_link' }),- ).not.toBeInTheDocument();- });- });-it('should copy link and show success toast when Copy Link is clicked', async () => {const user = userEvent.setup();renderWithProviders(<AgentDetail {...defaultProps} />);- // Open dropdown- const menuButton = screen.getByRole('button', { name: 'com_agents_more_options' });- await user.click(menuButton);-- // Click copy link+ // Click copy link button directly (no dropdown needed)const copyLinkButton = screen.getByRole('button', { name: 'com_agents_copy_link' });await user.click(copyLinkButton);@@ -296,13 +261,6 @@ describe('AgentDetail', () => {message: 'com_agents_link_copied',});});-- // Dropdown should close- await waitFor(() => {- expect(- screen.queryByRole('button', { name: 'com_agents_copy_link' }),- ).not.toBeInTheDocument();- });});it('should show error toast when clipboard write fails', async () => {@@ -311,10 +269,7 @@ describe('AgentDetail', () => {renderWithProviders(<AgentDetail {...defaultProps} />);- // Open dropdown and click copy link- const menuButton = screen.getByRole('button', { name: 'com_agents_more_options' });- await user.click(menuButton);-+ // Click copy link button directlyconst copyLinkButton = screen.getByRole('button', { name: 'com_agents_copy_link' });await user.click(copyLinkButton);@@ -345,33 +300,32 @@ describe('AgentDetail', () => {it('should have proper ARIA attributes', () => {renderWithProviders(<AgentDetail {...defaultProps} />);- const menuButton = screen.getByRole('button', { name: 'com_agents_more_options' });- expect(menuButton).toHaveAttribute('aria-haspopup', 'menu');- expect(menuButton).toHaveAttribute('aria-label', 'com_agents_more_options');+ const copyLinkButton = screen.getByRole('button', { name: 'com_agents_copy_link' });+ expect(copyLinkButton).toHaveAttribute('aria-label', 'com_agents_copy_link');});- it('should support keyboard navigation for dropdown', async () => {+ it('should support keyboard navigation', async () => {const user = userEvent.setup();renderWithProviders(<AgentDetail {...defaultProps} />);- const menuButton = screen.getByRole('button', { name: 'com_agents_more_options' });+ const copyLinkButton = screen.getByRole('button', { name: 'com_agents_copy_link' });- // Focus and open with Enter key- menuButton.focus();+ // Focus and activate with Enter key+ copyLinkButton.focus();await user.keyboard('{Enter}');- expect(screen.getByRole('button', { name: 'com_agents_copy_link' })).toBeInTheDocument();+ await waitFor(() => {+ expect(mockWriteText).toHaveBeenCalledWith(+ `${window.location.origin}/c/new?agent_id=test-agent-id`,+ );+ });});it('should have proper focus management', async () => {- const user = userEvent.setup();renderWithProviders(<AgentDetail {...defaultProps} />);- const menuButton = screen.getByRole('button', { name: 'com_agents_more_options' });- await user.click(menuButton);-const copyLinkButton = screen.getByRole('button', { name: 'com_agents_copy_link' });- expect(copyLinkButton).toHaveClass('focus:bg-surface-hover', 'focus:outline-none');+ expect(copyLinkButton).toHaveClass('focus:outline-none', 'focus:ring-2');});});diff --git a/client/src/locales/en/translation.json b/client/src/locales/en/translation.jsonindex c099f23965..5a23bd9eed 100644--- a/client/src/locales/en/translation.json+++ b/client/src/locales/en/translation.json@@ -1208,7 +1208,6 @@"com_agents_copy_link": "Copy Link","com_agents_link_copied": "Link copied","com_agents_link_copy_failed": "Failed to copy link",- "com_agents_more_options": "More options","com_agents_loading": "Loading...","com_agents_error_loading": "Error loading agents","com_agents_error_searching": "Error searching agents",