Remove Linux from 2000 tests and guard linux in the app too

This commit is contained in:
Pierre Jacquier
2025-06-10 12:37:45 -04:00
parent 81202f04a4
commit e13983eb12
2 changed files with 8 additions and 8 deletions

View File

@ -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()

View File

@ -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
}