Skip to content

QA Testing Plan: Workflows

This document covers QA test cases for the Workflows business app located at /business/apps/workflows. The app supports creating workflows with ordered steps and transitions, running workflow instances, performing transitions on instances, and cancelling active workflows.

RoutePurpose
/business/apps/workflowsList all workflows with active/inactive badge
/business/apps/workflows/newCreate workflow form (superforms + createWorkflowSchema)
/business/apps/workflows/[id]Workflow detail with step/transition CRUD and delete
/business/apps/workflows/instancesList all workflow instances
/business/apps/workflows/instances/[instanceId]Instance detail with perform-transition and cancel
RouteActionMethodKey Fields
/business/apps/workflows/newcreatePOSTVia createWorkflowSchema
/business/apps/workflows/[id]add-stepPOSTVia createStepSchema
/business/apps/workflows/[id]update-stepPOSTstep_id, name, order (optional)
/business/apps/workflows/[id]delete-stepPOSTstep_id
/business/apps/workflows/[id]add-transitionPOSTVia createTransitionSchema
/business/apps/workflows/[id]update-transitionPOSTtransition_id, name, color (optional)
/business/apps/workflows/[id]delete-transitionPOSTtransition_id
/business/apps/workflows/[id]delete-workflowPOST(none)
/business/apps/workflows/instances/[instanceId]perform-transitionPOSTtransition_id, comment (optional)
/business/apps/workflows/instances/[instanceId]cancelPOST(none)

