完善客户端模块与工作区能力
Some checks failed
Electron E2E / Electron E2E (macos-latest) (push) Has been cancelled
Electron E2E / Electron E2E (ubuntu-latest) (push) Has been cancelled
Electron E2E / Electron E2E (windows-latest) (push) Has been cancelled

This commit is contained in:
inman
2026-08-13 19:45:30 +08:00
parent 0148b91a15
commit 22add3f01f
97 changed files with 4756 additions and 3226 deletions

View File

@@ -94,6 +94,30 @@ describe('TitleBar platform behavior', () => {
expect(screen.queryByTestId('titlebar-project-context')).not.toBeInTheDocument();
});
it('renders the painting title bar as a transparent overlay with the logo at the window edge', () => {
window.electron.platform = 'darwin';
render(<TitleBar integrated overlay />);
expect(screen.getByTestId('product-titlebar')).toHaveClass(
'absolute',
'inset-x-0',
'top-0',
'pointer-events-none',
'bg-transparent',
);
expect(screen.getByTestId('product-titlebar')).not.toHaveClass('border-b', 'glass-surface');
expect(screen.getByTestId('titlebar-main-surface')).toHaveClass(
'pointer-events-none',
'border-b-0',
'bg-transparent',
);
expect(screen.getByTestId('titlebar-logo')).toHaveClass('bg-transparent');
expect(screen.getByTestId('titlebar-logo')).toHaveStyle({ right: '0px' });
expect(screen.getByTestId('titlebar-logo').querySelector('img')).toHaveClass('mix-blend-multiply');
expect(screen.queryByTestId('titlebar-project-context')).not.toBeInTheDocument();
});
it('previews the collapsed sidebar on hover and pins it on click', () => {
window.electron.platform = 'darwin';
useSettingsStore.setState({ sidebarCollapsed: true });