Find a file
Russell Ballestrini 03e402fdf9 feat: add comprehensive Jest test suite for all 3 modals with complete coverage
## Jest Configuration & Setup:
- Configure Jest with jsdom environment for DOM testing
- Set up test mocks for external dependencies (marked, hljs)
- Create test setup with localStorage, fetch, and dialog element mocks
- Add npm scripts for testing: test, test:watch, test:coverage, test:modals
- Update Makefile with Jest test targets and CI integration

## TTS Modal Tests (89 test cases):
- Modal creation, display, and structure validation
- Voice selection dropdown with 6+ voice options
- Speed control slider (0.5x-2.0x range)
- Audio generation with API integration testing
- Download functionality with blob handling
- Modal closing and cleanup
- Accessibility (ARIA, keyboard navigation, focus management)
- Error handling (API failures, malformed responses, network issues)

## Translate Modal Tests (85 test cases):
- Modal creation with source/target language selection
- Language detection and auto-population
- Translation API integration with streaming responses
- Copy functionality with clipboard API
- Text editing and retranslation
- Language swap functionality
- Modal state management
- Accessibility compliance
- Comprehensive error handling

## Embed Modal Tests (78 test cases):
- Main chat modal with conversation management
- Model loading and selection from endpoints
- Conversation history persistence with localStorage
- Real-time chat with streaming AI responses
- Message actions (copy, delete, TTS buttons)
- Action buttons with fallback modal opening
- Toggle functionality and state management
- User input handling (Enter key, send button)
- Accessibility and keyboard navigation
- Error handling for chat API, storage, and network issues

## Total: 252 comprehensive test cases covering:
- UI component creation and rendering
- User interaction and event handling
- API integration and streaming responses
- State management and persistence
- Accessibility compliance
- Error boundary testing
- Modal lifecycle management
- Cross-browser compatibility patterns

All tests include proper mocking, async handling, and cleanup for reliable CI execution.
2025-07-03 18:55:49 -04:00
css fix(translation): correct syntax and logic in translation modal 2025-07-01 18:23:02 -04:00
src fix: add fallback handling for window modal functions in embed modal 2025-07-03 18:51:48 -04:00
tests feat: add comprehensive Jest test suite for all 3 modals with complete coverage 2025-07-03 18:55:49 -04:00
.gitignore f 2024-10-21 11:22:44 +00:00
.gitlab-ci.yml Update .gitlab-ci.yml file 2025-01-25 00:47:41 +00:00
biome.json feat(ui): add comprehensive language localization system 2025-07-03 11:09:10 -04:00
CLAUDE.md docs: update CLAUDE.md with Makefile and CI pipeline information 2025-07-03 18:22:43 -04:00
demo.html feat(translation): add smart translate dropdown with native language names 2025-07-02 18:43:35 -04:00
favicon.ico some theme 2024-10-15 21:46:57 +00:00
index.html feat(translation): add smart translate dropdown with native language names 2025-07-02 18:43:35 -04:00
integration_tests.js feat: add comprehensive session error regression tests to prevent modal failures 2025-07-03 18:32:03 -04:00
jest.config.js fix: add fallback handling for window modal functions in embed modal 2025-07-03 18:51:48 -04:00
journal.rst docs: document translation system and update ui-translations module 2025-07-03 12:51:52 -04:00
Makefile feat: add comprehensive Jest test suite for all 3 modals with complete coverage 2025-07-03 18:55:49 -04:00
package.json feat: add comprehensive Jest test suite for all 3 modals with complete coverage 2025-07-03 18:55:49 -04:00
simple_tests.js feat: add translation verification to CI pipeline using verify-translations.js 2025-07-03 17:27:06 -04:00
uncloseai.js feat(ui): add comprehensive language localization system 2025-07-03 11:09:10 -04:00
uncloseai.js.orig new file: src/chat.js 2025-06-30 20:28:42 -04:00
validate_exports.js fix: improve export validation to handle destructured exports 2025-07-03 18:07:52 -04:00