Skip to content

test: add Electron smoke test#298

Open
icebear0828 wants to merge 1 commit intomasterfrom
fix/121-electron-smoke-test-17712378451594297203
Open

test: add Electron smoke test#298
icebear0828 wants to merge 1 commit intomasterfrom
fix/121-electron-smoke-test-17712378451594297203

Conversation

@icebear0828
Copy link
Copy Markdown
Owner

This pull request introduces a smoke test to ensure the Electron app successfully builds, packages, and launches without crashing, addressing the requirements outlined in #121.

The changes involve:

  1. Adding @playwright/test and playwright as development dependencies in the packages/electron workspace.
  2. Creating an isolated E2E test packages/electron/__tests__/smoke.test.ts using Vitest and Playwright. The test:
    • Uses esbuild and electron-builder to verify the build process.
    • Launches the compiled executable headless-ly.
    • Verifies the application's main window opens and checks the title.
  3. Implementing proper cleanup of transient testing artifacts (temporary Chromium data directory).
  4. Restricting the execution of this specific smoke test using describe.runIf to prevent it from polluting standard unit test executions by requiring explicitly set environment variables (CI or RUN_E2E_SMOKE), thus resolving the local DX degradation issue.
  5. Successfully bypassing native module (codex-tls) loading errors during testing by generating a temporary local.yaml overlay configuring the curl-cli transport and executing with DISABLE_NATIVE_TRANSPORT=1.

PR created automatically by Jules for task 17712378451594297203 started by @icebear0828

Addresses #121.

Adds an isolated E2E smoke test using Playwright and Vitest that verifies the
Electron application can successfully build, package (via electron-builder),
and launch without crashing.

- Added `@playwright/test` and `playwright` to `@codex-proxy/electron` devDependencies.
- Created `packages/electron/__tests__/smoke.test.ts`.
- Bypasses native transport errors during testing using `local.yaml` and `DISABLE_NATIVE_TRANSPORT=1`.
- Conditionally executed via `process.env.CI || process.env.RUN_E2E_SMOKE` to avoid local test suite pollution.
- Proper cleanup of temporary Chromium user data directories.

Co-authored-by: icebear0828 <63769498+icebear0828@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

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.

1 participant