I'm running into an issue where I cannot get testcafe to load properly. It starts the testcafe service and loads the index.html file but the bundle never loads so any DOM selection fails as it is not available.
because of create-react-app, we've got a varied folder structure from the examples that I would like not to deviate from.
folder structure
|-_e2eTest
|--...testFiles
|-build
|-public
|--index.html
|-src
|--index.js
|--electron-starter.js
|-.testcafe-electron-rc
|-package.json
package.json
{
...
"main": "./src/electron-starter.js",
"scripts": {
...
"testcafe": "testcafe electron:. ./_e2eTest/**/*.js"
...
}
}
.testcafe-electron-rc
{
"mainWindowUrl": "./build/index.html", // works similarly with "./public/index.html"
"appPath": "./"
}
links for reference
https://github.com/DevExpress/testcafe-browser-provider-electron
https://github.com/DevExpress/testcafe-browser-provider-electron/issues/25
https://github.com/DevExpress/testcafe-browser-provider-electron/issues/30