Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Dec 13, 2025

This PR contains the following updates:

Package Change Age Confidence
electron-playwright-helpers 1.8.22.1.0 age confidence

Release Notes

spaceagetv/electron-playwright-helpers (electron-playwright-helpers)

v2.1.0

Compare Source

Features
  • new functions to find/track Electron windows (#​79) (2a2ebcb)

v2.0.1

Compare Source

v2.0.0

Compare Source

Bug Fixes
  • central retry() with timeout (105c1c1)
  • cleanup merge (08f78c3)
  • disable option for retry (3f7f9be)
  • disable retry on menuItemClick ƒs (14a410e)
  • don’t throw context error when retry is disabled (1fc1789)
  • improve error handling for ipc helpers (3102d34)
  • include stack trace in retry() timeout error (2f7fb3b)
  • increase default retry count and expand error matching criteria (c686f81)
  • more retries, better errors (6965e08)
  • replace 'rm -rf' with 'rimraf' (225016a)
  • retry() reject with proper Error (4243488)
  • tsc —project for older TS (a81968c)
  • tweaks (23edf67)
  • typescript type (8bfdcfa)
  • update build script to use specific tsconfig and add new tsconfig.build.json (86be85b)
  • update jsdoc-to-markdown to 9.x for Node.js 24 compatibility (43c4be0)
  • update Node.js versions in CI workflow to include 20 (19fb0fa)
  • update retry options and improve tests for retryUntilTruthy (2f024d1)
  • update TypeScript target to ES2019 in tsconfig.json (e3eb8d6)
  • Use retry everywhere (6839258)
  • use structuredClone (4cad27b)
Features
  • add dialog stubbing matchers for conditional return values (a17d6f5)
  • add retry options management functions and update error matching logic (ed8a92c)
  • add v2.0 migration guide (71f4bd5)
  • browserWindowWithRetry() (2ae2083)
  • evaluateWithRetry handle general errors (f1e6c35)
  • evaluateWithRetry() (938ab35)
  • retryUntilTruthy() (704e330)
BREAKING CHANGES
  • Node.js 18+ is now required. IPC helper functions (ipcRendererSend, ipcRendererInvoke, etc.) and menu helper functions (clickMenuItemById, clickMenuItem, etc.) now accept an optional RetryOptions parameter. While existing code continues to work without modification, the underlying behavior has changed to automatically retry operations on Playwright context errors.

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/electron-playwright-helpers-2.x branch 2 times, most recently from 43307d6 to a0d52e4 Compare December 31, 2025 13:56
@olexs
Copy link
Owner

olexs commented Dec 31, 2025

@claude The Renovate PR build failed (workflow run: 20620445090).

Please analyze the CI failure and implement a fix if possible.

Workflow run: https://github.com/olexs/pdf-assembler/actions/runs/20620445090

@claude
Copy link

claude bot commented Dec 31, 2025

Claude finished @olexs's task in 4m 56s —— View job


Analysis Complete ✓

Problem

The Windows E2E tests were failing with timeouts:

  • macOS: 1 flaky test (landscape orientation)
  • Windows: 1 failed + 4 flaky tests (multiple tests timing out)

All failures occurred while waiting for #save-button:not([disabled]), indicating PDF generation wasn't completing.

Root Cause

The afterEach hook was calling await electronApp.firstWindow() to access the page for localStorage cleanup. In electron-playwright-helpers v2.0, the retry/error handling has changed significantly. When firstWindow() is called during/after window lifecycle events, it can fail or return incorrect window references, especially on Windows where timing is more critical.

Solution Implemented

Store the page reference from launchApp() in a module variable (currentPage) and reuse it in afterEach, avoiding the need to call firstWindow() again.

Changes Made

 let electronApp: ElectronApplication;
 let appInfo: ElectronAppInfo;
+let currentPage: Page;

 async function launchApp(...args: string[]): Promise<Page> {
     // ... existing code ...
-    return electronApp.firstWindow();
+    currentPage = await electronApp.firstWindow();
+    return currentPage;
 }

 test.afterEach(async () => {
     // Clear localStorage to prevent state poisoning between tests
-    const page = await electronApp.firstWindow();
-    await page.evaluate(() => {
+    // Use the stored page reference instead of calling firstWindow() again
+    await currentPage.evaluate(() => {
         localStorage.clear();
     });

Pre-commit Checks

  • Lint: Passed
  • Unit Tests: 83 passed
  • Package: Built successfully
  • ⏭️ E2E Tests: Will run in CI (local execution not permitted)

Status

I've prepared the fix and created a commit locally, but I don't have push permissions to update this PR branch. You'll need to apply this change manually or grant push permissions.

To apply the fix, either:

  1. Pull the changes from my commit 2ac6098 if accessible, or
  2. Manually apply the diff shown above to e2e-tests/main.spec.ts

The fix is minimal and targeted - it simply caches the page reference to avoid race conditions with the new retry behavior in electron-playwright-helpers v2.0.

--- | Branch

@renovate renovate bot force-pushed the renovate/electron-playwright-helpers-2.x branch from a0d52e4 to b373498 Compare January 8, 2026 17:25
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