diff --git a/src/components/Logo.tsx b/src/components/Logo.tsx index 3afa0ffd4..1193ba820 100644 --- a/src/components/Logo.tsx +++ b/src/components/Logo.tsx @@ -12,7 +12,7 @@ const LIGHT_GRADIENT_END = '#FFFFFF'; const DARK_GRADIENT_START = '#22283B'; const DARK_GRADIENT_END = '#555B6E'; -export const Logo = ({ isDark, onClick, className = '' }: IProps) => ( +export const Logo = ({ isDark, onClick, className = '', ...props }: IProps) => ( onClick && onClick()} @@ -20,6 +20,7 @@ export const Logo = ({ isDark, onClick, className = '' }: IProps) => ( xmlnsXlink="http://www.w3.org/1999/xlink" viewBox="0 0 500 500" role="logo" + {...props} > { ); }); + it('should quit the app', () => { + const { getByLabelText } = render( + + + + + + ); + fireEvent.click(getByLabelText('Quit App')); + expect(ipcRenderer.send).toHaveBeenCalledTimes(1); + expect(ipcRenderer.send).toHaveBeenCalledWith('app-quit'); + }); + + it('should open the gitify repository', () => { + render( + + + + + + ); + fireEvent.click(screen.getByTestId('gitify-logo')); + expect(shell.openExternal).toHaveBeenCalledTimes(1); + expect(shell.openExternal).toHaveBeenCalledWith( + 'https://github.com/gitify-app/gitify' + ); + }); + describe('should render the notifications icon', () => { it('when there are 0 notifications', () => { const { getByLabelText } = render( diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx index c0a404e15..c5cf4e712 100644 --- a/src/components/Sidebar.tsx +++ b/src/components/Sidebar.tsx @@ -43,6 +43,7 @@ export const Sidebar: React.FC = () => {
diff --git a/src/components/__snapshots__/Sidebar.test.tsx.snap b/src/components/__snapshots__/Sidebar.test.tsx.snap index 682ebbb10..5ff88d128 100644 --- a/src/components/__snapshots__/Sidebar.test.tsx.snap +++ b/src/components/__snapshots__/Sidebar.test.tsx.snap @@ -9,6 +9,7 @@ exports[`components/Sidebar.tsx should render itself & its children (logged in) >