Practice Labs QA
Goal
Verify the JavaScript, TypeScript, and React practice labs as one learning workflow across editor behavior, execution output, snippets, themes, and responsive layouts.
JavaScript Lab
- Open
/practice/javascript. - Run the starter code and confirm console output appears with a completed run line.
- Use
Tab,Shift + Tab,Alt + ArrowDown,Ctrl/Command + Enter, andCtrl/Command + L. - Copy code and console output, including the empty-console state.
- Trigger noisy output and confirm caps/truncation remain readable.
- Save, load, and delete a JavaScript snippet.
TypeScript Lab
- Open
/practice/typescript. - Run valid TypeScript and confirm compile feedback appears before runtime output.
- Run invalid TypeScript and confirm runtime execution is blocked.
- Copy code, TypeScript feedback, and console output separately.
- Save, load, and delete a TypeScript snippet.
- Confirm JavaScript and React snippets do not appear in the TypeScript list.
React Lab
- Open
/practice/react. - Load each starter example and render it.
- Interact with preview controls for state, events, filters, conditionals, and lists.
- Confirm console output updates during preview interactions.
- Save, load, and delete a React snippet.
- Edit the editor, try loading another snippet, cancel once, then accept once.
- Paste a long snippet over the source cap and confirm the error is clear.
- Trigger many logs and confirm the console cap notice appears once.
Theme And Responsive
- Toggle light and dark mode from the sidebar.
- Confirm the toggle is compact, icon-only, animated, and still keyboard reachable.
- Check laptop, tablet, and mobile widths.
- Confirm editor, console, preview, snippet cards, inputs, and buttons stay readable in both themes.
- Confirm action buttons wrap without text overlap.
Storage Recovery
Use DevTools Application storage for learning-studio.practice-snippets.v1.
- Clear the key and reload each lab.
- Set the key to invalid JSON and reload.
- Set the key to a wrong version and reload.
- Set a mixed list with valid JavaScript, TypeScript, React, and invalid snippets.
- Confirm each lab only renders snippets for its own language.
Regression Commands
npm run typecheck
npm run test
npm run build
Pass Criteria
- All three labs can write, run or render, inspect output, copy, save, load, and delete.
- Dark mode has no white-card regressions.
- Mobile layout remains usable without overlapping buttons or unreadable text.
- Storage failures do not break the page.