/** * KIN-075: Тест полной ширины экрана * Проверяет что App.vue не ограничивает ширину контента — нет max-w-* на
*/ import { describe, it, expect, vi, beforeEach } from 'vitest' import { mount, flushPromises } from '@vue/test-utils' import { createRouter, createMemoryHistory } from 'vue-router' import App from '../App.vue' vi.mock('../components/EscalationBanner.vue', () => ({ default: { template: '
' }, })) function makeRouter() { return createRouter({ history: createMemoryHistory(), routes: [ { path: '/', component: { template: '
home
' } }, { path: '/settings', component: { template: '
settings
' } }, ], }) } beforeEach(() => { vi.clearAllMocks() }) describe('KIN-075: App.vue — полная ширина экрана', () => { it('
не содержит класс max-w-* — контент не ограничен по ширине', async () => { const router = makeRouter() await router.push('/') const wrapper = mount(App, { global: { plugins: [router] } }) await flushPromises() const main = wrapper.find('main') expect(main.exists(), '
должен существовать в App.vue').toBe(true) expect( main.classes().some(c => c.startsWith('max-w-')), '
не должен иметь ограничивающий класс max-w-*', ).toBe(false) }) it('
не содержит класс max-w-6xl (регрессия KIN-075)', async () => { const router = makeRouter() await router.push('/') const wrapper = mount(App, { global: { plugins: [router] } }) await flushPromises() const main = wrapper.find('main') expect(main.classes()).not.toContain('max-w-6xl') }) })