🐛 fix(workbench): 修复结果区切换与对象设计字段定义

- 修复手动隐藏结果区后快捷键无法再次显示的问题

- 补全 Dameng/Oracle-like 字段长度、精度和可空标识

- 增加 SQL 编辑器、字段元数据和对象设计回归测试
This commit is contained in:
Syngnat
2026-06-10 15:51:03 +08:00
parent 1d1d8d21cd
commit c9d0bce153
8 changed files with 244 additions and 15 deletions

View File

@@ -741,6 +741,15 @@ describe('QueryEditor external SQL save', () => {
});
expect(textContent(renderer.toJSON())).not.toContain('等待执行 SQL');
const FakeNode = class {};
const bodyNode = new FakeNode();
const documentElement = new FakeNode();
vi.stubGlobal('Node', FakeNode);
vi.stubGlobal('document', {
body: bodyNode,
documentElement,
});
editorState.hasTextFocus = false;
const isMacRuntime = /(Mac|iPhone|iPad|iPod)/i.test(`${navigator.platform || ''} ${navigator.userAgent || ''}`);
const toggleEvent = {
ctrlKey: !isMacRuntime,
@@ -748,7 +757,7 @@ describe('QueryEditor external SQL save', () => {
altKey: false,
shiftKey: true,
key: 'm',
target: null,
target: bodyNode,
preventDefault: vi.fn(),
stopPropagation: vi.fn(),
};