perf(renderer): 整体优化响应速度 — rAF 合并编辑器刷新/自动保存缓存/粒子引擎空闲自停
同时: 不透明窗口 + 精简主题(8到2)、TabBar 简化、图谱宽松布局、MoreActions 层级修复
This commit is contained in:
@@ -299,22 +299,15 @@ test('Graph: 控件+模式切换可用', async () => {
|
||||
await a.app.close();
|
||||
});
|
||||
|
||||
// === TabBar pin/close ===
|
||||
test('TabBar: 固定+关闭可用', async () => {
|
||||
// === TabBar close ===
|
||||
test('TabBar: 关闭标签可用(pin 点已移除)', async () => {
|
||||
const a = await launch(nodePath.join(os.tmpdir(), 'hn-tab-' + Date.now()));
|
||||
const { v } = await setupVault(a, [{ name: 'Tab1', body: 't1' }, { name: 'Tab2', body: 't2' }]);
|
||||
await a.page.getByTestId('filetree').getByText('Tab1').click();
|
||||
await a.page.waitForTimeout(300);
|
||||
await a.page.getByTestId('filetree').getByText('Tab2').click();
|
||||
await a.page.waitForTimeout(300);
|
||||
// 固定 Tab1(pin 按钮是 span[title="固定"]●)
|
||||
const tab1 = a.page.getByTestId('tabbar').locator('div').filter({ hasText: 'Tab1' }).first();
|
||||
await tab1.locator('span[title="固定"]').click();
|
||||
await a.page.waitForTimeout(300);
|
||||
// 取消固定
|
||||
await tab1.locator('span[title="取消固定"]').click();
|
||||
await a.page.waitForTimeout(300);
|
||||
// 关闭 Tab2(close 按钮是 span 文本 x)
|
||||
// 关闭 Tab2(close 按钮是 span 文本 x;pin 点按钮已按 UI 需求移除)
|
||||
const tab2 = a.page.getByTestId('tabbar').locator('div').filter({ hasText: 'Tab2' }).first();
|
||||
await tab2.locator('span').filter({ hasText: 'x' }).click();
|
||||
await a.page.waitForTimeout(300);
|
||||
@@ -354,4 +347,4 @@ test('OutlinePanel: 切换文档后大纲自动更新', async () => {
|
||||
await expect(a.page.locator('.outline-item', { hasText: 'Title B' })).toBeVisible({ timeout: 5000 });
|
||||
await expect(a.page.locator('.outline-item', { hasText: 'Deep B' })).toBeVisible({ timeout: 5000 });
|
||||
await a.app.close();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user