Remove Linux from 2000 tests and guard linux in the app too
This commit is contained in:
@ -20,10 +20,10 @@ function getToastError(page: Page) {
|
|||||||
|
|
||||||
test.describe('Share link tests', () => {
|
test.describe('Share link tests', () => {
|
||||||
test(
|
test(
|
||||||
`Open in desktop app with 2000-long code doesn't show error on non-Windows`,
|
`Open in desktop app with 2000-long code doesn't show error on macOS`,
|
||||||
{ tag: ['@web', '@macos', '@linux'] },
|
{ tag: ['@web', '@macos'] },
|
||||||
async ({ page }) => {
|
async ({ page }) => {
|
||||||
test.skip(process.platform === 'win32')
|
test.skip(process.platform === 'win32' || process.platform === 'linux')
|
||||||
const codeLength = 2000
|
const codeLength = 2000
|
||||||
await navigateAndClickOpenInDesktopApp(page, codeLength)
|
await navigateAndClickOpenInDesktopApp(page, codeLength)
|
||||||
await expect(getToastError(page)).not.toBeVisible()
|
await expect(getToastError(page)).not.toBeVisible()
|
||||||
@ -31,10 +31,10 @@ test.describe('Share link tests', () => {
|
|||||||
)
|
)
|
||||||
|
|
||||||
test(
|
test(
|
||||||
`Open in desktop app with 1000-long code works on Windows but not with 2000`,
|
`Open in desktop app with 1000-long code works on Windows and Linux but not with 2000`,
|
||||||
{ tag: ['@web', '@windows'] },
|
{ tag: ['@web', '@windows', '@linux'] },
|
||||||
async ({ page }) => {
|
async ({ page }) => {
|
||||||
test.skip(process.platform !== 'win32')
|
test.skip(process.platform === 'darwin')
|
||||||
let codeLength = 1000
|
let codeLength = 1000
|
||||||
await navigateAndClickOpenInDesktopApp(page, codeLength)
|
await navigateAndClickOpenInDesktopApp(page, codeLength)
|
||||||
await expect(getToastError(page)).not.toBeVisible()
|
await expect(getToastError(page)).not.toBeVisible()
|
||||||
|
@ -56,9 +56,9 @@ export const OpenInDesktopAppHandler = (props: React.PropsWithChildren) => {
|
|||||||
// This 2046 value comes from https://issues.chromium.org/issues/41322340#comment3
|
// This 2046 value comes from https://issues.chromium.org/issues/41322340#comment3
|
||||||
// and empirical testing on Chrome and Windows 11
|
// and empirical testing on Chrome and Windows 11
|
||||||
const MAX_URL_LENGTH = 2046
|
const MAX_URL_LENGTH = 2046
|
||||||
if (platform() === 'windows' && newURL.length > MAX_URL_LENGTH) {
|
if (platform() !== 'macos' && newURL.length > MAX_URL_LENGTH) {
|
||||||
toast.error(
|
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
|
return
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user