feat: 收口组件样式并调整移动端侧栏

This commit is contained in:
GJ
2026-09-04 17:19:34 +08:00
parent d252d5513f
commit e6e0f08072
68 changed files with 2717 additions and 2775 deletions
@@ -0,0 +1,20 @@
import { describe, expect, it, vi } from 'vitest'
import { getOperation, runOperation } from '@/features/workflows/operations'
describe('项目级长请求互斥', () => {
it('同一项目不同时执行两个 graph,错误不伪装成功', async () => {
let fail!: (reason: Error) => void
const action = vi.fn<() => Promise<unknown>>(
() =>
new Promise((_resolve, reject) => {
fail = reject
})
)
const first = runOperation('operation-test', '拆解', action)
expect(await runOperation('operation-test', '改写', action)).toBe(false)
expect(action).toHaveBeenCalledTimes(1)
fail(new Error('连接中断'))
expect(await first).toBe(false)
expect(getOperation('operation-test')).toMatchObject({ pending: false, error: '连接中断', notice: '' })
})
})