Skip to content

chore(deps): update dependency electron-playwright-helpers to v2#766

Open
renovate[bot] wants to merge 2 commits into
masterfrom
renovate/electron-playwright-helpers-2.x
Open

chore(deps): update dependency electron-playwright-helpers to v2#766
renovate[bot] wants to merge 2 commits into
masterfrom
renovate/electron-playwright-helpers-2.x

Conversation

@renovate

@renovate renovate Bot commented Dec 13, 2025

Copy link
Copy Markdown
Contributor

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

olexs commented Dec 31, 2025

Copy link
Copy Markdown
Owner

@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

claude Bot commented Dec 31, 2025

Copy link
Copy Markdown

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
@renovate renovate Bot force-pushed the renovate/electron-playwright-helpers-2.x branch 3 times, most recently from 611cf50 to ef60f77 Compare January 23, 2026 19:57
@renovate renovate Bot force-pushed the renovate/electron-playwright-helpers-2.x branch from ef60f77 to f91438d Compare February 2, 2026 18:29
@olexs

olexs commented Feb 2, 2026

Copy link
Copy Markdown
Owner

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

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

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

@claude

claude Bot commented Feb 2, 2026

Copy link
Copy Markdown

Claude finished @olexs's task in 2m 58s —— View job


Analysis Complete ✓

Todo List:

  • Fetch and analyze CI workflow logs
  • Identify specific test failures
  • Check current state of e2e-tests/main.spec.ts
  • Implement fix for electron-playwright-helpers v2
  • Run pre-commit checks (lint, test, package)
  • Commit and push changes

Problem

All E2E tests were timing out on both Windows and macOS at line 170 (waitForSelector('#save-button:not([disabled])')), indicating PDF generation wasn't completing.

Root Cause

The afterEach hook was calling await electronApp.firstWindow() to get a page reference for localStorage cleanup. In electron-playwright-helpers v2.0, the retry/error handling has changed significantly (as noted in the breaking changes). When firstWindow() is called during/after window lifecycle events, it can fail or return incorrect window references, causing subsequent tests to hang.

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

Status

Fix has been committed and pushed to the PR branch. The CI will now run E2E tests to verify the fix resolves the timeout issues on both Windows and macOS.

--- | Branch

…compatibility

In electron-playwright-helpers v2, calling firstWindow() during window
lifecycle events can fail or return incorrect references due to changes
in retry/error handling. Store the page reference from launchApp() in a
module variable and reuse it in afterEach to avoid race conditions.

Co-authored-by: Olex S. <olexs@users.noreply.github.com>
@renovate

renovate Bot commented Feb 2, 2026

Copy link
Copy Markdown
Contributor Author

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

⚠️ Warning: custom changes will be lost.

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