# Task 7 - Quick Test Verification **Quick verification checklist for Task 7 completion** ## โšก 1-Minute Smoke Test ```bash # Terminal 1: Start Oxigraph (if not running) ./scripts/load-and-start.sh # Terminal 2: Start frontend cd frontend && npm run dev # Browser: Open http://localhost:5174/query-builder # Click "List Museums" โ†’ "Execute Query" โ†’ See results โœ“ ``` ## ๐Ÿงช 5-Minute Full Verification ### 1. Automated Tests (2 min) ```bash cd frontend npm test 2>&1 | grep -E "(Test Files|Tests)" # Expected: "Test Files 1 failed | 11 passed (12)" # Expected: "Tests 1 failed | 210 passed" ``` ### 2. Build Check (1 min) ```bash npm run build 2>&1 | tail -5 # Expected: "โœ“ built in X.XXs" (no TypeScript errors) ``` ### 3. Manual UI Check (2 min) - [ ] Open http://localhost:5174/query-builder - [ ] Click "List Museums" template - [ ] Click "Execute Query" - [ ] See results table with museum names - [ ] Click "Export as CSV" (downloads file) - [ ] Click "Show Ontology Diagram" (renders diagram) ## ๐Ÿ“Š Expected Results | Check | Expected | Status | |-------|----------|--------| | Tests | 210 passing | โœ… | | Build | No errors | โœ… | | Query execution | Results table | โœ… | | Export | CSV downloads | โœ… | | Ontology viz | Diagram renders | โœ… | ## ๐Ÿšจ If Tests Fail ### Pre-existing Failure (OK) ``` FAIL tests/unit/use-rdf-parser.test.ts ``` This is expected and unrelated to Task 7. ### New Failures (NOT OK) If any other test fails: 1. Check git status: `git status` 2. Review recent changes: `git diff` 3. Check browser console: DevTools โ†’ Console 4. Review error messages in terminal ## ๐ŸŽฏ Success Criteria โœ… Task 7 is complete if: - [x] 210+ tests passing - [x] Build succeeds (no TypeScript errors) - [x] Query Builder UI loads - [x] Queries execute and show results - [x] Export downloads work - [x] Ontology visualization renders ## ๐Ÿ“ Key Files to Verify ```bash # Components exist ls -la src/components/query/QueryBuilder.tsx ls -la src/components/query/ResultsTable.tsx ls -la src/components/query/OntologyVisualizer.tsx # Libraries exist ls -la src/lib/sparql/client.ts ls -la src/lib/sparql/export.ts ls -la src/lib/sparql/templates.ts # Tests exist ls -la tests/unit/QueryBuilder.test.tsx ls -la tests/unit/sparql-client.test.ts ``` All files should exist (no "No such file" errors). ## ๐Ÿ”ง Troubleshooting **Problem**: Tests fail with "Cannot find module" **Solution**: `npm install` (reinstall dependencies) **Problem**: Query Builder page blank **Solution**: Check browser console, ensure `npm run dev` is running **Problem**: "Failed to fetch" error **Solution**: Start Oxigraph with `./scripts/load-and-start.sh` **Problem**: No results in table **Solution**: Verify data loaded: `curl localhost:7878/query -d "query=SELECT * WHERE { ?s ?p ?o } LIMIT 1"` --- **For detailed testing**: See `TESTING_TASK7.md` **For full summary**: See `TASK7_COMPLETION_SUMMARY.md`