Skip to content

Conversation

@ammar-agent
Copy link
Collaborator

Summary

Add comprehensive E2E tests covering window lifecycle, IPC robustness, streaming edge cases, persistence, and error display. These tests target recent regression patterns.

Recent Regressions Addressed

Regression Test Coverage
MockBrowserWindow.isDestroyed() (#863) IPC stability tests verify no crashes during heavy IPC
IPC send to destroyed window (#859) ipcRobustness.spec.ts - concurrent IPC operations
Duplicate IPC handler registration (#851) windowLifecycle.spec.ts - rapid IPC calls test
Stream error handling (#880) streamEdgeCases.spec.ts + errorDisplay.spec.ts

New Test Files (26 tests total)

  • windowLifecycle.spec.ts (6 tests): window operations, IPC stability under load
  • ipcRobustness.spec.ts (4 tests): concurrent IPC calls, state preservation
  • streamEdgeCases.spec.ts (6 tests): streaming during UI operations, error scenarios
  • persistence.spec.ts (4 tests): chat history, settings, mode persistence
  • errorDisplay.spec.ts (6 tests): error messages display, recovery flows

Infrastructure Changes

  • Error mock scenarios: rate limit, server error, network error scenarios
  • Stream timeline capture: now handles stream-error events (previously only stream-end)
  • CI matrix: Linux (comprehensive, 47 tests) + macOS (window lifecycle, 6 tests)

CI Configuration

matrix:
  include:
    - os: linux      # Comprehensive E2E tests
    - os: macos      # Window lifecycle tests only (platform-dependent)

Generated with mux

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@ammar-agent ammar-agent force-pushed the electron-e2e-tests branch 2 times, most recently from 7219d69 to bed9e1c Compare December 3, 2025 17:11
Add E2E tests targeting recent regression patterns:
- Window lifecycle: startup, workspace loading, rapid navigation, IPC stability
- Streaming behavior: modal interruption, mode switching, error handling
- Persistence: chat history survives reload and settings navigation

Also:
- Add mock error scenarios (rate limit, server error, network error)
- Fix captureStreamTimeline to handle stream-error events
- Run E2E tests on macOS (depot runner) for window lifecycle coverage
- Fix macOS CI compatibility (grep -oE, conditional install-deps)

_Generated with mux_
@ammario ammario changed the title 🤖 feat: add robust Electron E2E tests for regression prevention 🤖 ci: add robust Electron E2E tests for regression prevention Dec 3, 2025
@ammario ammario merged commit f754732 into main Dec 3, 2025
15 of 16 checks passed
@ammario ammario deleted the electron-e2e-tests branch December 3, 2025 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants