glam/frontend/TASK7_QUICK_TEST.md
kempersc 2761857b0d Add scripts for converting OWL/Turtle ontology to Mermaid and PlantUML diagrams
- Implemented `owl_to_mermaid.py` to convert OWL/Turtle files into Mermaid class diagrams.
- Implemented `owl_to_plantuml.py` to convert OWL/Turtle files into PlantUML class diagrams.
- Added two new PlantUML files for custodian multi-aspect diagrams.
2025-11-22 23:01:13 +01:00

114 lines
2.9 KiB
Markdown

# 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`