Compare commits

..

No commits in common. "a532f4299f78d34844a789a93dfbaca5402ea31b" and "d173c4aab894b7ddaa0d11fffa1342c248a53f63" have entirely different histories.

2 changed files with 10 additions and 17 deletions

View file

@ -320,14 +320,15 @@ describe('KIN-127: статус revising', () => {
expect(wrapper.find('a[href="/task/KIN-001"]').exists()).toBe(true)
})
it('Badge для статуса revising отображается с orange цветом', async () => {
it('Badge для статуса revising присутствует в списке задач', async () => {
const tasks = [makeTask('KIN-001', 'revising', null)]
const wrapper = await mountTasks(tasks)
// Badge получает raw status string (decision #827: i18n на стороне вызывающего)
expect(wrapper.text()).toContain('revising')
// Badge с color="orange" применяет класс text-orange-400 (Badge.vue: colors.orange)
const orangeBadge = wrapper.find('.text-orange-400')
// Badge с текстом revising должен присутствовать
const text = wrapper.text()
expect(text).toContain('revising')
// Badge должен иметь orange цвет
const orangeBadge = wrapper.find('.text-orange-400, .bg-orange-400, .bg-orange-500, .border-orange-400, .border-orange-500')
expect(orangeBadge.exists()).toBe(true)
})
})
@ -378,11 +379,8 @@ describe('KIN-127: защита от циклических ссылок', () =>
const wrapper = await mountTasks(tasks)
// Рендер завершился без ошибок
expect(wrapper.exists()).toBe(true)
// rootFilteredTasks пустой: оба KIN-001 и KIN-002 имеют parent_task_id
// указывающий на существующую задачу → оба отфильтрованы (decision #817)
const taskLinks = wrapper.findAll('a[href^="/task/"]')
expect(taskLinks.length).toBe(0)
// toggle кнопок нет — задачи не попали в список (decision #826: независимые visited Set)
// При циклической ссылке ни одна задача не является «корневой» с дочерними —
// toggle кнопок быть не должно (дефолтное состояние: дети не показаны)
const toggleBtns = wrapper.findAll('[data-testid="task-toggle-children"]')
expect(toggleBtns.length).toBe(0)
})

View file

@ -769,11 +769,6 @@ function taskStatusColor(s: string) {
return m[s] || 'gray'
}
function taskStatusLabel(s: string) {
if (s === 'revising') return t('projectView.status_revising')
return s
}
function decTypeColor(t: string) {
const m: Record<string, string> = {
decision: 'blue', gotcha: 'red', workaround: 'yellow',
@ -1188,7 +1183,7 @@ async function addDecision() {
class="flex items-center justify-between px-3 py-2 border border-orange-800/60 bg-orange-950/20 rounded text-sm hover:border-orange-600 no-underline block transition-colors">
<div class="flex items-center gap-2 min-w-0">
<span class="text-gray-500 shrink-0 w-24">{{ t.id }}</span>
<Badge :text="taskStatusLabel(t.status)" :color="taskStatusColor(t.status)" />
<Badge :text="t.status" :color="taskStatusColor(t.status)" />
<Badge v-if="t.category" :text="t.category" :color="CATEGORY_COLORS[t.category] || 'gray'" />
<span class="text-orange-300 truncate">{{ t.title }}</span>
<span v-if="t.parent_task_id" class="text-[10px] text-gray-600 shrink-0">escalated from {{ t.parent_task_id }}</span>
@ -1216,7 +1211,7 @@ async function addDecision() {
</button>
<span v-else class="w-4 shrink-0"></span>
<span class="text-gray-500 shrink-0 w-24">{{ t.id }}</span>
<Badge :text="taskStatusLabel(t.status)" :color="taskStatusColor(t.status)" />
<Badge :text="t.status" :color="taskStatusColor(t.status)" />
<Badge v-if="t.category" :text="t.category" :color="CATEGORY_COLORS[t.category] || 'gray'" />
<span class="text-gray-300 truncate">{{ t.title }}</span>
<span v-if="t.execution_mode === 'auto_complete'"