kin: KIN-130-frontend_dev
This commit is contained in:
parent
3a4d6ef79d
commit
6d8151474c
5 changed files with 21 additions and 5 deletions
|
|
@ -110,7 +110,7 @@ describe('KIN-UI-017: TaskDetail — statusColor() для статуса revisin
|
||||||
const header = wrapper.find('h1')
|
const header = wrapper.find('h1')
|
||||||
expect(header.exists()).toBe(true)
|
expect(header.exists()).toBe(true)
|
||||||
// Ищем Badge рядом с заголовком задачи — он должен быть orange, не gray/blue
|
// Ищем Badge рядом с заголовком задачи — он должен быть orange, не gray/blue
|
||||||
const grayBadgeInHeader = wrapper.find('.text-gray-400.text-xs.rounded')
|
const _grayBadgeInHeader = wrapper.find('.text-gray-400.text-xs.rounded')
|
||||||
// text-gray-400 может встречаться в других элементах, но мы проверяем наличие orange
|
// text-gray-400 может встречаться в других элементах, но мы проверяем наличие orange
|
||||||
const orangeBadge = wrapper.find('.text-orange-400')
|
const orangeBadge = wrapper.find('.text-orange-400')
|
||||||
expect(orangeBadge.exists()).toBe(true)
|
expect(orangeBadge.exists()).toBe(true)
|
||||||
|
|
|
||||||
|
|
@ -253,7 +253,7 @@ describe('KIN-127: дерево задач — отступы', () => {
|
||||||
// Обёртка корневой задачи
|
// Обёртка корневой задачи
|
||||||
const taskWrapper = wrapper.find('div[style*="padding-left"]')
|
const taskWrapper = wrapper.find('div[style*="padding-left"]')
|
||||||
if (taskWrapper.exists()) {
|
if (taskWrapper.exists()) {
|
||||||
expect(taskWrapper.element.style.paddingLeft).toBe('0px')
|
expect((taskWrapper.element as HTMLElement).style.paddingLeft).toBe('0px')
|
||||||
} else {
|
} else {
|
||||||
// Если стиль не задан явно для 0 — это тоже приемлемо
|
// Если стиль не задан явно для 0 — это тоже приемлемо
|
||||||
expect(true).toBe(true)
|
expect(true).toBe(true)
|
||||||
|
|
@ -278,7 +278,7 @@ describe('KIN-127: дерево задач — отступы', () => {
|
||||||
w.find('a[href="/task/KIN-002"]').exists()
|
w.find('a[href="/task/KIN-002"]').exists()
|
||||||
)
|
)
|
||||||
expect(child1Wrapper?.exists()).toBe(true)
|
expect(child1Wrapper?.exists()).toBe(true)
|
||||||
expect(child1Wrapper?.element.style.paddingLeft).toBe('24px')
|
expect((child1Wrapper?.element as HTMLElement | undefined)?.style.paddingLeft).toBe('24px')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Задача второго уровня имеет paddingLeft 48px', async () => {
|
it('Задача второго уровня имеет paddingLeft 48px', async () => {
|
||||||
|
|
@ -304,7 +304,7 @@ describe('KIN-127: дерево задач — отступы', () => {
|
||||||
w.find('a[href="/task/KIN-003"]').exists()
|
w.find('a[href="/task/KIN-003"]').exists()
|
||||||
)
|
)
|
||||||
expect(child2Wrapper?.exists()).toBe(true)
|
expect(child2Wrapper?.exists()).toBe(true)
|
||||||
expect(child2Wrapper?.element.style.paddingLeft).toBe('48px')
|
expect((child2Wrapper?.element as HTMLElement | undefined)?.style.paddingLeft).toBe('48px')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
"files": [],
|
"files": [],
|
||||||
"references": [
|
"references": [
|
||||||
{ "path": "./tsconfig.app.json" },
|
{ "path": "./tsconfig.app.json" },
|
||||||
{ "path": "./tsconfig.node.json" }
|
{ "path": "./tsconfig.node.json" },
|
||||||
|
{ "path": "./tsconfig.vitest.json" }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
14
web/frontend/tsconfig.vitest.json
Normal file
14
web/frontend/tsconfig.vitest.json
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
"extends": "./tsconfig.node.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"types": ["node", "vitest/globals"],
|
||||||
|
"lib": ["ES2023", "DOM"],
|
||||||
|
"moduleResolution": "bundler",
|
||||||
|
"noUnusedLocals": false,
|
||||||
|
"noUnusedParameters": false
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"src/__tests__/**/*.ts",
|
||||||
|
"src/**/__tests__/**/*.ts"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -13,5 +13,6 @@ export default defineConfig({
|
||||||
environment: 'jsdom',
|
environment: 'jsdom',
|
||||||
globals: true,
|
globals: true,
|
||||||
setupFiles: ['./src/__tests__/vitest-setup.ts'],
|
setupFiles: ['./src/__tests__/vitest-setup.ts'],
|
||||||
|
typecheck: { tsconfig: './tsconfig.vitest.json' },
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue