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

Create automated-testing-with-a-custom-driver.md #12446

Merged
merged 4 commits into from Apr 20, 2018

Conversation

Projects
None yet
3 participants
@pfrazee
Contributor

pfrazee commented Mar 27, 2018

@zeke asked me to write up a quick tutorial on how you can write an alternative to spectron for driving tests. Here it is, LMK if you'd like any changes.

@pfrazee pfrazee requested a review from electron/docs as a code owner Mar 27, 2018

@zeke

zeke approved these changes Mar 27, 2018

A few minor nits, but this looks great overall. Can you add it to the table of contents in docs/README.md?

appProcess.send({my: 'message'})
```
From within the Electron app, you can listen for messages and send replies using the nodejs[process](https://nodejs.org/api/process.html) API:

This comment has been minimized.

@zeke

zeke Mar 27, 2018

Member

Missing space in nodejs[process]

```js
var test = require('ava')
var electron = require('./node_modules/electron')

This comment has been minimized.

@zeke

zeke Mar 27, 2018

Member

Why ./node_modules/electron and not electron? So you can get the path? If so, a var name like electronPath might be more clear.

@zeke

This comment has been minimized.

Member

zeke commented Mar 27, 2018

Also it looks like the JS is invalid in a few spots:

   tutorial/automated-testing-with-a-custom-driver.md
         12:17:    Parsing error: Unexpected token }
         93:59:    Infix operators must be spaced.
         111:4:    Unexpected trailing comma.
         112:1:    Trailing spaces not allowed.

pfrazee added some commits Mar 28, 2018

@pfrazee

This comment has been minimized.

Contributor

pfrazee commented Mar 28, 2018

@zeke done

@codebytere

This comment has been minimized.

Member

codebytere commented Apr 20, 2018

@pfrazee would love to get this across the finish line, think you can patch those last few lint errors?

@pfrazee

This comment has been minimized.

Contributor

pfrazee commented Apr 20, 2018

Done!

@codebytere codebytere merged commit 94236bf into master Apr 20, 2018

8 checks passed

WIP ready for review
Details
ci/circleci: electron-linux-arm Your tests passed on CircleCI!
Details
ci/circleci: electron-linux-arm-test Your tests passed on CircleCI!
Details
ci/circleci: electron-linux-arm64 Your tests passed on CircleCI!
Details
ci/circleci: electron-linux-arm64-test Your tests passed on CircleCI!
Details
ci/circleci: electron-linux-ia32 Your tests passed on CircleCI!
Details
ci/circleci: electron-linux-x64 Your tests passed on CircleCI!
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details

@codebytere codebytere deleted the doc-test-driver-tutorial branch Apr 20, 2018

@pfrazee

This comment has been minimized.

Contributor

pfrazee commented Apr 20, 2018

@codebytere Whoop! Any ETA for it going on the site?

@codebytere

This comment has been minimized.

Member

codebytere commented Apr 20, 2018

@zeke would have a better idea than me 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment