test: add e2e suite for core comparison flows
Adds 17 new specs across six files plus the supporting POM infrastructure: - fixtures with auto-opened comparison + typography helpers - TypographyMenu POM reading values from ComboControl aria-labels - ComparisonPage extended with side selection, font picking, slider-value reader, FontFaceSet inspection, storage snapshot - compare-flow: A/B selection, aria-pressed state, storage write - preview-text: input binding + slider character rendering - slider: keyboard ARIA contract (Arrow / Shift+Arrow / Page / Home / End) - font-loading: FontFaceSet contains selected, excludes unrelated - persistence: font selection + typography settings survive reload - typography: symmetric increase/decrease for all four controls
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
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);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user