Commit Graph

18 Commits

Author SHA1 Message Date
Nuwan a5b5c7f550 save test data 2026-02-08 13:33:58 +05:30
Nuwan 4d459fc2ac test(18-01): add INT-03 Cancel closes modal without API call test
- Add test verifying Cancel button closes modal without making API call
- Fill description field before cancel to verify changes are discarded
- Use page.route() to track any PUT requests (should be none)
- Verify modal closes by checking privacy select visibility
2026-02-08 12:44:10 +05:30
Nuwan b81d163650 test(18-01): add INT-02 Save settings API verification test
- Add test for save button making PUT /sessions/{id} API call
- Verify payload includes description and privacy fields (musician_access, approval_required)
- Use page.route() to intercept and capture API request
- Verify modal closes after successful save
- Fix locators to use privacy select instead of modal header text (avoids toast collision)
2026-02-08 12:41:10 +05:30
Nuwan c137cb1ee8 test(18-01): add INT-01 Settings button opens modal test
- Create session-settings test directory
- Add Playwright test for Settings button opening modal
- Verify modal form elements: privacy select, description, Save/Cancel buttons
- Follow existing test patterns from chat-button.spec.ts
2026-02-08 12:37:37 +05:30
Nuwan 4bb3fa2065 test(16-01): add error handling integration tests
- Create error-handling.spec.ts with 5 test scenarios
- Test REQ-5.1: File size exceeded validation
- Test REQ-5.4: Upload success toast with auto-dismiss
- Test REQ-5.3: Network error handling with retry capability
- Test REQ-5.5: S3 404 error handling (missing file)
- Test edge case: Prevent rapid clicks during upload
- Uses test-helpers.ts for login and session creation
2026-02-06 18:45:36 +05:30
Nuwan e9dd992e29 test(15-01): add real-time attachment sync integration tests
- Create test/attachments/real-time-sync.spec.ts
- Test WebSocket message receipt for attachments
- Test deduplication of duplicate messages
- Test REST API and WebSocket message deduplication
- Test attachment display in chat
- Uses Redux dispatch simulation approach for CI compatibility
2026-02-06 02:20:47 +05:30
Nuwan 961c0e36bb chore: update debug logging and test storage state
Changes:
- .gitignore: Add .run-claude.sh to ignored files
- JKSessionScreen.js: Add "-DEBUG-" prefix to console logs for easier filtering
- user1.json, user2.json: Update test authentication state
- 11-VERIFICATION.md: Add verification document for Phase 11

These are maintenance updates from chat feature development and testing.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-02 17:26:16 +05:30
Nuwan ceafe11225 test(10-01): add integration tests for unread badge behavior
Add comprehensive Playwright integration tests for chat unread badge:
- Badge visibility based on count (hidden at 0, visible with count)
- Badge text formatting (1-99, "99+" for 100+)
- Badge reset when window opened
- Badge increment logic (closed window vs different channel)
- Multiple message handling
- Badge state after page reload

Tests validate Redux state, localStorage persistence, and UI rendering.

