2025-12-04 11:06:33 +01:00
|
|
|
// wxFontEnumerator Tests - Local Font Access API integration
|
2026-07-07 10:50:24 +02:00
|
|
|
import { test, expect, waitForWxApp } from './utils/fixtures';
|
|
|
|
|
import { stableShot } from './utils/element-tracker';
|
2025-12-04 11:06:33 +01:00
|
|
|
|
|
|
|
|
test.describe('wxFontEnumerator Tests', () => {
|
|
|
|
|
|
|
|
|
|
test('Font enumeration renders correctly', async ({ page, testLogger }) => {
|
|
|
|
|
await page.goto('/standalone/fontenum/fontenum_test.html');
|
2026-07-07 10:50:24 +02:00
|
|
|
await waitForWxApp(page);
|
2025-12-04 11:06:33 +01:00
|
|
|
|
2026-07-07 10:50:24 +02:00
|
|
|
// Font enumeration auto-runs on startup (CallAfter). It renders a static
|
|
|
|
|
// list/preview once done; stableShot's stabilization replaces the
|
|
|
|
|
// fixed 3s settle and asserts the rendered result deterministically.
|
|
|
|
|
await stableShot(page, 'fontenum.png', { fullPage: true });
|
2025-12-04 11:06:33 +01:00
|
|
|
|
|
|
|
|
expect(testLogger.errors.filter(e => !e.includes('favicon'))).toHaveLength(0);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
});
|