Skip to content

test: verify Electron app packages and launches#274

Open
icebear0828 wants to merge 1 commit intomasterfrom
jules/ci-electron-launch-test-5717836816977082209
Open

test: verify Electron app packages and launches#274
icebear0828 wants to merge 1 commit intomasterfrom
jules/ci-electron-launch-test-5717836816977082209

Conversation

@icebear0828
Copy link
Copy Markdown
Owner

Resolves #121

This PR adds an automated CI workflow and Playwright smoke test to ensure that the Electron app can build, package, and launch successfully without crashing.

Key additions:

  1. packages/electron/__tests__/launch.test.ts: Uses Playwright to start the built app headlessly with the necessary sandbox flags, asserts the window opens, checks for no crash logs in the DOM, and closes the app cleanly. Mocking userDataDir ensures curl-impersonate dependency errors do not halt the startup sequence.
  2. vitest.config.ts: Increased testTimeout to 60000ms to prevent timeouts when electron-builder packages the application during test setup. Preserved existing aliases.
  3. .github/workflows/ci-electron.yml: Automates testing on the master branch by caching Node.js, setting up Playwright dependencies (--with-deps), building the web & main processes, and running the headless test via xvfb-run -a.

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

Added a Playwright smoke test (`launch.test.ts`) that verifies the built Electron application can be launched headlessly without crashing. This handles mocking native transport prerequisites and uses dynamic binary resolution.
Added a GitHub Actions workflow (`ci-electron.yml`) to automatically build, pack, and run the Playwright test on push/PR.
Increased the default testTimeout in `vitest.config.ts` to accommodate the packaging process.

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.

test: verify Electron app packages and launches

1 participant