Related to Phase 10 Plan 1: Read/Unread Status Validation & Testing

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-27 21:59:55 +05:30
Nuwan 984c60c656 test(09-02): add integration tests for receive message flow
- Test WebSocket message display with sender info
- Test message deduplication (sent message not duplicated on WebSocket receive)
- Test auto-scroll to bottom on new message
- Test unread badge increment when window closed
- 4 comprehensive tests for real-time receive scenarios
2026-01-27 19:48:16 +05:30
Nuwan 9eb58bd02b test(09-02): add integration tests for send message flow
- Test send via button click
- Test send via Enter key
- Test Shift+Enter inserts newline without sending
- Test button disabled when empty or over 255 chars
- Test character count and validation message display
- Test error display on send failure
- Test optimistic update behavior
- 7 comprehensive tests for send scenarios
2026-01-27 19:47:50 +05:30
Nuwan 9fd506695d test(08-03): add integration tests for chat button
- Test button visibility in session navigation
- Test badge hidden when unread count = 0
- Test badge shows correct count (1-99)
- Test badge shows "99+" for counts >= 100
- Test button opens chat window
- Test duplicate window prevention
- Test badge resets when window opens
- 7 comprehensive test cases
2026-01-27 14:20:52 +05:30
Nuwan 2c5d39d331 test(08-01): add integration tests for chat window open/close
- Expose Redux store for testing (dev/test environments only)
- Add 3 tests: window open, window close, placeholder message
- Tests verify WindowPortal integration and Redux state updates

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-27 13:37:31 +05:30
Nuwan d8ae60e251 add test data files 2026-01-25 14:07:29 +05:30
Nuwan 3887f4fdda feat: update metronome track layout and improve test infrastructure
- Change metronome track to horizontal layout: VU meter on left, volume slider on right
- Add three dots menu button without diagnostics circle (metronome doesn't need diagnostics)
- Move Close functionality to three dots menu dropdown
- Update test selectors to match new layout (.track-title, .track-menu-button)
- Add jamClient mocking in tests to prevent hanging on native client calls
- Increase test timeout to 60s to accommodate session creation time
- Configure global test setup to use existing user accounts instead of creating new ones
- Add conditional fake client support in JamClientContext for test environments

Tests: 3 passed, 2 skipped (as expected)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-25 13:59:29 +05:30
Nuwan 746cfd72fa test: add Playwright tests for metronome functionality
Add comprehensive test suite for metronome feature including:
- Opening metronome from Open menu
- Displaying metronome track with VU meter and gain controls
- Closing metronome from main window
- Helper function for opening metronome in tests
- Documentation for test suite

Tests verify core metronome UI behavior and user interactions.
WindowPortal popup tests are skipped due to complexity (manual testing recommended).

Test results:
- 3 tests passing
- 2 tests skipped (popup window controls)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-23 19:31:03 +05:30
Nuwan b5f7f25698 test: add Playwright test infrastructure for session flow verification
Added comprehensive test infrastructure to verify session join flow and
track sync implementation:

Test Configuration:
- playwright.chrome.config.ts: Chrome-specific test configuration
- playwright.verification.config.ts: Verification test settings

Test Documentation:
- IMPLEMENTATION_APPROACH.md: TDD approach for trackSync
- JAM_UI_TESTING_PLAN.md: Overall testing strategy

Test Utilities:
- api-interceptor.ts: Intercepts and logs API calls
- websocket-monitor.ts: Monitors WebSocket messages
- sequence-comparator.ts: Compares API call sequences
- test-helpers.ts: Shared test helper functions

Test Suites:
- e2e/complete-session-flow.spec.ts: Full session flow E2E test
- api-verification/*.spec.ts: API call verification tests
- websocket-verification/ws-connection.spec.ts: WebSocket tests
- capture-session-flow*.spec.ts: Session flow analysis tests

Test Fixtures & Results:
- fixtures/legacy-sequences/: Recorded API call sequences
- test-results/: Test output, comparisons, and analysis

These tests were instrumental in debugging the VU meter issue and
verifying the trackSync implementation.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-23 15:42:35 +05:30
Nuwan e48048ac4e WIP: Track sync implementation with TDD approach
- Implemented trackSyncService with full test coverage
- Added 13 unit tests (all passing)
- Added 7 integration tests
- Wired up track sync in session join, instrument change, and media actions
- Fixed jamClient.clientID() async call issue
- Fixed hasJoined vs sessionJoined property mismatch

Note: Rails API endpoint PUT /api/sessions/:id/tracks still needs implementation
Note: Investigating VU meter issue that may be unrelated to this feature
2026-01-23 12:28:40 +05:30
Nuwan 97f26e5e13 setup playwright e2e tests 2021-10-15 17:36:58 +05:30