mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-10-09 15:58:34 +00:00
33 lines
872 B
TypeScript
33 lines
872 B
TypeScript
import test from 'node:test';
|
|
import assert from 'node:assert/strict';
|
|
import React from 'react';
|
|
import { renderToStaticMarkup } from 'react-dom/server';
|
|
|
|
import ChatInput from './ChatInput';
|
|
import { TooltipProvider } from '../ui/tooltip';
|
|
|
|
test('does not render a standalone slash command toolbar button', () => {
|
|
const html = renderToStaticMarkup(
|
|
<TooltipProvider>
|
|
<ChatInput
|
|
value=""
|
|
onChange={() => {}}
|
|
onSend={() => {}}
|
|
isStreaming={false}
|
|
disabled={false}
|
|
agentName="Catty Agent"
|
|
quickMessages={[{
|
|
id: 'qm-1',
|
|
slug: 'hello',
|
|
name: 'Hello',
|
|
description: 'Greeting',
|
|
content: 'Say hello',
|
|
}]}
|
|
/>
|
|
</TooltipProvider>,
|
|
);
|
|
|
|
assert.match(html, /textarea/);
|
|
assert.doesNotMatch(html, /aria-label="ai\.chat\.slashCommands"/);
|
|
});
|