From e13983eb12a9ef73e07d43b7eab8bec505341ca9 Mon Sep 17 00:00:00 2001 From: Pierre Jacquier Date: Tue, 10 Jun 2025 12:37:45 -0400 Subject: [PATCH] Remove Linux from 2000 tests and guard linux in the app too --- e2e/playwright/share-link.spec.ts | 12 ++++++------ src/components/OpenInDesktopAppHandler.tsx | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/e2e/playwright/share-link.spec.ts b/e2e/playwright/share-link.spec.ts index ad0f8b414..73e19a862 100644 --- a/e2e/playwright/share-link.spec.ts +++ b/e2e/playwright/share-link.spec.ts @@ -20,10 +20,10 @@ function getToastError(page: Page) { test.describe('Share link tests', () => { test( - `Open in desktop app with 2000-long code doesn't show error on non-Windows`, - { tag: ['@web', '@macos', '@linux'] }, + `Open in desktop app with 2000-long code doesn't show error on macOS`, + { tag: ['@web', '@macos'] }, async ({ page }) => { - test.skip(process.platform === 'win32') + test.skip(process.platform === 'win32' || process.platform === 'linux') const codeLength = 2000 await navigateAndClickOpenInDesktopApp(page, codeLength) await expect(getToastError(page)).not.toBeVisible() @@ -31,10 +31,10 @@ test.describe('Share link tests', () => { ) test( - `Open in desktop app with 1000-long code works on Windows but not with 2000`, - { tag: ['@web', '@windows'] }, + `Open in desktop app with 1000-long code works on Windows and Linux but not with 2000`, + { tag: ['@web', '@windows', '@linux'] }, async ({ page }) => { - test.skip(process.platform !== 'win32') + test.skip(process.platform === 'darwin') let codeLength = 1000 await navigateAndClickOpenInDesktopApp(page, codeLength) await expect(getToastError(page)).not.toBeVisible() diff --git a/src/components/OpenInDesktopAppHandler.tsx b/src/components/OpenInDesktopAppHandler.tsx index 113ba7740..1c45d208c 100644 --- a/src/components/OpenInDesktopAppHandler.tsx +++ b/src/components/OpenInDesktopAppHandler.tsx @@ -56,9 +56,9 @@ export const OpenInDesktopAppHandler = (props: React.PropsWithChildren) => { // This 2046 value comes from https://issues.chromium.org/issues/41322340#comment3 // and empirical testing on Chrome and Windows 11 const MAX_URL_LENGTH = 2046 - if (platform() === 'windows' && newURL.length > MAX_URL_LENGTH) { + if (platform() !== 'macos' && newURL.length > MAX_URL_LENGTH) { toast.error( - 'The URL is too long to open in the desktop app on Windows. Try another platform or use the web app.' + 'The URL is too long to open in the desktop app on Windows or Linux. Try another platform or use the web app.' ) return }