Repository: gitify-app/gitify
Pull request #1379 (2024-07-14 09:07:46)

refactor: only open https external links
A better approach that preventing `file:///` links


Patch:
diff --git a/README.md b/README.md
index 74c9e7c8..6c27bacd 100644
--- a/README.md
+++ b/README.md
@@ -36,7 +36,7 @@ For more information, see [LICENSE](LICENSE).
 [github-releases]: https://github.com/gitify-app/gitify/releases/latest
 [github-website]: https://github.com/gitify-app/website
 [github-website-pulls]: https://github.com/gitify-app/website/pulls
-[brew]: http://brew.sh/
+[brew]: https://brew.sh/
 [homebrew-cask]: https://formulae.brew.sh/cask/gitify
 [coveralls]: https://coveralls.io/github/gitify-app/gitify
 [coveralls-badge]: https://img.shields.io/coverallsCoverage/github/gitify-app/gitify?logo=coveralls
diff --git a/entitlements/entitlements.mac.plist b/entitlements/entitlements.mac.plist
index 45632172..3e96a648 100644
--- a/entitlements/entitlements.mac.plist
+++ b/entitlements/entitlements.mac.plist
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "https://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
   <!-- As per https://github.com/electron-userland/electron-builder/blob/master/packages/app-builder-lib/templates/entitlements.mac.plist -->
   <dict>
