feat(short-drama-agent-front): 接入审核人工确认与延期验证
This commit is contained in:
1 parent
5836b90934
commit
c6ef595a8e
23 files changed
+3923
-67
No files matched your search
@@ -83,7 +83,7 @@ async function open(task: WorkflowExecution | null) {
|
||||
}
|
||||
wrapper = mount(CreateDramaPage, {
|
||||
attachTo: document.body,
|
||||
global: { provide: { [projectContextKey as symbol]: context } }
|
||||
global: { provide: { [projectContextKey as symbol]: context }, stubs: { DramaReviewPanel: true } }
|
||||
})
|
||||
await flushPromises()
|
||||
return wrapper
|
||||
@@ -109,6 +109,24 @@ afterEach(() => {
|
||||
})
|
||||
|
||||
describe('故事规划创作进度与恢复', () => {
|
||||
it('人工审核已完成时,旧任务的待修订回执只作为历史记录展示', async () => {
|
||||
context = testProjectContext('manual-review-current-complete')
|
||||
context.data.value!.checkpoints = [
|
||||
checkpoint({ reviewPassed: true, review: { passed: true } }, 'manual-confirm')
|
||||
]
|
||||
const page = await open(
|
||||
execution(context.project.value!.id, {
|
||||
status: 'completed',
|
||||
stage: 'completed',
|
||||
result: { projectStatus: 'need_review' }
|
||||
})
|
||||
)
|
||||
const dialog = await openTask(page)
|
||||
expect(dialog.text()).toContain('当前剧本已完成审核')
|
||||
expect(dialog.text()).not.toContain('审核仍需处理')
|
||||
expect(dialog.text()).not.toContain('执行结束 · 待修订')
|
||||
expect(dialog.text()).toContain('历史执行记录')
|
||||
})
|
||||
it('页面仅保留摘要和入口,任务与恢复说明按需进入弹窗且操作都在固定底栏', async () => {
|
||||
context = testProjectContext('compact-task')
|
||||
context.data.value!.project.status = 'failed'
|
||||
@@ -240,10 +258,10 @@ describe('故事规划创作进度与恢复', () => {
|
||||
expect(page.get('[data-stage="generateStoryPlan"]').attributes('data-status')).toBe('completed')
|
||||
expect(page.get('[data-stage="generateEpisode"]').attributes('data-status')).toBeUndefined()
|
||||
expect(dialog.get('button[aria-label="恢复生成"]').attributes('disabled')).toBeUndefined()
|
||||
expect(dialog.get('button[aria-label="恢复改写"]').attributes('disabled')).toBeDefined()
|
||||
expect(dialog.get('button[aria-label="恢复改写"]').attributes('aria-haspopup')).toBe('dialog')
|
||||
})
|
||||
|
||||
it('派生设定失败且正式剧集已齐全时仍允许恢复生成,不误开恢复改写', async () => {
|
||||
it('派生设定失败仍允许恢复生成,改写入口先打开只读预检', async () => {
|
||||
context = testProjectContext('derive-failed')
|
||||
context.data.value!.project.status = 'failed'
|
||||
context.data.value!.checkpoints = [
|
||||
@@ -254,7 +272,7 @@ describe('故事规划创作进度与恢复', () => {
|
||||
expect(page.get('[data-stage="generateEpisode"]').attributes('data-status')).toBe('completed')
|
||||
expect(page.get('[data-stage="generateCharacter"]').attributes('data-status')).toBeUndefined()
|
||||
expect(dialog.get('button[aria-label="恢复生成"]').attributes('disabled')).toBeUndefined()
|
||||
expect(dialog.get('button[aria-label="恢复改写"]').attributes('disabled')).toBeDefined()
|
||||
expect(dialog.get('button[aria-label="恢复改写"]').attributes('aria-haspopup')).toBe('dialog')
|
||||
})
|
||||
|
||||
it('恢复期间不以旧保存记录或数据库设定把当前节点及审核标为完成', async () => {
|
||||
|
||||
Reference in new issue
Block a user