diff --git a/web/app/components/integrations/__tests__/page.spec.tsx b/web/app/components/integrations/__tests__/page.spec.tsx index 48e7cbf31d7..7e0ea144891 100644 --- a/web/app/components/integrations/__tests__/page.spec.tsx +++ b/web/app/components/integrations/__tests__/page.spec.tsx @@ -649,13 +649,13 @@ describe('IntegrationsPage', () => { expect(screen.getAllByText('common.settings.customEndpoint')).toHaveLength(2) expect(screen.getByText('common.apiBasedExtensionPage.description')).toBeInTheDocument() expect(screen.getByTestId('api-extension-toolbar')).toBeInTheDocument() - expect(screen.getByRole('link', { name: /common\.modelProvider\.learnMore/i })).toHaveAttribute('href', 'https://docs.dify.ai/en/self-host/use-dify/workspace/api-extension/api-extension') + expect(screen.getByRole('link', { name: /common\.modelProvider\.learnMore/i })).toHaveAttribute('href', 'https://docs.dify.ai/en/develop-plugin/dev-guides-and-walkthroughs/endpoint') expect(screen.queryByText('common.toolsPage.description')).not.toBeInTheDocument() }) it.each([ ['trigger', 'plugin.categorySingle.trigger', 'common.triggerPage.description', 'https://docs.dify.ai/en/develop-plugin/dev-guides-and-walkthroughs/trigger-plugin'], - ['extension', 'plugin.categorySingle.extension', 'common.extensionPage.description', 'https://docs.dify.ai/en/develop-plugin/dev-guides-and-walkthroughs/endpoint'], + ['extension', 'plugin.categorySingle.extension', 'common.extensionPage.description', 'https://docs.dify.ai/en/self-host/use-dify/workspace/api-extension/api-extension'], ['agent-strategy', 'plugin.categorySingle.agent', 'common.agentStrategyPage.description', 'https://docs.dify.ai/en/develop-plugin/dev-guides-and-walkthroughs/agent-strategy-plugin'], ] as const)('renders the %s header with a docs link', (section, title, description, href) => { renderIntegrationsPage({ section }) diff --git a/web/app/components/integrations/page.tsx b/web/app/components/integrations/page.tsx index 55f92e00f51..d1fdd9335c9 100644 --- a/web/app/components/integrations/page.tsx +++ b/web/app/components/integrations/page.tsx @@ -43,9 +43,9 @@ const headerDescriptionDocPaths: Partial> = { 'custom-tool': '/use-dify/workspace/tools#custom-tool', 'workflow-tool': '/use-dify/workspace/tools#workflow-tool', 'mcp': '/use-dify/build/mcp', - 'custom-endpoint': '/use-dify/workspace/api-extension/api-extension', + 'custom-endpoint': '/develop-plugin/dev-guides-and-walkthroughs/endpoint', 'trigger': '/develop-plugin/dev-guides-and-walkthroughs/trigger-plugin', - 'extension': '/develop-plugin/dev-guides-and-walkthroughs/endpoint', + 'extension': '/use-dify/workspace/api-extension/api-extension', 'agent-strategy': '/develop-plugin/dev-guides-and-walkthroughs/agent-strategy-plugin', } diff --git a/web/app/components/main-nav/__tests__/index.spec.tsx b/web/app/components/main-nav/__tests__/index.spec.tsx index 03f42bf59c3..c9c28cd74ce 100644 --- a/web/app/components/main-nav/__tests__/index.spec.tsx +++ b/web/app/components/main-nav/__tests__/index.spec.tsx @@ -360,7 +360,11 @@ describe('MainNav', () => { it('aligns the global navigation spacing with the main sidebar design', async () => { mockInstalledApps = [createInstalledApp()] - renderMainNav() + const { container } = renderMainNav() + + const mainNav = container.querySelector('aside') + expect(mainNav).toHaveClass('w-62', 'p-1') + expect(mainNav?.firstElementChild).toHaveClass('w-60') const logoLink = screen.getByLabelText('Dify') expect(logoLink).not.toHaveClass('px-2') @@ -374,6 +378,8 @@ describe('MainNav', () => { expect(webAppsButton.parentElement).toHaveClass('py-1', 'pr-2', 'pl-2') const helpButton = screen.getByRole('button', { name: 'common.mainNav.help.openMenu' }) + expect(helpButton.parentElement?.parentElement).toHaveClass('w-60') + expect(helpButton.parentElement?.parentElement).not.toHaveClass('w-full') expect(helpButton.parentElement).toHaveClass('shrink-0', 'rounded-full', 'p-1') }) diff --git a/web/app/components/main-nav/index.tsx b/web/app/components/main-nav/index.tsx index b8bfd854516..4ab164faa7c 100644 --- a/web/app/components/main-nav/index.tsx +++ b/web/app/components/main-nav/index.tsx @@ -74,11 +74,11 @@ export function MainNav({ return (