Quick follow up on share link tests (#7401)
* pierremtb/adhoc-quick-sharelink-follow-up * Update snapshots * Update snapshots * Remove Linux from 2000 tests * Revert "Remove Linux from 2000 tests" This reverts commitad9bc58dd7
. * Remove Linux from 2000 tests and guard linux in the app too * Revert "Remove Linux from 2000 tests and guard linux in the app too" This reverts commite13983eb12
. * Break out test in two * Not * Add debug prints * Try to force userAgent in pw config * Revert "Try to force userAgent in pw config" This reverts commitd1e6d7c7be
. * Clean up * Add sad fix --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
@ -20,10 +20,21 @@ 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`,
|
||||
`Open in desktop app with 2000-long code works non-Windows`,
|
||||
{ tag: ['@web', '@macos', '@linux'] },
|
||||
async ({ page }) => {
|
||||
test.skip(process.platform === 'win32')
|
||||
const codeLength = 2000
|
||||
await navigateAndClickOpenInDesktopApp(page, codeLength)
|
||||
await expect(getToastError(page)).not.toBeVisible()
|
||||
}
|
||||
)
|
||||
|
||||
test(
|
||||
`Open in desktop app with 1000-long code works on Windows`,
|
||||
{ tag: ['@web', '@windows'] },
|
||||
async ({ page }) => {
|
||||
test.skip(process.platform !== 'win32')
|
||||
const codeLength = 1000
|
||||
await navigateAndClickOpenInDesktopApp(page, codeLength)
|
||||
await expect(getToastError(page)).not.toBeVisible()
|
||||
@ -31,15 +42,11 @@ test.describe('Share link tests', () => {
|
||||
)
|
||||
|
||||
test(
|
||||
`Open in desktop app with 1000-long code works on Windows but not with 2000`,
|
||||
`Open in desktop app with 2000-long code doesn't work on Windows`,
|
||||
{ tag: ['@web', '@windows'] },
|
||||
async ({ page }) => {
|
||||
test.skip(process.platform !== 'win32')
|
||||
let codeLength = 1000
|
||||
await navigateAndClickOpenInDesktopApp(page, codeLength)
|
||||
await expect(getToastError(page)).not.toBeVisible()
|
||||
|
||||
codeLength = 2000
|
||||
const codeLength = 2000
|
||||
await navigateAndClickOpenInDesktopApp(page, codeLength)
|
||||
await expect(getToastError(page)).toBeVisible()
|
||||
}
|
||||
|
@ -261,6 +261,9 @@ export function platform(): Platform {
|
||||
if (navigator.platform === 'Windows' || navigator.platform === 'Win32') {
|
||||
return 'windows'
|
||||
}
|
||||
if (navigator.platform?.indexOf('Linux') === 0) {
|
||||
return 'linux'
|
||||
}
|
||||
|
||||
// Chrome only, but more accurate than userAgent.
|
||||
let userAgentDataPlatform: unknown
|
||||
|
Reference in New Issue
Block a user