feat(FN-1640): add Frontend UX Design built-in workflow template
- Add Frontend UX Design template for verifying UI/UX design implementation - Include WCAG 2.1 compliance checks, design system adherence, and user flow validation - Add template to WorkflowStepManager with category-based organization - Update documentation with new template description - Add tests for template API endpoints and workflow step manager
This commit is contained in:
@@ -11024,6 +11024,8 @@ describe("GET /workflow-step-templates", () => {
|
||||
expect(ids).toContain("security-audit");
|
||||
expect(ids).toContain("performance-review");
|
||||
expect(ids).toContain("accessibility-check");
|
||||
expect(ids).toContain("browser-verification");
|
||||
expect(ids).toContain("frontend-ux-design");
|
||||
});
|
||||
});
|
||||
|
||||
@@ -11100,6 +11102,37 @@ describe("POST /workflow-step-templates/:id/create", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("creates workflow step from frontend-ux-design template", async () => {
|
||||
const created = {
|
||||
id: "WS-003",
|
||||
name: "Frontend UX Design",
|
||||
description: "Verify visual polish and consistency with existing UI patterns and design tokens",
|
||||
prompt: expect.stringContaining("UX design reviewer"),
|
||||
toolMode: "readonly",
|
||||
enabled: true,
|
||||
createdAt: "2026-01-01",
|
||||
updatedAt: "2026-01-01",
|
||||
};
|
||||
(store.listWorkflowSteps as ReturnType<typeof vi.fn>).mockResolvedValueOnce([]);
|
||||
(store.createWorkflowStep as ReturnType<typeof vi.fn>).mockResolvedValueOnce(created);
|
||||
|
||||
const res = await REQUEST(buildApp(), "POST", "/api/workflow-step-templates/frontend-ux-design/create", JSON.stringify({}), {
|
||||
"Content-Type": "application/json",
|
||||
});
|
||||
|
||||
expect(res.status).toBe(201);
|
||||
expect(res.body.name).toBe("Frontend UX Design");
|
||||
expect(res.body.toolMode).toBe("readonly");
|
||||
expect(store.createWorkflowStep).toHaveBeenCalledWith({
|
||||
templateId: "frontend-ux-design",
|
||||
name: "Frontend UX Design",
|
||||
description: "Verify visual polish and consistency with existing UI patterns and design tokens",
|
||||
prompt: expect.stringContaining("UX design reviewer"),
|
||||
toolMode: "readonly",
|
||||
enabled: true,
|
||||
});
|
||||
});
|
||||
|
||||
it("returns 404 for non-existent template", async () => {
|
||||
const res = await REQUEST(buildApp(), "POST", "/api/workflow-step-templates/nonexistent/create", JSON.stringify({}), {
|
||||
"Content-Type": "application/json",
|
||||
|
||||
Reference in New Issue
Block a user