style(translate): redesign glossary and translate images card layout to match mockup compact styling
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m31s

This commit is contained in:
2026-05-31 10:58:22 +02:00
parent a5b18b5a24
commit cd8a57324d
3 changed files with 271 additions and 279 deletions

View File

@@ -1,28 +1,19 @@
import { describe, it, expect } from 'vitest';
import { baseNavItems, proNavItem, getNavItems } from '../app/dashboard/constants';
describe('getNavItems', () => {
it('should return only base items for free users', () => {
const items = getNavItems(false);
expect(items).toHaveLength(2);
expect(items).toEqual(baseNavItems);
});
it('should include pro item for pro users', () => {
const items = getNavItems(true);
expect(items).toHaveLength(3);
expect(items).toContain(proNavItem);
});
import { baseNavItems } from '../app/dashboard/constants';
describe('baseNavItems', () => {
it('should have correct structure for base items', () => {
baseNavItems.forEach(item => {
expect(item).toHaveProperty('label');
expect(item).toHaveProperty('labelKey');
expect(item).toHaveProperty('href');
expect(item).toHaveProperty('icon');
});
});
it('should have proOnly flag on proNavItem', () => {
expect(proNavItem.proOnly).toBe(true);
it('should flag glossaries and apiKeys as proOnly', () => {
const glossaries = baseNavItems.find(item => item.href === '/dashboard/glossaries');
const apiKeys = baseNavItems.find(item => item.href === '/dashboard/api-keys');
expect(glossaries?.proOnly).toBe(true);
expect(apiKeys?.proOnly).toBe(true);
});
});