2026-05-12 09:27:22 +03:00
|
|
|
import { describe, it, expect } from 'vitest';
|
|
|
|
|
import { vuetify } from '../../resources/js/plugins/vuetify';
|
|
|
|
|
|
|
|
|
|
describe('Vuetify theme — liderraForest', () => {
|
|
|
|
|
const theme = vuetify.theme.themes.value.liderraForest;
|
|
|
|
|
|
|
|
|
|
it.each([
|
|
|
|
|
['primary', '#0F6E56'],
|
|
|
|
|
['secondary', '#012019'],
|
|
|
|
|
['background', '#F6F3EC'],
|
|
|
|
|
['surface', '#FFFFFF'],
|
|
|
|
|
['success', '#2E8B57'],
|
|
|
|
|
['warning', '#D9A441'],
|
|
|
|
|
['error', '#B83A3A'],
|
|
|
|
|
['info', '#3F7C95'],
|
|
|
|
|
['liderra-plum', '#7A5BA3'],
|
|
|
|
|
['liderra-salmon', '#CC6E50'],
|
|
|
|
|
['liderra-teal-deep', '#0A5A47'],
|
|
|
|
|
['liderra-muted', '#6B6356'],
|
|
|
|
|
])('color %s = %s', (key, value) => {
|
|
|
|
|
expect(theme.colors[key]?.toUpperCase()).toBe(value.toUpperCase());
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
describe('Vuetify global defaults', () => {
|
|
|
|
|
it('VBtn defaults to flat variant', () => {
|
2026-05-12 20:23:51 +03:00
|
|
|
expect(
|
|
|
|
|
(vuetify as unknown as { defaults: { value: Record<string, Record<string, unknown>> } }).defaults.value.VBtn
|
|
|
|
|
?.variant,
|
|
|
|
|
).toBe('flat');
|
2026-05-12 09:27:22 +03:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
it('VCard defaults to rounded lg + variant flat + border', () => {
|
2026-05-12 20:23:51 +03:00
|
|
|
const card = (vuetify as unknown as { defaults: { value: Record<string, Record<string, unknown>> } }).defaults
|
|
|
|
|
.value.VCard;
|
2026-05-12 09:27:22 +03:00
|
|
|
expect(card?.rounded).toBe('lg');
|
|
|
|
|
expect(card?.variant).toBe('flat');
|
|
|
|
|
expect(card?.border).toBe(true);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
it('VTextField defaults to outlined + density comfortable', () => {
|
2026-05-12 20:23:51 +03:00
|
|
|
const tf = (vuetify as unknown as { defaults: { value: Record<string, Record<string, unknown>> } }).defaults
|
|
|
|
|
.value.VTextField;
|
2026-05-12 09:27:22 +03:00
|
|
|
expect(tf?.variant).toBe('outlined');
|
|
|
|
|
expect(tf?.density).toBe('comfortable');
|
|
|
|
|
});
|
|
|
|
|
});
|