diff --git a/app/resources/js/layouts/AdminLayout.vue b/app/resources/js/layouts/AdminLayout.vue index f90b07ab..cb36e5b4 100644 --- a/app/resources/js/layouts/AdminLayout.vue +++ b/app/resources/js/layouts/AdminLayout.vue @@ -25,11 +25,11 @@ interface NavItem { } const navItems: NavItem[] = [ - { title: 'Тенанты', icon: 'mdi-account-group-outline', to: '/admin/tenants', count: 142 }, + { title: 'Тенанты', icon: 'mdi-account-group-outline', to: '/admin/tenants' }, { title: 'Биллинг', icon: 'mdi-credit-card-outline', to: '/admin/billing' }, { title: 'Тарифная сетка', icon: 'mdi-tag-arrow-right', to: '/admin/pricing-tiers' }, { title: 'Цены поставщиков', icon: 'mdi-currency-rub', to: '/admin/supplier-prices' }, - { title: 'Инциденты', icon: 'mdi-alert-outline', to: '/admin/incidents', count: 3 }, + { title: 'Инциденты', icon: 'mdi-alert-outline', to: '/admin/incidents' }, { title: 'Impersonation', icon: 'mdi-account-switch', to: '/admin/impersonation' }, { title: 'Система', icon: 'mdi-cog-outline', to: '/admin/system' }, { title: 'Интеграция с поставщиком', icon: 'mdi-swap-horizontal', to: '/admin/supplier-integration' }, diff --git a/app/tests/Frontend/AdminLayout.spec.ts b/app/tests/Frontend/AdminLayout.spec.ts index 21100558..88149213 100644 --- a/app/tests/Frontend/AdminLayout.spec.ts +++ b/app/tests/Frontend/AdminLayout.spec.ts @@ -9,9 +9,10 @@ import { useAuthStore } from '../../resources/js/stores/auth'; import type { AuthUser } from '../../resources/js/api/auth'; // AdminLayout содержит: -// - sidebar #012019 с brand-block «Лидерра.» + ADMIN метка + 7 nav-items -// (Тенанты 142 / Биллинг / Тарифная сетка / Цены поставщиков / Инциденты 3 / -// Impersonation / Система); +// - sidebar #012019 с brand-block «Лидерра.» + ADMIN метка + 9 nav-items +// (Тенанты / Биллинг / Тарифная сетка / Цены поставщиков / Инциденты / +// Impersonation / Система / Интеграция с поставщиком / Проекты у поставщика), +// без mock count-badge; // - topbar с breadcrumb («Админка › ») + user-menu; // - RouterView; DevIndexBadge. @@ -84,12 +85,12 @@ describe('AdminLayout.vue', () => { ); }); - it('показывает count-badge для Тенантов (142) и Инцидентов (3) и не для остальных', async () => { + it('не рендерит захардкоженные mock count-badge (live-счётчики — отдельная фича)', async () => { + // Ранее в nav были mock-счётчики Тенанты=142 / Инциденты=3, расходящиеся с реальными + // данными (5 тенантов / 0 открытых инцидентов). Удалены — неверный бейдж хуже отсутствия. const { wrapper } = await mountAdminLayout(); - const counts = wrapper.findAll('.nav-count').map((n) => n.text()); - expect(counts).toContain('142'); - expect(counts).toContain('3'); - expect(counts).toHaveLength(2); + const counts = wrapper.findAll('.nav-count'); + expect(counts).toHaveLength(0); }); it('breadcrumb на /admin/tenants показывает «Тенанты»', async () => {