codebytere

#52811: test: close the sign-in dialog the inAppPurchase suite leaves on screen

Merged
Created: Aug 14, 2026, 7:08:06 AM
Merged: Aug 14, 2026, 8:52:44 AM
4 comments
Target: main

Description of Change

Without an App Store session, StoreKit answers inAppPurchase.restoreCompletedTransactions() with an Apple Account sign-in dialog shown by a system agent, and nothing dismisses it, so it stays centred on screen for the rest of the job. Whenever script/split-tests.js places api-in-app-purchase-spec.ts ahead of the screen-capture tests in a shard, the <webview> / WebContentsView transparency and border-radius captures read the dialog's grey (#ececec) instead of the page and fail; any PR that adds enough tests to reshuffle the macOS arm64 split hits it (e.g. #52807, #52808), and the uploaded color-mismatch-*.png artifacts show the sign-in sheet over the capture point. The suite now snapshots the processes that own on-screen windows before it runs and, afterwards, terminates any system agent that has put up a window since, until the screen is back to what it was.

Checklist

  • PR description included and stakeholders cc'd
  • npm test passes
  • tests are changed or added

Release Notes

Notes: none

Backports

42-x-y
In-flight
PR Number
#52817
Waiting to be merged
43-x-y
In-flight
PR Number
#52816
Waiting to be merged
44-x-y
In-flight
PR Number
#52818
Waiting to be merged

Semver Impact

Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.

Semantic Versioning helps users understand the impact of updates:

  • Major (X.y.z): Breaking changes that may require code modifications
  • Minor (x.Y.z): New features that maintain backward compatibility
  • Patch (x.y.Z): Bug fixes that don't change the API
  • None: Changes that don't affect using facing parts of Electron