What you will build
Milestone 15: Prove that core logic works through tests, compile a build, then verify URLs and accessibility. Learn what remains before a real support desk could safely handle customer records.
The final project needs reliable outcomes, accessible forms and a repeatable release process.
Visible checkpoint: Tests demonstrate the reducer's expected behavior, the project builds, and a reviewed deployment is accessible. You can study this Byte by itself, though the project can also be built progressively.
Understand the concept first
Test user behavior, form validation, reducer transitions, loading and error states. Find elements by role and accessible name. Measure performance before memoizing. Deployment is complete only after production-like navigation and configuration are checked.
In plain language, an interface should show useful information and respond predictably to users. We begin with one small technical change before introducing more features.
Architecture: what happens underneath
BUILD THE PROJECT · CHECKPOINT 1/5
From project files to browser output
Root mounting point
Expected outcome: The first app screen appears once you run npm run dev.
Execution path
01Reducer tests → UI tests → build → preview → review → releaseFollow the arrows and explain which step is React state, which is a browser action, and which would require a real backend.
Explore a realistic preview
BUILD ONE APPLICATION · BYTE 1/5
Setup & layout
Explore the UI that this Byte helps you build. Demo data only; no actual customer records.
Support Desk
Customer support ticket overview
Click a ticket to inspect its selected state.
Stage 1: Setup & layout. This preview illustrates the progression, not a connected backend.
Use the visual to predict what a user would see. The preview uses simulated demo data and does not represent a connected enterprise service.
Coding walkthrough step by step
Complete, ordered project checkpoints: Read the source-of-truth build guide. Use the full replacement files from that guide alongside the focused explanations below. Some snippets below demonstrate an insertion rather than a complete file.
Step 1 — Install tests
Edit or create the indicated file.
01npm install -D vitest @testing-library/react @testing-library/jest-dom jsdomWhat this step accomplishes: The final project needs reliable outcomes, accessible forms and a repeatable release process.
Check: Run your app or inspect the updated component before continuing.
Step 2 — Test reducer behavior
Edit or create the indicated file.
01// src/ticketReducer.test.ts02import {test,expect} from 'vitest';03import {ticketReducer} from './ticketReducer';04test('adds a ticket',()=>{05const item={id:1,subject:'Login problem',priority:'High' as const,status:'Open' as const};06expect(ticketReducer([],{type:'add',ticket:item})).toEqual([item]);07});
What this step accomplishes: Tests demonstrate the reducer's expected behavior, the project builds, and a reviewed deployment is accessible.
Check: Run your app or inspect the updated component before continuing.
Step 3 — Build for release
Edit or create the indicated file.
01npm run build02# Push source code to your GitHub repository.03# Create a Vercel preview and check the route and form behavior.
What this step accomplishes: Tests demonstrate the reducer's expected behavior, the project builds, and a reviewed deployment is accessible.
Check: Run your app or inspect the updated component before continuing.
Step 4 — Run release checks
Edit or create the indicated file.
01- Create a ticket; reject blank title.02- Resolve and reopen correctly.03- Loading/error/retry work.04- Keyboard focus and labels work.05- Directly refresh a nested route.06- Verify no real customer information or secrets are included.
What this step accomplishes: Tests demonstrate the reducer's expected behavior, the project builds, and a reviewed deployment is accessible.
Check: Run your app or inspect the updated component before continuing.
Expected screen and execution
What you should observe: Tests demonstrate the reducer's expected behavior, the project builds, and a reviewed deployment is accessible.
Trace it: Reducer tests → UI tests → build → preview → review → release. A user-visible output is stronger evidence than a code snippet alone.
Interactive decision and diagnosis
If the expected result does not appear, inspect the relevant file and resolve the first console error. Compare your current code to the preceding checkpoint.
Typical issue: The demo does not include authentication, authorization or a persistent backend. Do not describe it as enterprise production-ready.
How teams use this pattern
A frontend developer implements the interface, a tester verifies accessible controls and failure behavior, and the product owner describes the expected result. This is a simplified demonstration of that collaboration, not a representation of a particular company's internal infrastructure.
Compare UI and implementation
| What the user sees | What the application does |
|---|---|
| Tests demonstrate the reducer's expected behavior, the project builds, and a reviewed deployment is accessible. | Reducer tests → UI tests → build → preview → review → release |
| An action or failure | A typed handler, state transition or error boundary determines the visible response |
Hands-on practice
Write one failed-validation UI test and one retry test, then document remaining production requirements.
Evidence: Capture the visible result, explain the code you changed, and reproduce one failure case.
Interview Bit
Question: How does this milestone change what the learner can actually do?
Answer: It verifies behavior and release readiness while distinguishing demonstration code from secure production infrastructure.
Key Takeaways
- Vitest can run fast reducer tests.
- Testing Library verifies user-visible behavior.
- Tests should include invalid inputs and error states.
- Accessible roles and labels support learners and tests.
- A passing build does not prove the app is secure.
- Nested client routes need appropriate hosting fallback.
- Performance changes should follow measurement.
- Real customer data requires backend security controls.
Knowledge Check and Primary Sources
PRACTISE AND CHECK
Knowledge Check · 5 questions
Choose one answer per question, check your results, and retry.
0 of 5 answered
Frequently asked: Is a real backend required for this Byte? No; this handbook uses a mock boundary until you supply a real API. Does the demo contain real customer data? No.
Primary sources: React Testing Library · Vitest guide.