fix(e2e): activate workflow with A/B/D duties before UI-02 squad

Product gate blocks intake until workflow is active with human-approval
duties. Keep C non-member for UI-12; pin B as reviewer for UI-13.
This commit is contained in:
WeiCHEN
2026-09-22 22:30:00 +08:00
parent 62f444ce15
commit f99e714fb2
+7 -3
View File
@@ -259,7 +259,7 @@ async function selectDutyMemberByName(
*/
async function activateProjectWorkflow(
page: Page,
duties: { author: string; reviewer: string; Approver: string },
duties: { author: string; reviewer: string; approver: string },
) {
await page.getByRole('button', { name: '配置工作流' }).click();
await goToWorkflowDutyStep(page);
@@ -872,7 +872,11 @@ test.describe.serial('document-revision-runtime UI acceptance', () => {
await expect(page.getByTestId('doc-rev-template-hint')).toContainText('模板预览');
await expect(page.locator('text=版本账本未就绪')).toHaveCount(0);
// Squad tasks require an activated workflow with ≥1 human-approval doc (product gate).
await activateProjectWorkflow(page);
await activateProjectWorkflow(page, {
author: `编制人A-${suffix}`,
reviewer: `协作者B-${suffix}`,
approver: `审批人D-${suffix}`,
});
await shot(page, '01-project.png');
assertRevisionStateCleanForNewProject(logs);
@@ -887,7 +891,7 @@ test.describe.serial('document-revision-runtime UI acceptance', () => {
recordPass({
id: 'UI-01',
name: 'create project workbench',
input: `login A; create project ${PROJECT_NAME}; assign B+admin; activate workflow`,
input: `login A; create project ${PROJECT_NAME}; assign B+D; activate workflow`,
actual: 'template hint visible; workflow 运行中; doc-p revision-state count=0; no revision-state 404',
networkLogs: logs,
durationMs: Date.now() - t0,