test(bidi): unskip or add expectations to some tests that work with BiDi (#37475)

This commit is contained in:
Holger Benl 2025-09-19 02:09:19 +02:00 committed by GitHub
parent 757c9cfa45
commit cb3d18da7b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 8 additions and 6 deletions

View File

@ -105,7 +105,7 @@ it('should fire events in proper order', async ({ context, server }) => {
});
it('should not fire events for favicon or favicon redirects', async ({ context, page, server, browserName, channel, headless }) => {
it.skip(headless && browserName !== 'firefox', 'headless browsers, except firefox, do not request favicons');
it.skip(headless && browserName !== 'firefox' && browserName as any !== '_bidiFirefox', 'headless browsers, except firefox, do not request favicons');
it.skip(!headless && browserName === 'webkit' && !channel, 'headed webkit does not have a favicon feature');
const favicon = `/no-cache/favicon.ico`;
const hashedFaviconUrl = `/favicon-hashed.ico`;

View File

@ -18,7 +18,7 @@
import { contextTest as it } from '../config/browserTest';
it('should load svg favicon with prefer-color-scheme', async ({ page, server, browserName, channel, headless, asset }) => {
it.skip(headless && browserName !== 'firefox', 'headless browsers, except firefox, do not request favicons');
it.skip(headless && browserName !== 'firefox' && browserName as any !== '_bidiFirefox', 'headless browsers, except firefox, do not request favicons');
it.skip(!headless && browserName === 'webkit' && !channel, 'headed webkit does not have a favicon feature');
// Browsers aggressively cache favicons, so force bust with the

View File

@ -699,7 +699,7 @@ it('should contain http2 for http2 requests', async ({ contextFactory }, testInf
});
it('should filter favicon and favicon redirects', async ({ server, browserName, channel, headless, asset, contextFactory }, testInfo) => {
it.skip(headless && browserName !== 'firefox', 'headless browsers, except firefox, do not request favicons');
it.skip(headless && browserName !== 'firefox' && browserName as any !== '_bidiFirefox', 'headless browsers, except firefox, do not request favicons');
it.skip(!headless && browserName === 'webkit' && !channel, 'headed webkit does not have a favicon feature');
const { page, getLog } = await pageWithHar(contextFactory, testInfo);

View File

@ -199,7 +199,9 @@ it('should use object previews for errors', async ({ page, browserName }) => {
await page.evaluate(() => console.log(new Error('Exception')));
if (browserName === 'chromium')
expect(text).toContain('.evaluate');
if (browserName === 'webkit')
if (browserName as any === '_bidiChromium')
expect(text).toEqual('error');
if (browserName === 'webkit' || browserName as any === '_bidiFirefox')
expect(text).toEqual('Error: Exception');
if (browserName === 'firefox')
expect(text).toEqual('Error');

View File

@ -634,11 +634,11 @@ it('should support cors with GET', async ({ page, server, browserName }) => {
const response = await fetch('https://example.com/cars?reject', { mode: 'cors' });
return response.json();
}).catch(e => e);
if (browserName === 'chromium')
if (browserName === 'chromium' || browserName === '_bidiChromium')
expect(error.message).toContain('Failed');
if (browserName === 'webkit')
expect(error.message).toContain('TypeError');
if (browserName === 'firefox')
if (browserName === 'firefox' || browserName === '_bidiFirefox')
expect(error.message).toContain('NetworkError');
}
});