import { describe, it, expect } from 'vitest'; import { mount } from '@vue/test-utils'; import { createVuetify } from 'vuetify'; import { createRouter, createMemoryHistory } from 'vue-router'; import AppBottomNav from '../../resources/js/components/layout/AppBottomNav.vue'; const router = createRouter({ history: createMemoryHistory(), routes: [ { path: '/autopodbor', component: { template: '
' } }, { path: '/projects', component: { template: '
' } }, { path: '/deals', component: { template: '
' } }, { path: '/billing', component: { template: '
' } }, { path: '/kanban', component: { template: '
' } }, ], }); describe('AppBottomNav', () => { it('рендерит ровно 5 вкладок Поле/Проекты/Сделки/Биллинг/Канбан по порядку', async () => { const vuetify = createVuetify(); router.push('/deals'); await router.isReady(); const wrapper = mount(AppBottomNav, { global: { plugins: [vuetify, router] } }); const labels = wrapper.findAll('[data-testid="bottomnav-item"]').map((n) => n.text()); expect(labels).toEqual(['Поле', 'Проекты', 'Сделки', 'Биллинг', 'Канбан']); }); });