kin: auto-commit after pipeline

This commit is contained in:
Gros Frumos 2026-03-18 15:41:59 +02:00
parent 8f5e0f6bd8
commit 326994d101
2 changed files with 363 additions and 0 deletions

View file

@ -86,6 +86,11 @@ async function mountSettings(overrides: Partial<typeof BASE_PROJECT> = {}) {
}
describe('SettingsView — навигатор', () => {
it('таблица проектов рендерится', async () => {
const wrapper = await mountSettings()
expect(wrapper.find('table').exists()).toBe(true)
})
it('показывает имя проекта', async () => {
const wrapper = await mountSettings()
expect(wrapper.text()).toContain('Test Project')
@ -122,4 +127,23 @@ describe('SettingsView — навигатор', () => {
const wrapper = await mountSettings({ execution_mode: null })
expect(wrapper.text()).not.toContain('auto_complete')
})
it('для каждого проекта есть ссылка с ?tab=settings', async () => {
const projects = [
{ ...BASE_PROJECT, id: 'proj-1', name: 'Project One' },
{ ...BASE_PROJECT, id: 'proj-2', name: 'Project Two' },
{ ...BASE_PROJECT, id: 'proj-3', name: 'Project Three' },
]
vi.mocked(api.projects).mockResolvedValue(projects as any)
const router = makeRouter()
await router.push('/settings')
const wrapper = mount(SettingsView, { global: { plugins: [router] } })
await flushPromises()
for (const project of projects) {
const link = wrapper.find(`a[href*="${project.id}"]`)
expect(link.exists()).toBe(true)
expect(link.attributes('href')).toContain('tab=settings')
}
})
})