diff --git a/src/components/NotificationRow.tsx b/src/components/NotificationRow.tsx
index 11f6749e..9d802f0f 100644
--- a/src/components/NotificationRow.tsx
+++ b/src/components/NotificationRow.tsx
@@ -101,7 +101,7 @@ export const NotificationRow: FC<INotificationRow> = ({
       </div>
 
       <div
-        className="flex-1 overflow-hidden overflow-ellipsis whitespace-nowrap cursor-pointer"
+        className="flex-1 truncate cursor-pointer"
         onClick={() => handleNotification()}
       >
         <NotificationHeader notification={notification} />
@@ -111,7 +111,7 @@ export const NotificationRow: FC<INotificationRow> = ({
           role="main"
           title={notificationTitle}
         >
-          {notification.subject.title}
+          <span className="truncate">{notification.subject.title}</span>
           <span
             className={cn(
               'text-xxs',
diff --git a/src/components/RepositoryNotifications.tsx b/src/components/RepositoryNotifications.tsx
index 7ea78c7e..c0d49d26 100644
--- a/src/components/RepositoryNotifications.tsx
+++ b/src/components/RepositoryNotifications.tsx
@@ -67,7 +67,7 @@ export const RepositoryNotifications: FC<IRepositoryNotifications> = ({
       >
         <div
           className={cn(
-            'flex flex-1 gap-4 items-center overflow-hidden overflow-ellipsis whitespace-nowrap text-sm font-medium',
+            'flex flex-1 gap-4 items-center truncate text-sm font-medium',
             Opacity.MEDIUM,
           )}
         >
diff --git a/src/components/fields/RadioGroup.tsx b/src/components/fields/RadioGroup.tsx
index e373af9b..8598abfc 100644
--- a/src/components/fields/RadioGroup.tsx
+++ b/src/components/fields/RadioGroup.tsx
@@ -1,11 +1,13 @@
 import type { ChangeEvent, FC, ReactNode } from 'react';
 import type { RadioGroupItem } from '../../types';
 import { cn } from '../../utils/cn';
+import { Tooltip } from './Tooltip';
 
 export interface IRadioGroup {
   name: string;
   label: string;
   helpText?: ReactNode | string;
+  tooltip?: ReactNode | string;
   options: RadioGroupItem[];
   value: string;
   disabled?: boolean;
@@ -26,6 +28,9 @@ export const RadioGroup: FC<IRadioGroup> = (props: IRadioGroup) => {
             }
           >
             {props.label}
+            {props.tooltip && (
+              <Tooltip name={`tooltip-${props.name}`} tooltip={props.tooltip} />
+            )}
           </label>
         </div>
 
diff --git a/src/components/icons/LogoIcon.tsx b/src/components/icons/LogoIcon.tsx
index 61af5184..0024278c 100644
--- a/src/components/icons/LogoIcon.tsx
+++ b/src/components/icons/LogoIcon.tsx
@@ -27,8 +27,8 @@ export const LogoIcon: FC<ILogoIcon> = ({
       size === Size.LARGE && 'size-16',
     )}
     onClick={() => onClick?.()}
-    xmlns="http://www.w3.org/2000/svg"
-    xmlnsXlink="http://www.w3.org/1999/xlink"
+    xmlns="https://www.w3.org/2000/svg"
+    xmlnsXlink="https://www.w3.org/1999/xlink"
     viewBox="0 0 500 500"
     role="img"
     aria-label="Gitify Logo"
diff --git a/src/utils/comms.ts b/src/utils/comms.ts
index e19bef00..936bc429 100644
--- a/src/utils/comms.ts
+++ b/src/utils/comms.ts
@@ -3,7 +3,7 @@ import type { Link } from '../types';
 import Constants from './constants';
 
 export function openExternalLink(url: Link): void {
-  if (!url.toLowerCase().startsWith('file:///')) {
+  if (url.toLowerCase().startsWith('https://')) {
     shell.openExternal(url);
   }
 }


Test patch:
diff --git a/src/components/__snapshots__/AccountNotifications.test.tsx.snap b/src/components/__snapshots__/AccountNotifications.test.tsx.snap
index 6a5364c5..a466615a 100644
--- a/src/components/__snapshots__/AccountNotifications.test.tsx.snap
+++ b/src/components/__snapshots__/AccountNotifications.test.tsx.snap
@@ -96,7 +96,7 @@ exports[`components/AccountNotifications.tsx should render itself (github.com wi
           </svg>
         </div>
         <div
-          class="flex-1 overflow-hidden overflow-ellipsis whitespace-nowrap cursor-pointer"
+          class="flex-1 truncate cursor-pointer"
         >
           <div
             class="mb-1 flex items-center gap-1 text-xs font-medium opacity-80"
@@ -120,7 +120,11 @@ exports[`components/AccountNotifications.tsx should render itself (github.com wi
             role="main"
             title="I am a robot and this is a test!"
           >
-            I am a robot and this is a test!
+            <span
+              class="truncate"
+            >
+              I am a robot and this is a test!
+            </span>
             <span
               class="text-xxs opacity-50"
             />
@@ -295,7 +299,7 @@ exports[`components/AccountNotifications.tsx should render itself (github.com wi
           </svg>
         </div>
         <div
-          class="flex-1 overflow-hidden overflow-ellipsis whitespace-nowrap cursor-pointer"
+          class="flex-1 truncate cursor-pointer"
         >
           <div
             class="mb-1 flex items-center gap-1 text-xs font-medium opacity-80"
@@ -319,7 +323,11 @@ exports[`components/AccountNotifications.tsx should render itself (github.com wi
             role="main"
             title="Improve the UI"
           >
-            Improve the UI
+            <span
+              class="truncate"
+            >
+              Improve the UI
+            </span>
             <span
               class="text-xxs opacity-50"
             />
@@ -520,7 +528,7 @@ exports[`components/AccountNotifications.tsx should render itself (github.com wi
         </svg>
       </div>
       <div
-        class="flex-1 overflow-hidden overflow-ellipsis whitespace-nowrap cursor-pointer"
+        class="flex-1 truncate cursor-pointer"
       >
         <div
           class="mb-1 flex items-center gap-1 text-xs font-medium opacity-80"
@@ -544,7 +552,11 @@ exports[`components/AccountNotifications.tsx should render itself (github.com wi
           role="main"
           title="I am a robot and this is a test!"
         >
-          I am a robot and this is a test!
+          <span
+            class="truncate"
+          >
+            I am a robot and this is a test!
+          </span>
           <span
             class="text-xxs opacity-50"
           />
@@ -719,7 +731,7 @@ exports[`components/AccountNotifications.tsx should render itself (github.com wi
         </svg>
       </div>
       <div
-        class="flex-1 overflow-hidden overflow-ellipsis whitespace-nowrap cursor-pointer"
+        class="flex-1 truncate cursor-pointer"
       >
         <div
           class="mb-1 flex items-center gap-1 text-xs font-medium opacity-80"
@@ -743,7 +755,11 @@ exports[`components/AccountNotifications.tsx should render itself (github.com wi
           role="main"
           title="Improve the UI"
         >
-          Improve the UI
+          <span
+            class="truncate"
+          >
+            Improve the UI
+          </span>
           <span
             class="text-xxs opacity-50"
           />
diff --git a/src/components/__snapshots__/NotificationRow.test.tsx.snap b/src/components/__snapshots__/NotificationRow.test.tsx.snap
index e51ae823..83c13cb3 100644
--- a/src/components/__snapshots__/NotificationRow.test.tsx.snap
+++ b/src/components/__snapshots__/NotificationRow.test.tsx.snap
@@ -33,7 +33,7 @@ exports[`components/NotificationRow.tsx should render itself & its children - gr
           </svg>
         </div>
         <div
-          class="flex-1 overflow-hidden overflow-ellipsis whitespace-nowrap cursor-pointer"
+          class="flex-1 truncate cursor-pointer"
         >
           <div
             class="mb-1 flex items-center gap-1 text-xs font-medium opacity-80"
@@ -57,7 +57,11 @@ exports[`components/NotificationRow.tsx should render itself & its children - gr
             role="main"
             title="I am a robot and this is a test!"
           >
-            I am a robot and this is a test!
+            <span
+              class="truncate"
+            >
+              I am a robot and this is a test!
+            </span>
             <span
               class="text-xxs opacity-50"
             />
@@ -235,7 +239,7 @@ exports[`components/NotificationRow.tsx should render itself & its children - gr
         </svg>
       </div>
       <div
-        class="flex-1 overflow-hidden overflow-ellipsis whitespace-nowrap cursor-pointer"
+        class="flex-1 truncate cursor-pointer"
       >
         <div
           class="mb-1 flex items-center gap-1 text-xs font-medium opacity-80"
@@ -259,7 +263,11 @@ exports[`components/NotificationRow.tsx should render itself & its children - gr
           role="main"
           title="I am a robot and this is a test!"
         >
-          I am a robot and this is a test!
+          <span
+            class="truncate"
+          >
+            I am a robot and this is a test!
+          </span>
           <span
             class="text-xxs opacity-50"
           />
@@ -494,14 +502,18 @@ exports[`components/NotificationRow.tsx should render itself & its children - gr
           </svg>
         </div>
         <div
-          class="flex-1 overflow-hidden overflow-ellipsis whitespace-nowrap cursor-pointer"
+          class="flex-1 truncate cursor-pointer"
         >
           <div
             class="flex gap-1 items-center mb-1 truncate text-sm"
             role="main"
             title="I am a robot and this is a test!"
           >
-            I am a robot and this is a test!
+            <span
+              class="truncate"
+            >
+              I am a robot and this is a test!
+            </span>
             <span
               class="text-xxs opacity-50"
             />
@@ -679,14 +691,18 @@ exports[`components/NotificationRow.tsx should render itself & its children - gr
         </svg>
       </div>
       <div
-        class="flex-1 overflow-hidden overflow-ellipsis whitespace-nowrap cursor-pointer"
+        class="flex-1 truncate cursor-pointer"
       >
         <div
           class="flex gap-1 items-center mb-1 truncate text-sm"
           role="main"
           title="I am a robot and this is a test!"
         >
-          I am a robot and this is a test!
+          <span
+            class="truncate"
+          >
+            I am a robot and this is a test!
+          </span>
           <span
             class="text-xxs opacity-50"
           />
@@ -921,14 +937,18 @@ exports[`components/NotificationRow.tsx should render itself & its children - hi
           </svg>
         </div>
         <div
-          class="flex-1 overflow-hidden overflow-ellipsis whitespace-nowrap cursor-pointer"
+          class="flex-1 truncate cursor-pointer"
         >
           <div
             class="flex gap-1 items-center mb-1 truncate text-sm"
             role="main"
             title="I am a robot and this is a test!"
           >
-            I am a robot and this is a test!
+            <span
+              class="truncate"
+            >
+              I am a robot and this is a test!
+            </span>
             <span
               class="text-xxs opacity-50 hidden"
             />
@@ -1106,14 +1126,18 @@ exports[`components/NotificationRow.tsx should render itself & its children - hi
         </svg>
       </div>
       <div
-        class="flex-1 overflow-hidden overflow-ellipsis whitespace-nowrap cursor-pointer"
+        class="flex-1 truncate cursor-pointer"
       >
         <div
           class="flex gap-1 items-center mb-1 truncate text-sm"
           role="main"
           title="I am a robot and this is a test!"
         >
-          I am a robot and this is a test!
+          <span
+            class="truncate"
+          >
+            I am a robot and this is a test!
+          </span>
           <span
             class="text-xxs opacity-50 hidden"
           />
diff --git a/src/components/__snapshots__/RepositoryNotifications.test.tsx.snap b/src/components/__snapshots__/RepositoryNotifications.test.tsx.snap
index 28840d6a..34fac98d 100644
--- a/src/components/__snapshots__/RepositoryNotifications.test.tsx.snap
+++ b/src/components/__snapshots__/RepositoryNotifications.test.tsx.snap
@@ -9,7 +9,7 @@ exports[`components/Repository.tsx should render itself & its children 1`] = `
         class="group flex justify-between bg-gray-100 px-3 py-1.5 dark:bg-gray-darker dark:text-white"
       >
         <div
-          class="flex flex-1 gap-4 items-center overflow-hidden overflow-ellipsis whitespace-nowrap text-sm font-medium opacity-80"
+          class="flex flex-1 gap-4 items-center truncate text-sm font-medium opacity-80"
         >
           <img
             alt="gitify-app/notifications-test's avatar"
@@ -103,7 +103,7 @@ exports[`components/Repository.tsx should render itself & its children 1`] = `
       class="group flex justify-between bg-gray-100 px-3 py-1.5 dark:bg-gray-darker dark:text-white"
     >
       <div
-        class="flex flex-1 gap-4 items-center overflow-hidden overflow-ellipsis whitespace-nowrap text-sm font-medium opacity-80"
+        class="flex flex-1 gap-4 items-center truncate text-sm font-medium opacity-80"
       >
         <img
           alt="gitify-app/notifications-test's avatar"
@@ -254,7 +254,7 @@ exports[`components/Repository.tsx should toggle account notifications visibilit
         class="group flex justify-between bg-gray-100 px-3 py-1.5 dark:bg-gray-darker dark:text-white"
       >
         <div
-          class="flex flex-1 gap-4 items-center overflow-hidden overflow-ellipsis whitespace-nowrap text-sm font-medium opacity-80"
+          class="flex flex-1 gap-4 items-center truncate text-sm font-medium opacity-80"
         >
           <svg
             aria-hidden="true"
@@ -350,7 +350,7 @@ exports[`components/Repository.tsx should toggle account notifications visibilit
         class="group flex justify-between bg-gray-100 px-3 py-1.5 dark:bg-gray-darker dark:text-white"
       >
         <div
-          class="flex flex-1 gap-4 items-center overflow-hidden overflow-ellipsis whitespace-nowrap text-sm font-medium opacity-80"
+          class="flex flex-1 gap-4 items-center truncate text-sm font-medium opacity-80"
         >
           <svg
             aria-hidden="true"
@@ -453,7 +453,7 @@ exports[`components/Repository.tsx should toggle account notifications visibilit
       class="group flex justify-between bg-gray-100 px-3 py-1.5 dark:bg-gray-darker dark:text-white"
     >
       <div
-        class="flex flex-1 gap-4 items-center overflow-hidden overflow-ellipsis whitespace-nowrap text-sm font-medium opacity-80"
+        class="flex flex-1 gap-4 items-center truncate text-sm font-medium opacity-80"
       >
         <svg
           aria-hidden="true"
@@ -613,7 +613,7 @@ exports[`components/Repository.tsx should use default repository icon when avata
         class="group flex justify-between bg-gray-100 px-3 py-1.5 dark:bg-gray-darker dark:text-white"
       >
         <div
-          class="flex flex-1 gap-4 items-center overflow-hidden overflow-ellipsis whitespace-nowrap text-sm font-medium opacity-80"
+          class="flex flex-1 gap-4 items-center truncate text-sm font-medium opacity-80"
         >
           <svg
             aria-hidden="true"
@@ -716,7 +716,7 @@ exports[`components/Repository.tsx should use default repository icon when avata
       class="group flex justify-between bg-gray-100 px-3 py-1.5 dark:bg-gray-darker dark:text-white"
     >
       <div
-        class="flex flex-1 gap-4 items-center overflow-hidden overflow-ellipsis whitespace-nowrap text-sm font-medium opacity-80"
+        class="flex flex-1 gap-4 items-center truncate text-sm font-medium opacity-80"
       >
         <svg
           aria-hidden="true"
diff --git a/src/components/__snapshots__/Sidebar.test.tsx.snap b/src/components/__snapshots__/Sidebar.test.tsx.snap
index 0af5dada..cb734fe1 100644
--- a/src/components/__snapshots__/Sidebar.test.tsx.snap
+++ b/src/components/__snapshots__/Sidebar.test.tsx.snap
@@ -22,8 +22,8 @@ exports[`components/Sidebar.tsx should render itself & its children (logged in)
               class="size-5"
               role="img"
               viewBox="0 0 500 500"
-              xmlns="http://www.w3.org/2000/svg"
-              xmlns:xlink="http://www.w3.org/1999/xlink"
+              xmlns="https://www.w3.org/2000/svg"
+              xmlns:xlink="https://www.w3.org/1999/xlink"
             >
               <defs>
                 <lineargradient
@@ -176,8 +176,8 @@ exports[`components/Sidebar.tsx should render itself & its children (logged in)
             class="size-5"
             role="img"
             viewBox="0 0 500 500"
-            xmlns="http://www.w3.org/2000/svg"
-            xmlns:xlink="http://www.w3.org/1999/xlink"
+            xmlns="https://www.w3.org/2000/svg"
+            xmlns:xlink="https://www.w3.org/1999/xlink"
           >
             <defs>
               <lineargradient
@@ -387,8 +387,8 @@ exports[`components/Sidebar.tsx should render itself & its children (logged out)
               class="size-5"
               role="img"
               viewBox="0 0 500 500"
-              xmlns="http://www.w3.org/2000/svg"
-              xmlns:xlink="http://www.w3.org/1999/xlink"
+              xmlns="https://www.w3.org/2000/svg"
+              xmlns:xlink="https://www.w3.org/1999/xlink"
             >
               <defs>
                 <lineargradient
@@ -541,8 +541,8 @@ exports[`components/Sidebar.tsx should render itself & its children (logged out)
             class="size-5"
             role="img"
             viewBox="0 0 500 500"
-            xmlns="http://www.w3.org/2000/svg"
-            xmlns:xlink="http://www.w3.org/1999/xlink"
+            xmlns="https://www.w3.org/2000/svg"
+            xmlns:xlink="https://www.w3.org/1999/xlink"
           >
             <defs>
               <lineargradient
diff --git a/src/components/icons/__snapshots__/LogoIcon.test.tsx.snap b/src/components/icons/__snapshots__/LogoIcon.test.tsx.snap
index c83b23ce..59880874 100644
--- a/src/components/icons/__snapshots__/LogoIcon.test.tsx.snap
+++ b/src/components/icons/__snapshots__/LogoIcon.test.tsx.snap
@@ -10,8 +10,8 @@ exports[`components/icons/LogoIcon.tsx renders correctly (dark) 1`] = `
         class="size-5"
         role="img"
         viewBox="0 0 500 500"
-        xmlns="http://www.w3.org/2000/svg"
-        xmlns:xlink="http://www.w3.org/1999/xlink"
+        xmlns="https://www.w3.org/2000/svg"
+        xmlns:xlink="https://www.w3.org/1999/xlink"
       >
         <defs>
           <lineargradient
@@ -57,8 +57,8 @@ exports[`components/icons/LogoIcon.tsx renders correctly (dark) 1`] = `
       class="size-5"
       role="img"
       viewBox="0 0 500 500"
-      xmlns="http://www.w3.org/2000/svg"
-      xmlns:xlink="http://www.w3.org/1999/xlink"
+      xmlns="https://www.w3.org/2000/svg"
+      xmlns:xlink="https://www.w3.org/1999/xlink"
     >
       <defs>
         <lineargradient
@@ -161,8 +161,8 @@ exports[`components/icons/LogoIcon.tsx renders correctly (light) 1`] = `
         class="size-5"
         role="img"
         viewBox="0 0 500 500"
-        xmlns="http://www.w3.org/2000/svg"
-        xmlns:xlink="http://www.w3.org/1999/xlink"
+        xmlns="https://www.w3.org/2000/svg"
+        xmlns:xlink="https://www.w3.org/1999/xlink"
       >
         <defs>
           <lineargradient
@@ -208,8 +208,8 @@ exports[`components/icons/LogoIcon.tsx renders correctly (light) 1`] = `
       class="size-5"
       role="img"
       viewBox="0 0 500 500"
-      xmlns="http://www.w3.org/2000/svg"
-      xmlns:xlink="http://www.w3.org/1999/xlink"
+      xmlns="https://www.w3.org/2000/svg"
+      xmlns:xlink="https://www.w3.org/1999/xlink"
     >
       <defs>
         <lineargradient
@@ -312,8 +312,8 @@ exports[`components/icons/LogoIcon.tsx should render large size 1`] = `
         class="size-16"
         role="img"
         viewBox="0 0 500 500"
-        xmlns="http://www.w3.org/2000/svg"
-        xmlns:xlink="http://www.w3.org/1999/xlink"
+        xmlns="https://www.w3.org/2000/svg"
+        xmlns:xlink="https://www.w3.org/1999/xlink"
       >
         <defs>
           <lineargradient
@@ -359,8 +359,8 @@ exports[`components/icons/LogoIcon.tsx should render large size 1`] = `
       class="size-16"
       role="img"
       viewBox="0 0 500 500"
-      xmlns="http://www.w3.org/2000/svg"
-      xmlns:xlink="http://www.w3.org/1999/xlink"
+      xmlns="https://www.w3.org/2000/svg"
+      xmlns:xlink="https://www.w3.org/1999/xlink"
     >
       <defs>
         <lineargradient
@@ -463,8 +463,8 @@ exports[`components/icons/LogoIcon.tsx should render medium size 1`] = `
         class="size-10"
         role="img"
         viewBox="0 0 500 500"
-        xmlns="http://www.w3.org/2000/svg"
-        xmlns:xlink="http://www.w3.org/1999/xlink"
+        xmlns="https://www.w3.org/2000/svg"
+        xmlns:xlink="https://www.w3.org/1999/xlink"
       >
         <defs>
           <lineargradient
@@ -510,8 +510,8 @@ exports[`components/icons/LogoIcon.tsx should render medium size 1`] = `
       class="size-10"
       role="img"
       viewBox="0 0 500 500"
-      xmlns="http://www.w3.org/2000/svg"
-      xmlns:xlink="http://www.w3.org/1999/xlink"
+      xmlns="https://www.w3.org/2000/svg"
+      xmlns:xlink="https://www.w3.org/1999/xlink"
     >
       <defs>
         <lineargradient
@@ -614,8 +614,8 @@ exports[`components/icons/LogoIcon.tsx should render small size 1`] = `
         class="size-5"
         role="img"
         viewBox="0 0 500 500"
-        xmlns="http://www.w3.org/2000/svg"
-        xmlns:xlink="http://www.w3.org/1999/xlink"
+        xmlns="https://www.w3.org/2000/svg"
+        xmlns:xlink="https://www.w3.org/1999/xlink"
       >
         <defs>
           <lineargradient
@@ -661,8 +661,8 @@ exports[`components/icons/LogoIcon.tsx should render small size 1`] = `
       class="size-5"
       role="img"
       viewBox="0 0 500 500"
-      xmlns="http://www.w3.org/2000/svg"
-      xmlns:xlink="http://www.w3.org/1999/xlink"
+      xmlns="https://www.w3.org/2000/svg"
+      xmlns:xlink="https://www.w3.org/1999/xlink"
     >
       <defs>
         <lineargradient
diff --git a/src/routes/Settings.test.tsx b/src/routes/Settings.test.tsx
index 23aaf202..7cfdcc55 100644
--- a/src/routes/Settings.test.tsx
+++ b/src/routes/Settings.test.tsx
@@ -1,7 +1,6 @@
 import { act, fireEvent, render, screen } from '@testing-library/react';
 import { MemoryRouter } from 'react-router-dom';
 import { mockAuth, mockSettings } from '../__mocks__/state-mocks';
-import { mockPlatform } from '../__mocks__/utils';
 import { AppContext } from '../context/App';
 import { SettingsRoute } from './Settings';
 
@@ -14,32 +13,13 @@ jest.mock('react-router-dom', () => ({
 }));
 
 describe('routes/Settings.tsx', () => {
-  let originalPlatform: NodeJS.Platform;
   const fetchNotifications = jest.fn();
   const resetSettings = jest.fn();
 
-  beforeAll(() => {
-    // Save the original platform value
-    originalPlatform = process.platform;
-    mockPlatform('darwin');
-  });
-
   afterEach(() => {
     jest.clearAllMocks();
   });
 
-  afterAll(() => {
-    // Restore the original platform value
-    Object.defineProperty(process, 'platform', {
-      value: originalPlatform,
-    });
-
-    // Restore the original node env value
-    Object.defineProperty(process, 'platform', {
-      value: originalPlatform,
-    });
-  });
-
   it('should render itself & its children', async () => {
     await act(async () => {
       render(
diff --git a/src/routes/__snapshots__/Login.test.tsx.snap b/src/routes/__snapshots__/Login.test.tsx.snap
index d40784a5..b50466a3 100644
--- a/src/routes/__snapshots__/Login.test.tsx.snap
+++ b/src/routes/__snapshots__/Login.test.tsx.snap
@@ -13,8 +13,8 @@ exports[`routes/Login.tsx should render itself & its children 1`] = `
           class="size-16"
           role="img"
           viewBox="0 0 500 500"
-          xmlns="http://www.w3.org/2000/svg"
-          xmlns:xlink="http://www.w3.org/1999/xlink"
+          xmlns="https://www.w3.org/2000/svg"
+          xmlns:xlink="https://www.w3.org/1999/xlink"
         >
           <defs>
             <lineargradient
@@ -118,8 +118,8 @@ exports[`routes/Login.tsx should render itself & its children 1`] = `
         class="size-16"
         role="img"
         viewBox="0 0 500 500"
-        xmlns="http://www.w3.org/2000/svg"
-        xmlns:xlink="http://www.w3.org/1999/xlink"
+        xmlns="https://www.w3.org/2000/svg"
+        xmlns:xlink="https://www.w3.org/1999/xlink"
       >
         <defs>
           <lineargradient
diff --git a/src/utils/auth/utils.test.ts b/src/utils/auth/utils.test.ts
index 96c1ebf6..bb8f2264 100644
--- a/src/utils/auth/utils.test.ts
+++ b/src/utils/auth/utils.test.ts
@@ -33,7 +33,7 @@ describe('utils/auth/utils.ts', () => {
       ).mockImplementation((event, callback): void => {
         if (event === 'will-redirect') {
           const event = new Event('will-redirect');
-          callback(event, 'http://github.com/?code=123-456');
+          callback(event, 'https://github.com/?code=123-456');
         }
       });
 
@@ -59,7 +59,7 @@ describe('utils/auth/utils.ts', () => {
       ).mockImplementation((event, callback): void => {
         if (event === 'will-redirect') {
           const event = new Event('will-redirect');
-          callback(event, 'http://www.github.com/?error=Oops');
+          callback(event, 'https://www.github.com/?error=Oops');
         }
       });
 
diff --git a/src/utils/comms.test.ts b/src/utils/comms.test.ts
index 0bde2bf6..45ba3024 100644
--- a/src/utils/comms.test.ts
+++ b/src/utils/comms.test.ts
@@ -59,9 +59,9 @@ describe('utils/comms.ts', () => {
   });
 
   it('should open an external link', () => {
-    openExternalLink('http://www.gitify.io/' as Link);
+    openExternalLink('https://www.gitify.io/' as Link);
     expect(shell.openExternal).toHaveBeenCalledTimes(1);
-    expect(shell.openExternal).toHaveBeenCalledWith('http://www.gitify.io/');
+    expect(shell.openExternal).toHaveBeenCalledWith('https://www.gitify.io/');
   });
 
   it('should ignore opening external local links file:///', () => {