Skip to content

AI Documents - QA Test Plan

The AI Documents app allows users to generate documents using AI models (OpenAI, Claude, Gemini), manage reusable prompt templates, and view document summaries. Routes are under /business/apps/aidocs/.

  • gpt-4o (default), gpt-4o-mini, gpt-4-turbo, gpt-3.5-turbo
  • claude-sonnet-4-20250514, claude-haiku-4-5-20251001
  • gemini-2.5-pro, gemini-2.5-flash

contract, proposal, report, letter, email, policy, other


IDDescriptionPreconditionsStepsExpected ResultPriority
AD-001Dashboard loads with nav cardsUser is logged inNavigate to /business/apps/aidocsPage shows Generate, Templates, and Summaries nav cards with correct countsP0
AD-002Recent documents list rendersAt least one document existsNavigate to dashboardDocuments list displays title, truncated prompt (80 chars), model badge, and formatted dateP0
AD-003Empty state shown when no documentsNo documents exist for userNavigate to dashboard”No documents generated yet” message and CTA button to Generate pageP1
AD-004Template count badge is accurate3 templates existNavigate to dashboardTemplates card shows “3 templates”P1
AD-005Document links navigate correctlyDocuments existClick on a document rowNavigates to /business/apps/aidocs/{id}P0
AD-006Unauthenticated user sees empty stateUser is not logged inNavigate to dashboardReturns empty documents and templates arrays; no server errorP1

IDDescriptionPreconditionsStepsExpected ResultPriority
AD-010Generate page loads with formUser is logged inNavigate to /business/apps/aidocs/generateForm renders with Title, Template selector (if templates exist), Prompt, and AI Model fieldsP0
AD-011Generate document with valid inputUser is logged in1. Enter title “Q1 Report” 2. Enter prompt “Write a summary…” 3. Select gpt-4o model 4. Click “Generate Document”Document is saved and user is redirected to /business/apps/aidocs/{id}P0
AD-012Validation fails on empty titleUser is logged inLeave title empty, fill prompt, submitTitle field shows validation error; form is not submittedP0
AD-013Validation fails on empty promptUser is logged inFill title, leave prompt empty, submitPrompt field shows validation error; form is not submittedP0
AD-014Default model is used when none selectedUser is logged inFill title and prompt without changing model, submitDocument is saved with model gpt-4oP1
AD-015All AI models appear in dropdownUser is logged inClick the AI Model dropdownAll 8 models are listed: gpt-4o, gpt-4o-mini, gpt-4-turbo, gpt-3.5-turbo, claude-sonnet-4-20250514, claude-haiku-4-5-20251001, gemini-2.5-pro, gemini-2.5-flashP0
AD-016Select OpenAI model and generateUser is logged inSelect gpt-4-turbo, fill required fields, submitDocument is created with model badge showing gpt-4-turboP0
AD-017Select Claude model and generateUser is logged inSelect claude-sonnet-4-20250514, fill required fields, submitDocument is created with model badge showing claude-sonnet-4-20250514P0
AD-018Select Gemini model and generateUser is logged inSelect gemini-2.5-pro, fill required fields, submitDocument is created with model badge showing gemini-2.5-proP0
AD-019Template selector pre-fills promptAt least one template exists1. Open Generate page 2. Select a template from dropdownPrompt field is filled with the template’s prompt_template; model is updated if the template has oneP0
AD-020Template selector shows “None” optionTemplates existClick Template dropdownFirst option is “None (custom prompt)“P1
AD-021Cancel button returns to dashboardUser is on Generate pageClick “Cancel”Navigates back to /business/apps/aidocsP2
AD-022Submit button shows loading stateUser is logged inFill form and click submitButton text changes to “Generating…” with spinner; button is disabledP1
AD-023Server error displays toastServer returns 500Submit valid form (simulated server error)Toast notification displays error messageP1

IDDescriptionPreconditionsStepsExpected ResultPriority
AD-030Document detail page loadsDocument existsNavigate to /business/apps/aidocs/{id}Page displays title, model badge, metadata (model, tokens used, created date), prompt section, and generated responseP0
AD-031Delete documentDocument existsClick “Delete” buttonDocument is deleted; user is redirected to /business/apps/aidocsP0
AD-032Delete failure shows toastServer error on deleteClick “Delete” (simulated failure)Toast shows error message; user stays on pageP1
AD-033404 for non-existent documentNo document with given IDNavigate to /business/apps/aidocs/invalid-id404 error page is shownP1
AD-034Generated content renders in pre blockDocument has response contentView document detailResponse text is displayed in a <pre> block with whitespace-pre-wrapP2

IDDescriptionPreconditionsStepsExpected ResultPriority
AD-040Templates list page loadsUser is logged inNavigate to /business/apps/aidocs/templatesPage shows template count badge and list of templates with name, category badge, and modelP0
AD-041Create template via dialogUser is logged in1. Click “New Template” 2. Fill name, prompt template, select category and model 3. Click “Create Template”Template is created; dialog closes; success toast appears; list refreshesP0
AD-042Create template validation - name requiredUser is logged inOpen dialog, leave name empty, submitValidation error on name fieldP0
AD-043Create template validation - prompt requiredUser is logged inOpen dialog, fill name, leave prompt empty, submitValidation error on prompt_template fieldP0
AD-044All template categories availableUser is logged inOpen create dialog, click Category dropdownAll 7 categories listed: contract, proposal, report, letter, email, policy, otherP1
AD-045All AI models available in templateUser is logged inOpen create dialog, click Model dropdownAll 8 AI models are listedP1
AD-046Delete templateAt least one template existsClick trash icon on a template rowTemplate is deleted; success toast appears; list refreshesP0
AD-047Empty state when no templatesNo templates existNavigate to templates page”No templates created yet” message with CTA buttonP1
AD-048Cancel closes create dialogDialog is openClick “Cancel” in the dialogDialog closes; no template is createdP2

IDDescriptionPreconditionsStepsExpected ResultPriority
AD-050Summaries page loadsUser is logged inNavigate to /business/apps/aidocs/summariesPage displays summary count badge and list of summariesP0
AD-051Summary row displays correct dataSummaries existView summaries listEach row shows truncated document ID, model badge, date, summary text (truncated at 200 chars), and tokens usedP1
AD-052Empty state when no summariesNo summaries existNavigate to summaries page”No summaries generated yet” message with explanation textP1
AD-053Tokens used shown when > 0Summary has tokens_used > 0View summary row”X tokens used” text is displayedP2
AD-054Tokens used hidden when 0Summary has tokens_used = 0View summary rowNo tokens text is displayedP2