mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-05 15:44:28 +00:00
feat(settings): add team appearance setting to hide agent features (#411)
* feat(settings): add team appearance setting to hide agent features Add an Appearance subpage under Team Settings allowing team owners to toggle appearance.hideAgent for the team. Return appearance.hideAgent in the user-metadata API, and conditionally hide the AGENTS.md button, agent chatbot sidebar, and chatbot trigger button in the WebUI. * refactor(settings): add strongly typed TeamSettingsResponse to remove explicit any Introduce TeamSettingsResponse and TeamAppearanceSettings in @shumai/dtos, type TeamService.getSettings and updateSettings, and eliminate the explicit any cast in AppearanceSettings.tsx.
This commit is contained in:
@@ -123,4 +123,25 @@ describe('BreadcrumbNav component', () => {
|
||||
|
||||
expect(screen.getByRole('button', { name: /Show omitted folders/i })).toBeDefined()
|
||||
})
|
||||
|
||||
it('renders chatbot toggle button when onChatbotToggle is provided', () => {
|
||||
const onChatbotToggle = vi.fn()
|
||||
const { container } = render(
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<BreadcrumbNav {...baseProps} onChatbotToggle={onChatbotToggle} />
|
||||
</QueryClientProvider>,
|
||||
)
|
||||
|
||||
expect(container.querySelector('.lucide-bot')).not.toBeNull()
|
||||
})
|
||||
|
||||
it('does not render chatbot toggle button when onChatbotToggle is undefined', () => {
|
||||
const { container } = render(
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<BreadcrumbNav {...baseProps} onChatbotToggle={undefined} />
|
||||
</QueryClientProvider>,
|
||||
)
|
||||
|
||||
expect(container.querySelector('.lucide-bot')).toBeNull()
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user