Open bigorn0 opened 8 months ago
We appreciate you taking the time to share information about this issue. We reproduced the bug and added this ticket to our internal task queue. We'll update this thread once we have news.
We managed to make the TestCafe tests start with Electron 28 by patching src/injectable/index.js
.
We have modified the existing logic below:
// src/injectable/index.js, line 19
const isMain = args[2];
const isNotBrowserInitMainModule = isMain && !isBrowserInitModule(args[0]);
if (isNotBrowserInitMainModule) {
...
}
as followed:
// src/injectable/index.js, line 19
const isMain = args[2];
const isNotBrowserInitMainModule = isMain && !isBrowserInitModule(args[0]);
const isNotBrowserInitMainModuleAsOfElectron28 = args[0] === 'electron' && !args[1];
const runDecorator = isNotBrowserInitMainModule || isNotBrowserInitMainModuleAsOfElectron28;
if (runDecorator) {
...
}
We have validated this patch by running npm run test
in this repository after upgrading the following dev dependencies:
electron
to the version 28.1.3
@electron/remote
to the version 2.1.1
If you are looking for a solution to make the plugin work for a more recent version of Electron, then have a look at #119.
Hello,
while upgrading my application to latest Electron 28 latest release, I wanted to validate my test tooling and i noticed that Testcafe integration doesn't work anymore. It only opens the default Electron page and displays the help command output in logs.
I started to try to find a workaround (or at least the root cause) but so far no luck for now
Note that it works perfectly with Electron 27.
Could you please check?
Thanks!