# Task 7 Manual Testing Guide
## Prerequisites
1. ✅ Oxigraph server running: `http://localhost:7878/query`
2. ✅ Vite dev server running: `http://localhost:5174`
3. ✅ Sample data loaded (78 triples)
## Test Checklist
### 1. Query Execution ✓
- [ ] Open http://localhost:5174/query-builder
- [ ] Click "List Museums" template in left sidebar
- [ ] Verify SPARQL query appears in editor
- [ ] Click "Execute Query" button
- [ ] Verify results table appears below
- [ ] Check that museum names are displayed
### 2. Results Table Features ✓
- [ ] **Sorting**: Click column headers to sort
- First click: ascending (↑)
- Second click: descending (↓)
- Third click: remove sort
- [ ] **Pagination**: If >100 results, verify pagination controls work
- Click "Next Page" / "Previous Page"
- Page numbers display correctly
- [ ] **Cell Types**: Verify rendering
- URIs display as clickable links
- Literals display as plain text
- Language-tagged literals show language (e.g., "Museum"@en)
- [ ] **Copy to Clipboard**: Click copy icon for individual cells
### 3. Export Functionality ✓
- [ ] Click "Export as CSV" - downloads file
- [ ] Click "Export as JSON" - downloads file
- [ ] Click "Export as JSON-LD" - downloads file
- [ ] Open each file and verify format is correct
### 4. Error Handling ✓
- [ ] Stop Oxigraph: `kill $(cat /tmp/oxigraph-server.pid)`
- [ ] Execute a query
- [ ] Verify error message appears with helpful hint
- [ ] Restart Oxigraph: `./scripts/load-and-start.sh`
- [ ] Execute query again - should work
### 5. Ontology Visualization ✓
- [ ] Click "Show Ontology Diagram" button
- [ ] Verify Mermaid diagram renders below results
- [ ] Test zoom controls:
- Click "+" to zoom in
- Click "-" to zoom out
- Click "Reset Zoom"
- [ ] Click "Download as SVG" - downloads diagram
- [ ] Click "Regenerate" to refresh diagram
- [ ] Click "Hide Ontology Diagram" to close
### 6. Query Templates ✓
Test each template from sidebar:
- [ ] List Museums
- [ ] Count by Type
- [ ] Institutions with Locations
- [ ] Museums with ISIL codes
- [ ] Prefix Explorer
- [ ] Custom query (blank slate)
### 7. Visual Builder ✓
- [ ] Switch to "Visual Builder" tab
- [ ] Add patterns, filters, etc.
- [ ] Verify SPARQL generates in preview
- [ ] Execute from visual builder
- [ ] Switch back to "SPARQL Editor" tab
### 8. Save/Load Queries ✓
- [ ] Write a custom query
- [ ] Click "Save Query"
- [ ] Enter name and save
- [ ] Verify it appears in "Saved Queries" section
- [ ] Click saved query to load it
- [ ] Click "×" to delete saved query
### 9. Copy to Clipboard ✓
- [ ] Write or load a query
- [ ] Click "Copy to Clipboard"
- [ ] Paste elsewhere to verify
### 10. Validation ✓
- [ ] Enter invalid SPARQL (e.g., `SELECT * WHERR { ?s ?p ?o }`)
- [ ] Verify validation errors appear
- [ ] "Execute Query" button should be disabled
- [ ] Fix error and verify validation passes
## Sample Queries to Test
### Query 1: Count All Triples
```sparql
SELECT (COUNT(*) as ?count) WHERE {
?s ?p ?o
}
```
**Expected**: 1 row with count = 78
### Query 2: List All Museums
```sparql
PREFIX schema:
SELECT ?museum ?name WHERE {
?museum a schema:Museum ;
schema:name ?name .
}
```
**Expected**: Multiple rows with museum URIs and names
### Query 3: Museums with Cities
```sparql
PREFIX schema:
SELECT ?museum ?name ?city WHERE {
?museum a schema:Museum ;
schema:name ?name ;
schema:address ?addr .
?addr schema:addressLocality ?city .
}
```
**Expected**: Museums with their city names
### Query 4: ASK Query (Boolean)
```sparql
PREFIX schema:
ASK WHERE {
?museum a schema:Museum .
}
```
**Expected**: Results table with boolean response
### Query 5: CONSTRUCT Query
```sparql
PREFIX schema:
CONSTRUCT {
?museum schema:name ?name .
} WHERE {
?museum a schema:Museum ;
schema:name ?name .
FILTER (LANG(?name) = "en")
}
```
**Expected**: RDF triples in results
## Known Issues
1. ⚠️ One pre-existing test failure in `use-rdf-parser.test.ts` (unrelated to Task 7)
2. ⚠️ Oxigraph ARM persistence bug - using in-memory mode only
## Success Criteria
- [x] All 210 tests passing (excluding 1 pre-existing fail)
- [ ] Manual tests complete (10/10 sections)
- [ ] No console errors in browser
- [ ] Export downloads work
- [ ] Ontology visualization renders
## Next Steps After Testing
1. Fix any bugs discovered
2. Add loading spinner for query execution
3. Improve error messages
4. Add result count badge
5. Consider GraphContext integration (Step 3)