chore(electron): revert #40184 (move Electron API to a separate package)#40733
chore(electron): revert #40184 (move Electron API to a separate package)#40733yury-s merged 3 commits intomicrosoft:mainfrom
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
b0c37f8 to
5214b8d
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…osoft#40184)" This reverts commit e09b169. # Conflicts: # packages/playwright-core/src/electron/electron.ts
Follow-up to the revert of PR microsoft#40184 that brings the tree to a working state on top of the main-branch changes that landed after the PR: - Re-add Electron protocol entries to packages/protocol/spec/electron.yml and the Electron initializer to packages/protocol/spec/playwright.yml (protocol.yml was split into per-interface spec/*.yml files in microsoft#40645). - Keep Electron docs in docs/src/electron-api/ but restore their pre-PR full content (the PR had truncated docs to match the trimmed-down CDP-only API). doclint cli.js merges electron-api docs. - Drop the leftover docs/src/electron/loader bundling step from utils/build/build.js (loader is back at server/electron/loader.ts). - Update the restored server/electron/electron.ts import after the toConsoleMessageLocation -> stackTraceToLocation rename in microsoft#39767. - Drop the explicit _electron registration from inprocess.ts; with the server-side dispatcher restored, _electron is wired through the Playwright initializer again. - Remove duplicate _electron exports in index.mjs and overrides.d.ts. - Restore the pre-PR ElectronApplication evaluate/evaluateHandle override signatures so the generated types are consistent.
…soft#40184 The revert of microsoft#40184 deleted tests/electron/electron-options-app.js but left the spec changes that reference it ('should set timezone via process.env.TZ' and 'should ignore https errors via --ignore-certificate-errors switch' tests added in microsoft#40184). Restore the helper so those tests pass again. Also re-add `acceptDownloads: true` to the 'should report downloads' test — microsoft#40184 had dropped it because the new architecture made it the default, but the reverted server-side flow still requires it.
Test results for "MCP"2 failed 7029 passed, 1068 skipped Merge workflow run. |
Test results for "tests 1"4 flaky41702 passed, 850 skipped Merge workflow run. |
Test results for "tests others"19 flaky19700 passed, 651 skipped Merge workflow run. |
Test results for "tests 2"8 fatal errors, not part of any test 78 flaky272764 passed, 11395 skipped, 1008 did not run Merge workflow run. |
Summary
client/electron.ts,server/electron/*,server/dispatchers/electronDispatcher.ts) because the CDP-based replacement broke_electron.launch({ executablePath })for packaged apps such as VS Code (the loader can't be injected, so__playwright_electronis never set in the Node debugger context).packages/playwright-electron/andpackages/playwright-core/src/electron/.packages/protocol/spec/electron.ymland theelectroninitializer topackages/protocol/spec/playwright.yml(monolithicprotocol.ymlwas split into per-interface files in chore: split protocol.yml #40645).timezoneId,ignoreHTTPSErrors,recordVideo,recordHar,acceptDownloads,artifactsDir,bypassCSP.electronApp.close({ timeout })API), so this branch ships a clean revert with no timeout option.tests/electron/electron-options-app.jsso the migration tests added in feat(electron): move Electron API to a separate package #40184 (should set timezone via process.env.TZ,should ignore https errors via --ignore-certificate-errors switch) keep passing, and re-addsacceptDownloads: truetoshould report downloads.