Files
frontend-svelte/e2e/preview-text.test.ts
T
Ilia Mashkov eafe89b313
Workflow / build (pull_request) Successful in 1m16s
Workflow / e2e (pull_request) Successful in 1m11s
Workflow / publish (pull_request) Has been skipped
test: change old test to work with new grapheme split mechanism
2026-06-03 12:50:03 +03:00

22 lines
752 B
TypeScript

import {
expect,
test,
} from './fixtures';
test.describe('preview text', () => {
test('drives the slider character rendering', async ({ comparison }) => {
await comparison.pickPair('Inter', 'Roboto');
await comparison.setPreviewText('Sphinx');
// Window chars render as `.char-wrap` cells for crossfade.
// With WINDOW_SIZE=5, "Sphinx" (6 chars) fits 5 in the window.
await expect(comparison.slider.locator('.char-wrap')).toHaveCount(5);
});
test('preserves the typed value in the input', async ({ comparison }) => {
const text = 'Sphinx of black quartz';
await comparison.setPreviewText(text);
await expect(comparison.previewInput).toHaveValue(text);
});
});