mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-07-28 09:18:38 +08:00
- 数据同步:新增表结构比对、数据比对两个独立工具入口 - 比对模式:为 DataSyncModal 增加只读入口展示与模式化文案 - OceanBase:Oracle 租户改用 OB Oracle 专用 MySQL-wire 连接路径 - 连接表单:允许 OceanBase Oracle Service Name 留空,仅 TNS 场景需要填写 - 驱动提示:revision 不匹配提示收敛到驱动管理,不再在普通数据源入口弹出 - 测试覆盖:补充数据比对入口、OceanBase Oracle、driver-agent 提示边界测试
33 lines
1.3 KiB
TypeScript
33 lines
1.3 KiB
TypeScript
import { describe, expect, it } from 'vitest';
|
|
|
|
import { resolveDataSyncEntryModePresentation } from './dataSyncEntryMode';
|
|
|
|
describe('resolveDataSyncEntryModePresentation', () => {
|
|
it('marks schema compare as a read-only independent entry', () => {
|
|
const presentation = resolveDataSyncEntryModePresentation('schemaCompare');
|
|
|
|
expect(presentation.title).toBe('表结构比对');
|
|
expect(presentation.analyzeButtonText).toBe('开始比对');
|
|
expect(presentation.badgeText).toBe('结构比对');
|
|
expect(presentation.readOnly).toBe(true);
|
|
});
|
|
|
|
it('marks data compare as a read-only independent entry', () => {
|
|
const presentation = resolveDataSyncEntryModePresentation('dataCompare');
|
|
|
|
expect(presentation.title).toBe('数据比对');
|
|
expect(presentation.tableSelectLabel).toContain('比对数据');
|
|
expect(presentation.badgeText).toBe('数据比对');
|
|
expect(presentation.readOnly).toBe(true);
|
|
});
|
|
|
|
it('keeps the original sync entry writable', () => {
|
|
const presentation = resolveDataSyncEntryModePresentation('sync');
|
|
|
|
expect(presentation.title).toBe('数据同步工作台');
|
|
expect(presentation.analyzeButtonText).toBe('对比差异');
|
|
expect(presentation.badgeText).toBe('同步模式');
|
|
expect(presentation.readOnly).toBe(false);
|
|
});
|
|
});
|