23 lines
870 B
TypeScript
23 lines
870 B
TypeScript
|
|
import {
|
||
|
|
expect,
|
||
|
|
test,
|
||
|
|
} from './fixtures';
|
||
|
|
|
||
|
|
test.describe('font loading', () => {
|
||
|
|
test('selected fonts land in the FontFaceSet with status="loaded"', async ({ comparison }) => {
|
||
|
|
await comparison.pickPair('Inter', 'Roboto');
|
||
|
|
|
||
|
|
await expect.poll(() => comparison.fontLoaded('Inter')).toBe(true);
|
||
|
|
await expect.poll(() => comparison.fontLoaded('Roboto')).toBe(true);
|
||
|
|
});
|
||
|
|
|
||
|
|
test('an unrelated font remains absent from the FontFaceSet', async ({ comparison }) => {
|
||
|
|
await comparison.pickPair('Inter', 'Roboto');
|
||
|
|
|
||
|
|
// "Audiowide" is unlikely to be on the system AND was not selected, so
|
||
|
|
// no FontFace should ever have been registered for it. This guards
|
||
|
|
// against the loader over-fetching neighbouring fonts.
|
||
|
|
await expect.poll(() => comparison.fontLoaded('Audiowide')).toBe(false);
|
||
|
|
});
|
||
|
|
});
|