diff --git a/packages/playwright-core/src/utils/registry.ts b/packages/playwright-core/src/utils/registry.ts index 33cbd34c64..7d4e42dce4 100644 --- a/packages/playwright-core/src/utils/registry.ts +++ b/packages/playwright-core/src/utils/registry.ts @@ -263,7 +263,7 @@ export class Registry { const descriptors = readDescriptors(browsersJSON); const findExecutablePath = (dir: string, name: keyof typeof EXECUTABLE_PATHS) => { let tokens = undefined; - if (hostPlatform.startsWith('ubuntu')) + if (hostPlatform.startsWith('ubuntu') || hostPlatform.startsWith('generic-linux')) tokens = EXECUTABLE_PATHS[name]['linux']; else if (hostPlatform.startsWith('mac')) tokens = EXECUTABLE_PATHS[name]['mac']; diff --git a/tests/library/global-fetch.spec.ts b/tests/library/global-fetch.spec.ts index e86a56bc92..8c1647a42a 100644 --- a/tests/library/global-fetch.spec.ts +++ b/tests/library/global-fetch.spec.ts @@ -192,7 +192,9 @@ it('should set playwright as user-agent', async ({ playwright, server, isWindows if (isWindows) expect(userAgentMasked).toBe('Playwright/X.X.X (; windows X.X) node/X.X'); else if (isLinux) - expect(userAgentMasked).toBe('Playwright/X.X.X (; ubuntu X.X) node/X.X'); + // on ubuntu: distro is 'ubuntu' and version is 'X.X' + // on manjaro: distro is 'Manjaro' and version is 'unknown' + expect(userAgentMasked.replace(/; \w+ [^)]+/, '; distro version')).toBe('Playwright/X.X.X (; distro version) node/X.X'); else if (isMac) expect(userAgentMasked).toBe('Playwright/X.X.X (; macOS X.X) node/X.X'); });