kin: KIN-075 Расширить канбан-вид до ширины экрана, сейчас он ограничен центром. + добавить кнопки Тас Аудит Автокомит Авто в канбан вид
This commit is contained in:
parent
9764d1b414
commit
394301c7a7
4 changed files with 205 additions and 6 deletions
55
web/frontend/src/__tests__/app-layout.test.ts
Normal file
55
web/frontend/src/__tests__/app-layout.test.ts
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
/**
|
||||
* KIN-075: Тест полной ширины экрана
|
||||
* Проверяет что App.vue не ограничивает ширину контента — нет max-w-* на <main>
|
||||
*/
|
||||
|
||||
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: '<div />' },
|
||||
}))
|
||||
|
||||
function makeRouter() {
|
||||
return createRouter({
|
||||
history: createMemoryHistory(),
|
||||
routes: [
|
||||
{ path: '/', component: { template: '<div>home</div>' } },
|
||||
{ path: '/settings', component: { template: '<div>settings</div>' } },
|
||||
],
|
||||
})
|
||||
}
|
||||
|
||||
beforeEach(() => {
|
||||
vi.clearAllMocks()
|
||||
})
|
||||
|
||||
describe('KIN-075: App.vue — полная ширина экрана', () => {
|
||||
it('<main> не содержит класс 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(), '<main> должен существовать в App.vue').toBe(true)
|
||||
expect(
|
||||
main.classes().some(c => c.startsWith('max-w-')),
|
||||
'<main> не должен иметь ограничивающий класс max-w-*',
|
||||
).toBe(false)
|
||||
})
|
||||
|
||||
it('<main> не содержит класс 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')
|
||||
})
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue