Complete Phase 1 & 3: TestDrive-JSUI capability migration

Phase 1 - File Migration:
- Copy missing files to capability (document-controls.js, test-document-navigator.js)
- Create legacy compatibility wrapper (document-controls-legacy.js)
- Install jest-environment-jsdom dependency
- All 84 automated tests passing (68 JS + 15 Python + 1 fixes)

Phase 3 - Template Updates:
- Update MIGRATION_STATUS.md with Phase 3 completion status
- Update CLAUDE.md with migration completion details
- Document verification results for both view and edit modes

Migration Status:
- All 24 original JavaScript files now in capability 
- File verification: 20 identical, 4 intentionally different 
- Test coverage: 59.11% (exceeds 58% requirement) 
- Ready for Phase 4 cleanup after verification period

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-12-16 10:19:56 +01:00
parent 9d7964f9e5
commit 891d785533
6 changed files with 1462 additions and 10 deletions

View File

@@ -0,0 +1,22 @@
/**
* Legacy wrapper for DocumentControls
*
* This file provides backward compatibility for tests that reference
* DocumentControlsLegacy. It simply re-exports the current DocumentControls
* implementation with the legacy name.
*/
const { DocumentControls } = require('./document-controls.js');
// Re-export as legacy name for backward compatibility
const DocumentControlsLegacy = DocumentControls;
// Export for use in tests and other modules
if (typeof module !== 'undefined' && module.exports) {
module.exports = { DocumentControlsLegacy };
}
// Export for browser use
if (typeof window !== 'undefined') {
window.DocumentControlsLegacy = DocumentControls;
}