Some checks failed
Deploy / Build and Deploy to Production (push) Has been cancelled
Major refactoring of the map-editor plugin to store markers as Kirby subpages instead of YAML data, enabling extensible block content. Backend Changes: - Add API routes for marker CRUD operations (GET, POST, PATCH, DELETE) - Create marker.yml blueprint with content & position tabs - Add markers section to map.yml blueprint - Update useMapData to only handle center/zoom/background - Create useMarkersApi composable for API communication Frontend Changes: - Refactor MapEditor.vue to support multi/single modes - Multi mode: loads markers via API, redirects to Panel for editing - Single mode: displays single marker for position tab in marker page - Remove MarkerEditor.vue modal (replaced by Panel editing) - Normalize position format handling (lon vs lng) API Features: - Session-based auth for Panel requests (no CSRF needed) - Proper error handling and validation - Markers created as listed pages (not drafts) - Uses Kirby's data() method for JSON parsing Documentation: - Add IMPLEMENTATION_SUMMARY.md with technical details - Add TESTING_CHECKLIST.md with 38 test cases Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
7.2 KiB
7.2 KiB
Map Editor Plugin - Testing Checklist
Pre-Testing Setup
- Build the frontend:
npm run build - Ensure Kirby is running (PHP server)
- Log into Kirby Panel
- Navigate to the map page (e.g.,
/panel/pages/map+carte)
Phase 1: Multi-Mode Testing (Map Page)
Basic Marker Operations
-
View existing markers
- Open map page in Panel
- Verify markers are loaded and displayed on map
- Verify markers appear in sidebar list
-
Create marker via button
- Click "Add Marker" button in sidebar
- Verify marker appears at map center
- Verify marker appears in sidebar
- Check browser console for errors
-
Create marker via map click
- Click anywhere on the map
- Verify marker appears at clicked location
- Verify marker appears in sidebar
-
Select marker
- Click marker in sidebar
- Verify map centers on marker
- Verify marker is highlighted
-
Drag marker
- Drag a marker to new position
- Verify position updates in real-time
- Reload page and verify position persisted
-
Edit marker
- Click "Edit" button for a marker in sidebar
- Verify redirect to marker page in Panel
- Verify marker page loads correctly
-
Delete marker
- Click "Delete" button for a marker
- Verify confirmation dialog appears
- Confirm deletion
- Verify marker removed from map and sidebar
- Reload page and verify deletion persisted
Map Data Persistence
-
Map view changes
- Pan and zoom the map
- Reload the page
- Verify map returns to same view
-
Check YAML data
- View the mapdata field source
- Verify it contains: background, center, zoom
- Verify it does NOT contain markers array
Edge Cases
-
Max markers limit
- Create markers up to the limit (default 50)
- Verify "Add Marker" button becomes disabled
- Verify map clicks don't create new markers
-
Geocode search
- Use the address search in sidebar
- Search for an address
- Verify map centers on result
-
Error handling
- Open browser DevTools Network tab
- Try operations with network offline (simulate)
- Verify errors are logged to console
Phase 2: Single-Mode Testing (Marker Page)
Marker Page Structure
-
Create test marker
- In map page sidebar, click "Add Marker"
- Click "Edit" to open the marker page
-
Content tab
- Verify "Contenu" tab exists
- Edit title field
- Add blocks (heading, text, image, etc.)
- Save and verify content persists
-
Position tab
- Switch to "Position" tab
- Verify latitude/longitude fields on left
- Verify map preview on right
Single-Mode Map Functionality
-
View marker position
- Verify single marker appears on map
- Verify marker is at coordinates shown in fields
-
Drag marker in single mode
- Drag the marker to a new position
- Check browser console for API call
- Reload page
- Verify new position persisted
-
Update coordinates via fields
- Edit latitude field (e.g., 43.8)
- Edit longitude field (e.g., 4.3)
- Save the page
- Verify marker moved on map preview
-
Geocode search in single mode
- Use address search (if available)
- Verify map centers on result
- Drag marker to searched location
Single-Mode Restrictions
-
No CRUD buttons
- Verify no "Add Marker" button
- Verify no "Delete" button
- Verify no marker list sidebar
-
Map size
- Verify map height is smaller (400px) than multi-mode
Phase 3: Integration Testing
Subpage Management
-
View markers as subpages
- In map page, check sidebar "Marqueurs" section
- Verify all markers listed as subpages
- Verify ordering by num
-
Reorder markers
- Drag markers in Panel pages section
- Verify order updates
- View map editor
- Verify sidebar reflects new order
-
Delete marker via Panel
- Delete a marker subpage via Panel (not map editor)
- View map page
- Verify marker removed from map
-
Create marker manually
- Create a new marker subpage via Panel
- Set template to "marker"
- Add title, latitude, longitude
- View map page
- Verify marker appears on map
Multi-Marker Performance
-
Create 10 markers
- Create 10 markers via map
- Verify performance is acceptable
- Check load time
-
Create 50 markers (optional stress test)
- Create markers up to limit
- Verify UI remains responsive
- Check browser memory usage
Phase 4: Security & API Testing
Authentication
- Logged out access
- Log out of Panel
- Try accessing API directly (e.g., via curl)
- Verify 401 Unauthorized response
CSRF Protection
- Invalid CSRF token
- Use browser DevTools to modify X-CSRF header
- Try creating/updating/deleting marker
- Verify 403 Forbidden response
Permissions
- Create restricted user (optional)
- Create user with limited permissions
- Log in as that user
- Try marker operations
- Verify permission checks work
API Responses
-
Check API responses
- Open DevTools Network tab
- Perform marker operations
- Verify responses match expected format:
{ "status": "success", "data": { ... } }
-
Test error responses
- Try invalid coordinates (e.g., lat: 200)
- Verify 400 Bad Request response
- Verify error message is descriptive
Phase 5: Build & Deployment
Build Verification
-
Clean build
- Run
npm run build - Verify no errors or warnings (except font warnings)
- Check dist folder created
- Run
-
Production test
- Test on production server (if available)
- Verify all functionality works
Browser Compatibility
- Test in Chrome
- Test in Firefox
- Test in Safari
- Test in Edge (optional)
Common Issues & Solutions
Issue: Markers not loading
- Check: Browser console for API errors
- Check: Network tab for 401/403 errors
- Solution: Verify user is logged in, CSRF token is valid
Issue: Drag doesn't update position
- Check: Console for API errors
- Check: Network tab for PATCH request
- Solution: Verify page permissions, CSRF token
Issue: Redirect to Panel doesn't work
- Check: Console for errors
- Check: panelUrl in API response
- Solution: Verify page ID format is correct
Issue: Single mode shows multiple markers
- Check: MapEditor component mode prop
- Check: Blueprint field configuration
- Solution: Verify
mode: singlein blueprint
Test Results Summary
Date: __________ Tester: __________
| Phase | Tests Passed | Tests Failed | Notes |
|---|---|---|---|
| Phase 1: Multi-Mode | __ / 12 | __ | |
| Phase 2: Single-Mode | __ / 9 | __ | |
| Phase 3: Integration | __ / 6 | __ | |
| Phase 4: Security | __ / 5 | __ | |
| Phase 5: Build | __ / 6 | __ | |
| Total | __ / 38 | __ |
Next Steps After Testing
- Document any bugs found
- Create GitHub issues for bugs
- Update README with usage instructions
- Add user documentation
- Consider implementing suggested improvements