mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-08-13 01:54:20 +08:00
- 移除设置导航、详情页和 AI 配置列表的冗余分隔线 - 梳理外观字号项顺序并精简日志目录重复标题 - 恢复安全与上下文选项语义色,统一供应商操作按钮 - 强化 MCP 页签、客户端选中态和折叠交互 - 拆分推荐流程与内置工具视图并补齐六语回归测试
60 lines
1.6 KiB
TypeScript
60 lines
1.6 KiB
TypeScript
import { describe, expect, it } from 'vitest';
|
|
|
|
import {
|
|
PROVIDER_PRESET_CARD_BASE_STYLE,
|
|
PROVIDER_PRESET_CARD_CONTENT_STYLE,
|
|
PROVIDER_PRESET_CARD_DESCRIPTION_STYLE,
|
|
PROVIDER_PRESET_GRID_STYLE,
|
|
PROVIDER_PRESET_CARD_TITLE_STYLE,
|
|
} from './aiSettingsPresetLayout';
|
|
|
|
describe('ai settings preset layout', () => {
|
|
it('uses compact two-column rows instead of provider cards', () => {
|
|
expect(PROVIDER_PRESET_GRID_STYLE).toMatchObject({
|
|
display: 'grid',
|
|
gridTemplateColumns: 'repeat(2, minmax(0, 1fr))',
|
|
columnGap: 12,
|
|
rowGap: 2,
|
|
gridAutoRows: '58px',
|
|
alignItems: 'stretch',
|
|
});
|
|
});
|
|
|
|
it('stretches each provider choice to fill the row with only a subtle selection radius', () => {
|
|
expect(PROVIDER_PRESET_CARD_BASE_STYLE).toMatchObject({
|
|
display: 'flex',
|
|
alignItems: 'center',
|
|
gap: 10,
|
|
height: '100%',
|
|
minHeight: '58px',
|
|
overflow: 'hidden',
|
|
borderRadius: 4,
|
|
textAlign: 'left',
|
|
});
|
|
});
|
|
|
|
it('keeps the text column compact instead of pinning the description to the bottom', () => {
|
|
expect(PROVIDER_PRESET_CARD_CONTENT_STYLE).toMatchObject({
|
|
minWidth: 0,
|
|
flex: 1,
|
|
display: 'flex',
|
|
flexDirection: 'column',
|
|
});
|
|
|
|
expect(PROVIDER_PRESET_CARD_DESCRIPTION_STYLE).toMatchObject({
|
|
marginTop: 2,
|
|
display: '-webkit-box',
|
|
WebkitLineClamp: 1,
|
|
WebkitBoxOrient: 'vertical',
|
|
overflow: 'hidden',
|
|
});
|
|
|
|
expect(PROVIDER_PRESET_CARD_TITLE_STYLE).toMatchObject({
|
|
display: '-webkit-box',
|
|
WebkitLineClamp: 1,
|
|
WebkitBoxOrient: 'vertical',
|
|
overflow: 'hidden',
|
|
});
|
|
});
|
|
});
|