test: adjust bidi browser name in browsertype-connect.spec (#34758)

This commit is contained in:
Yury Semikhatsky 2025-02-12 18:04:42 -08:00 committed by GitHub
parent e697b1a663
commit bab197b493
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -258,7 +258,9 @@ for (const kind of ['launchServer', 'run-server'] as const) {
}).catch(() => {})
]);
expect(request.headers['user-agent']).toBe(getUserAgent());
expect(request.headers['x-playwright-browser']).toBe(browserName);
// _bidiFirefox and _bidiChromium are initialized with 'bidi' as browser name.
const bidiAwareBrowserName = browserName.startsWith('_bidi') ? 'bidi' : browserName;
expect(request.headers['x-playwright-browser']).toBe(bidiAwareBrowserName);
expect(request.headers['foo']).toBe('bar');
});