Test IDDescriptionPreconditionsStepsExpected ResultPriority
WF-001Workflow list loads for authenticated userUser is logged in with workflows1. Navigate to /business/apps/workflowsPage shows workflow cards with name, description, active/inactive badge, and date. Count badge in header matches total.P0
WF-002Empty state when no workflows existUser is logged in with no workflows1. Navigate to /business/apps/workflowsEmpty state “No workflows created yet.” with CTA “Create your first workflow”.P1
WF-003Unauthenticated user gets empty arrayUser is not logged in1. Navigate to /business/apps/workflowsPage loads with empty workflows array. No crash.P1
WF-004Workflow card links to detail pageUser has workflows1. Click a workflow cardNavigates to /business/apps/workflows/{id}.P1
WF-005Instances button navigates correctlyUser is logged in1. Click “Instances” buttonNavigates to /business/apps/workflows/instances.P1
WF-006Active/Inactive badge renders correctlyUser has both active and inactive workflows1. View workflow listActive workflows show “default” badge, inactive show “secondary”.P2
Test IDDescriptionPreconditionsStepsExpected ResultPriority
WF-010Create workflow with valid dataUser is logged in1. Navigate to /business/apps/workflows/new 2. Fill form per createWorkflowSchema 3. SubmitWorkflow is created. User is redirected to /business/apps/workflows/{new_id}.P0
WF-011Validation: invalid form data rejectedUser is logged in1. Submit with invalid/missing required fieldsForm returns 400 with validation errors.P0
WF-012Server error returns messageUser is logged in, service throws1. Trigger server error during creationForm returns 500 with error message via superforms.P1
WF-013Unauthenticated create returns 401User is not logged in1. POST to ?/createReturns 401 fail.P0
Test IDDescriptionPreconditionsStepsExpected ResultPriority
WF-020Load workflow detail pageUser is logged in, workflow exists1. Navigate to /business/apps/workflows/{id}Workflow detail loads with step form, transition form, steps list, and transitions list.P0
WF-021404 for non-existent workflowUser is logged in1. Navigate to /business/apps/workflows/{invalid_id}404 error “Workflow not found” is returned.P0
WF-022Add step to workflowUser owns the workflow1. Fill and submit add-step formStep is added. Success message “Step added!” is returned.P0
WF-023Add step validation failureUser owns the workflow1. Submit add-step with invalid dataReturns 400 with form errors.P1
WF-024Update step name and orderUser owns the workflow with steps1. Submit update-step with step_id, name, and optional orderStep is updated. Returns { success: true }.P0
WF-025Update step fails without step_id or nameUser is logged in1. Submit update-step without step_id or nameReturns 400 “Missing data”.P1
WF-026Delete step by IDUser owns the workflow with steps1. Submit delete-step with step_idStep is deleted. Returns { success: true }.P0
WF-027Delete step fails without step_idUser is logged in1. Submit delete-step without step_idReturns 400 “Missing step ID”.P1
Test IDDescriptionPreconditionsStepsExpected ResultPriority
WF-030Add transition to workflowUser owns the workflow with steps1. Fill and submit add-transition formTransition is added. Success message “Transition added!” is returned.P0
WF-031Add transition validation failureUser owns the workflow1. Submit add-transition with invalid dataReturns 400 with form errors.P1
WF-032Update transition name and colorUser owns the workflow with transitions1. Submit update-transition with transition_id, name, optional colorTransition is updated. Returns { success: true }.P0
WF-033Update transition fails without required fieldsUser is logged in1. Submit update-transition without transition_id or nameReturns 400 “Missing data”.P1
WF-034Delete transition by IDUser owns the workflow with transitions1. Submit delete-transition with transition_idTransition is deleted. Returns { success: true }.P0
WF-035Delete transition fails without transition_idUser is logged in1. Submit delete-transition without transition_idReturns 400 “Missing transition ID”.P1
Test IDDescriptionPreconditionsStepsExpected ResultPriority
WF-040Delete workflowUser owns the workflow1. Submit delete-workflow actionWorkflow is deleted. User is redirected to /business/apps/workflows.P0
WF-041Delete workflow requires authenticationUser is not logged in1. POST to ?/delete-workflowReturns 401 fail.P1
WF-042Delete workflow handles server errorUser is logged in, service throws1. Trigger server error during deletionReturns 500 with error message “Failed to delete workflow”.P1
Test IDDescriptionPreconditionsStepsExpected ResultPriority
WF-050Instances list loads for authenticated userUser is logged in with instances1. Navigate to /business/apps/workflows/instancesPage shows all workflow instances for the user.P0
WF-051Instances list empty stateUser has no instances1. Navigate to /business/apps/workflows/instancesEmpty instances array is returned. No crash.P1
WF-052Unauthenticated user gets empty arrayUser is not logged in1. Navigate to /business/apps/workflows/instancesReturns empty instances array.P1
Test IDDescriptionPreconditionsStepsExpected ResultPriority
WF-060Load instance detail pageUser is logged in, instance exists1. Navigate to /business/apps/workflows/instances/{instanceId}Instance detail loads with current step, available transitions, and execution log.P0
WF-061404 for non-existent instanceUser is logged in1. Navigate to /business/apps/workflows/instances/{invalid_id}404 error “Workflow instance not found” is returned.P0
WF-062Perform transition on instanceUser is logged in, instance is active1. Submit perform-transition with transition_idTransition is performed. Returns { success: true }. Instance moves to next step.P0
WF-063Perform transition with optional commentUser is logged in1. Submit perform-transition with transition_id and commentTransition is performed with comment recorded in audit log.P1
WF-064Perform transition fails without transition_idUser is logged in1. Submit perform-transition without transition_idReturns 400 “Missing transition ID”.P1
WF-065Perform transition handles server errorUser is logged in, service throws1. Trigger server errorReturns 500 “Failed to perform transition”.P1
WF-066Cancel workflow instanceUser is logged in, instance is active1. Submit cancel actionInstance is cancelled. User is redirected to /business/apps/workflows/instances.P0
WF-067Cancel instance requires authenticationUser is not logged in1. POST to ?/cancelReturns 401 fail.P1
WF-068Cancel instance handles server errorUser is logged in, service throws1. Trigger server error during cancellationReturns 500 “Failed to cancel”.P1