fix(titlebar): reserve Windows window controls for logo
This commit is contained in:
@@ -188,14 +188,15 @@ describe('TitleBar platform behavior', () => {
|
||||
expect(onSidebarPeekChange).toHaveBeenNthCalledWith(2, false, 'titlebar');
|
||||
});
|
||||
|
||||
it('renders custom controls on Windows', async () => {
|
||||
it('renders custom controls and reserves their space on Windows', async () => {
|
||||
window.electron.platform = 'win32';
|
||||
|
||||
render(<TitleBar />);
|
||||
render(<TitleBar integrated />);
|
||||
|
||||
expect(screen.getByTitle('Minimize')).toBeInTheDocument();
|
||||
expect(screen.getByTitle('Maximize')).toBeInTheDocument();
|
||||
expect(screen.getByTitle('Close')).toBeInTheDocument();
|
||||
expect(screen.getByTestId('titlebar-logo')).toHaveStyle({ right: '148px' });
|
||||
|
||||
await waitFor(() => {
|
||||
expect(invokeIpcMock).toHaveBeenCalledWith('window:isMaximized');
|
||||
|
||||
Reference in New Issue
Block a user