Commit a4e7ba42 authored by chriseth's avatar chriseth Committed by GitHub

Merge pull request #103 from redsquirrel/browser-testing1

Having another go at stable in-browser testing
parents 6c742368 82e1de3b
...@@ -4,7 +4,7 @@ node_js: ...@@ -4,7 +4,7 @@ node_js:
before_script: before_script:
- npm run serve & - npm run serve &
script: script:
- npm run lint && npm run test && npm run build && nightwatch --env chrome - npm run lint && npm run test && npm run build && nightwatch --env remote
- pkill node - pkill node
addons: addons:
sauce_connect: sauce_connect:
......
...@@ -51,11 +51,11 @@ To run the Selenium tests via nightwatch serve the app through a local web serve ...@@ -51,11 +51,11 @@ To run the Selenium tests via nightwatch serve the app through a local web serve
Then you will need to either: Then you will need to either:
1. Have a Selenium server running locally on port 4444 along with the chromedriver installed. 1. Have a Selenium server running locally on port 4444.
* Run: `./node_modules/nightwatch/bin/nightwatch --env local` * Run: `./node_modules/nightwatch/bin/nightwatch --env local`
1. Or, install SauceConnect and run it locally `sc -u <USERNAME> -k <ACCESS_KEY>` (see .travis.yml for values) 1. Or, install and run SauceConnect.
* Run: `./node_modules/nightwatch/bin/nightwatch --env chrome` * Run: `sc -u <USERNAME> -k <ACCESS_KEY>` (see .travis.yml for values)
* Run: `./node_modules/nightwatch/bin/nightwatch --env remote`
## Usage as a Chrome Extension ## Usage as a Chrome Extension
......
...@@ -21,9 +21,9 @@ ...@@ -21,9 +21,9 @@
"waitForConditionTimeout": 60000 "waitForConditionTimeout": 60000
} }
}, },
"chrome" : { "remote" : {
"desiredCapabilities": { "desiredCapabilities": {
"browserName": "chrome", "browserName": "firefox",
"javascriptEnabled": true, "javascriptEnabled": true,
"acceptSslCerts": true "acceptSslCerts": true
} }
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
"selenium_port": 4444, "selenium_port": 4444,
"selenium_host": "localhost", "selenium_host": "localhost",
"desiredCapabilities": { "desiredCapabilities": {
"browserName": "chrome", "browserName": "firefox",
"javascriptEnabled": true, "javascriptEnabled": true,
"acceptSslCerts": true "acceptSslCerts": true
} }
......
...@@ -2,7 +2,7 @@ module.exports = { ...@@ -2,7 +2,7 @@ module.exports = {
'New file test': function (browser) { 'New file test': function (browser) {
browser browser
.url('http://127.0.0.1:8080') .url('http://127.0.0.1:8080')
.waitForElementVisible('.newFile', 5000) .waitForElementVisible('.newFile', 10000)
.click('.newFile') .click('.newFile')
.assert.containsText('.active', 'Untitled') .assert.containsText('.active', 'Untitled')
.end(); .end();
......
...@@ -2,7 +2,7 @@ module.exports = { ...@@ -2,7 +2,7 @@ module.exports = {
'Smoke test': function (browser) { 'Smoke test': function (browser) {
browser browser
.url('http://127.0.0.1:8080') .url('http://127.0.0.1:8080')
.waitForElementVisible('#righthand-panel', 5000) .waitForElementVisible('#righthand-panel', 10000)
.assert.containsText('#righthand-panel', 'Solidity version') .assert.containsText('#righthand-panel', 'Solidity version')
.end(); .end();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment