diff --git a/frontend/src/App.tool-center.test.ts b/frontend/src/App.tool-center.test.ts index 114710f..3536462 100644 --- a/frontend/src/App.tool-center.test.ts +++ b/frontend/src/App.tool-center.test.ts @@ -103,6 +103,60 @@ describe('tool center menu entries', () => { expect(appSource).toContain("borderBottom: `1px solid ${overlayTheme.divider}`"); }); + it('lets the tool center detail header own embedded tool titles', () => { + const renderPaneStart = appSource.indexOf('const renderToolCenterPane = () => {'); + const renderPaneSource = appSource.slice( + renderPaneStart, + appSource.indexOf('};\n\n return (', renderPaneStart), + ); + const connectionPackageSource = renderPaneSource.slice( + renderPaneSource.indexOf("if (activeToolCenterPane.key === 'connection-package')"), + renderPaneSource.indexOf("if (activeToolCenterPane.key === 'data-root')"), + ); + const dataRootSource = renderPaneSource.slice( + renderPaneSource.indexOf("if (activeToolCenterPane.key === 'data-root')"), + renderPaneSource.indexOf("if (activeToolCenterPane.key === 'security-update')"), + ); + const securityUpdateSource = renderPaneSource.slice( + renderPaneSource.indexOf("if (activeToolCenterPane.key === 'security-update')"), + renderPaneSource.indexOf("activeToolCenterPane.key === 'schema-compare'"), + ); + const dataSyncSource = renderPaneSource.slice( + renderPaneSource.indexOf("activeToolCenterPane.key === 'schema-compare'"), + renderPaneSource.indexOf("if (activeToolCenterPane.key === 'drivers')"), + ); + const driverSource = renderPaneSource.slice( + renderPaneSource.indexOf("if (activeToolCenterPane.key === 'drivers')"), + renderPaneSource.indexOf("if (activeToolCenterPane.key === 'snippet-settings')"), + ); + const snippetSource = renderPaneSource.slice( + renderPaneSource.indexOf("if (activeToolCenterPane.key === 'snippet-settings')"), + renderPaneSource.indexOf("if (activeToolCenterPane.key === 'shortcut-settings')"), + ); + const shortcutSource = renderPaneSource.slice( + renderPaneSource.indexOf("if (activeToolCenterPane.key === 'shortcut-settings')"), + renderPaneSource.indexOf('return null;', renderPaneSource.indexOf("if (activeToolCenterPane.key === 'shortcut-settings')")), + ); + + expect(appSource).toContain('activeToolCenterPaneItem?.title ?? activeToolCenterGroup.title'); + expect(connectionPackageSource).toContain(' { expect(appSource).toContain('onToggleAI={toggleAIPanel}'); expect(appSource).toContain('renderLegacyAIEdgeHandle'); diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 52d17a8..7221d62 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -3401,11 +3401,8 @@ function App() { , - t('app.data_root.title'), - t('app.data_root.description'), - )} + title={null} + closable={false} onCancel={closeToolCenterPane} footer={[