-
Notifications
You must be signed in to change notification settings - Fork 1
Add HMI test for tci #21
base: master
Are you sure you want to change the base?
Conversation
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.
Globally good for me :)
Just suggesting to move to ES6: replace var
by const
everywhere. It if fails, use let
;)
And removing semicolumns would be a plus (less is better)
test/hmi/tci.js
Outdated
@@ -0,0 +1,31 @@ | |||
var Nightmare = require('nightmare'); |
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.
const Nightmare =
test/hmi/tci.js
Outdated
@@ -0,0 +1,31 @@ | |||
var Nightmare = require('nightmare'); | |||
var vo = require('vo'); |
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.
const vo =…
test/hmi/tci.js
Outdated
var Nightmare = require('nightmare'); | ||
var vo = require('vo'); | ||
|
||
vo(run)(function(err, result) { |
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.
vo(run)((err, result) => { …
test/hmi/tci.js
Outdated
}); | ||
|
||
function* run() { | ||
var nightmare = Nightmare({ show: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.
const nightmare …
test/hmi/tci.js
Outdated
var testIsRunning = false | ||
|
||
yield nightmare | ||
.goto('http://127.0.0.1:5000/e8a92eadb3b86c0124193ee86ffdebbb') |
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.
Where do you get this token from?
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 got this token from the script in #20
package.json
Outdated
"license": "MIT" | ||
"license": "MIT", | ||
"devDependencies": { | ||
"electron": "^1.6.11", |
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.
Why Electron?
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 think I had added electron for testing something with nightmare, I've removed it
package.json
Outdated
"devDependencies": { | ||
"electron": "^1.6.11", | ||
"nightmare": "^2.10.0", | ||
"vo": "^4.0.2" |
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.
What is vo?
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 use it for yield
call chain https://github.com/rosshinkley/nightmare-examples/blob/master/docs/beginner/vo.md
Maybe we have to find a better way to check the end of a survey (we already check this in unit tests I don't know if we have to reproduce the test here)
For the URL I think we have to automatize it with a script like #20
cc @vinyll