|
|
|
@ -25,6 +25,7 @@ import { defineUixServices } from './services';
|
|
|
|
import type { LangNode } from '$libs/langs';
|
|
|
|
import type { LangNode } from '$libs/langs';
|
|
|
|
import { standardPrefsDimensions } from '$prefs';
|
|
|
|
import { standardPrefsDimensions } from '$prefs';
|
|
|
|
import { _resetMorfoRegistryForTesting, registerMorfo, v, type Morfo } from '$uix/morfo';
|
|
|
|
import { _resetMorfoRegistryForTesting, registerMorfo, v, type Morfo } from '$uix/morfo';
|
|
|
|
|
|
|
|
import { fileUploadMorfo } from '$uix/morfo/components/file-upload';
|
|
|
|
|
|
|
|
|
|
|
|
const minimalLang = { schema: {} satisfies LangNode, defaultLocale: 'es' as const };
|
|
|
|
const minimalLang = { schema: {} satisfies LangNode, defaultLocale: 'es' as const };
|
|
|
|
const bilingualPrefs = standardPrefsDimensions({
|
|
|
|
const bilingualPrefs = standardPrefsDimensions({
|
|
|
|
@ -117,7 +118,6 @@ describe('createActiveUix (standalone)', () => {
|
|
|
|
const out = uix.langs.t('components.dialog.content.roledescription');
|
|
|
|
const out = uix.langs.t('components.dialog.content.roledescription');
|
|
|
|
expect(typeof out).toBe('string');
|
|
|
|
expect(typeof out).toBe('string');
|
|
|
|
expect(out.length).toBeGreaterThan(0);
|
|
|
|
expect(out.length).toBeGreaterThan(0);
|
|
|
|
expect(uix.langs.t('components.file-upload.dropzone')).toBe('Subir archivos');
|
|
|
|
|
|
|
|
expect(uix.langs.t('components.calendar.prev-month')).toBe('Mes anterior');
|
|
|
|
expect(uix.langs.t('components.calendar.prev-month')).toBe('Mes anterior');
|
|
|
|
expect(uix.langs.t('components.range-calendar.range-start')).toBe('inicio del rango');
|
|
|
|
expect(uix.langs.t('components.range-calendar.range-start')).toBe('inicio del rango');
|
|
|
|
expect(uix.langs.t('components.rating-group.value-text', { value: 3, max: 5 })).toBe('3 de 5');
|
|
|
|
expect(uix.langs.t('components.rating-group.value-text', { value: 3, max: 5 })).toBe('3 de 5');
|
|
|
|
@ -182,6 +182,10 @@ describe('createActiveUix (standalone)', () => {
|
|
|
|
} satisfies Morfo);
|
|
|
|
} satisfies Morfo);
|
|
|
|
|
|
|
|
|
|
|
|
expect(uix.langs.t('components.lazy-sample.label')).toBe('Muestra diferida');
|
|
|
|
expect(uix.langs.t('components.lazy-sample.label')).toBe('Muestra diferida');
|
|
|
|
|
|
|
|
registerMorfo(fileUploadMorfo);
|
|
|
|
|
|
|
|
expect(uix.langs.t('components.file-upload.dropzone')).toBe('Subir archivos');
|
|
|
|
|
|
|
|
expect(uix.langs.t('components.file-upload.list')).toBe('Archivos seleccionados');
|
|
|
|
|
|
|
|
expect(uix.langs.ts('#?common.buttons.clear|Clear all')).toBe('Limpiar todo');
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
uix.dispose();
|
|
|
|
uix.dispose();
|
|
|
|
_resetMorfoRegistryForTesting();
|
|
|
|
_resetMorfoRegistryForTesting();
|
|
|
|
|