-
-
Notifications
You must be signed in to change notification settings - Fork 294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
first step to get electron browser running, but tests not working yet #2818
base: master
Are you sure you want to change the base?
Conversation
|
@@ -24,7 +24,7 @@ git remote add upstream [email protected]:modernweb-dev/web.git | |||
Now that you have cloned the repository, ensure you have node 18+ installed, then run the following command to set up the development environment. | |||
|
|||
```sh | |||
npm install | |||
npm clean-install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I committed package-lock.json, and running npm clean-install
will ensure that the setup is reproducible for the next person (npm install
will update dependencies which always has a risk of breaking something).
if (this.browser) { | ||
if (!('isConnected' in this.browser) || this.browser.isConnected()) { | ||
await this.browser.close(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ElectronApplication
instance does not have a isConnected
method.
createPage = ({ context }) => context.newPage(), | ||
createBrowserContext = ({ browser }) => { | ||
if ('browserWindow' in browser) { | ||
return browser.context(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no newContext()
method on the ElectronApplication
instance. There seems to be a single context for the whole ElectronApplication
only, so maybe this is why the tests are not working?
}, | ||
createPage = ({ context, browser }) => { | ||
if ('browserWindow' in browser) { | ||
return browser.firstWindow(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The firstWindows
is a playwright Page
. Maybe for Electron we need to open and close windows, instead of making contexts?
// testFailure: true, | ||
// locationChanged: true, | ||
// }); | ||
// }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- TODO re-enable other tests before mering
TODO:
playwrite._electron
experimental Electron launcher.