Commit 39a0ec92 authored by yann300's avatar yann300

mend

parent befe8fdd
...@@ -3,10 +3,7 @@ node_js: ...@@ -3,10 +3,7 @@ node_js:
- stable - stable
script: script:
- npm run test - npm run test
- npm run build - bash ci/browser_tests.sh
- npm run serve &
- npm run nightwatch_local
- npm run test
deploy: deploy:
provider: script provider: script
script: ci/deploy_from_travis.sh script: ci/deploy_from_travis.sh
......
#!/bin/bash
set -e
SAUCECONNECT_URL="http://saucelabs.com/downloads/sc-4.3.16-linux.tar.gz"
SAUCECONNECT_USERNAME="yann300"
SAUCECONNECT_ACCESSKEY="e6f430f2-daa0-48bb-90fd-8bee20f429eb"
SAUCECONNECT_JOBIDENTIFIER="remix_tests_${TRAVIS_JOB_NUMBER}"
SAUCECONNECT_READYFILE="sc.ready"
npm run build
npm run serve &
wget $SAUCECONNECT_URL
tar -zxvf sc-4.3.16-linux.tar.gz
./sc-4.3.16-linux/bin/sc -u $SAUCECONNECT_USERNAME -k $SAUCECONNECT_ACCESSKEY -i $SAUCECONNECT_JOBIDENTIFIER --readyfile $SAUCECONNECT_READYFILE &
while [ ! -f $SAUCECONNECT_READYFILE ]; do
sleep .5
done
npm run nightwatch_remote_firefox
npm run nightwatch_remote_chrome
npm run nightwatch_remote_safari
npm run nightwatch_remote_ie
curl -X delete "http://saucelabs.com/rest/v1/${SAUCECONNECT_USERNAME}/tunnels/${SAUCECONNECT_JOBIDENTIFIER}"
...@@ -43,8 +43,38 @@ module.exports = { ...@@ -43,8 +43,38 @@ module.exports = {
'browserName': 'firefox', 'browserName': 'firefox',
'javascriptEnabled': true, 'javascriptEnabled': true,
'acceptSslCerts': true, 'acceptSslCerts': true,
'build': `build-${TRAVIS_JOB_NUMBER}`, 'build': 'build-' + TRAVIS_JOB_NUMBER,
'tunnel-identifier': TRAVIS_JOB_NUMBER 'tunnel-identifier': 'remix_tests_' + TRAVIS_JOB_NUMBER
}
},
'chrome': {
'desiredCapabilities': {
'browserName': 'chrome',
'javascriptEnabled': true,
'acceptSslCerts': true,
'build': 'build-' + TRAVIS_JOB_NUMBER,
'tunnel-identifier': 'remix_tests_' + TRAVIS_JOB_NUMBER
}
},
'safari': {
'desiredCapabilities': {
'browserName': 'safari',
'javascriptEnabled': true,
'acceptSslCerts': true,
'build': 'build-' + TRAVIS_JOB_NUMBER,
'tunnel-identifier': 'remix_tests_' + TRAVIS_JOB_NUMBER
}
},
'internetexplorer': {
'desiredCapabilities': {
'browserName': 'internetexplorer',
'javascriptEnabled': true,
'acceptSslCerts': true,
'build': 'build-' + TRAVIS_JOB_NUMBER,
'tunnel-identifier': 'remix_tests_' + TRAVIS_JOB_NUMBER
} }
}, },
...@@ -62,14 +92,6 @@ module.exports = { ...@@ -62,14 +92,6 @@ module.exports = {
'javascriptEnabled': true, 'javascriptEnabled': true,
'acceptSslCerts': true 'acceptSslCerts': true
} }
},
'chrome': {
'desiredCapabilities': {
'browserName': 'firefox',
'javascriptEnabled': true,
'acceptSslCerts': true
}
} }
} }
} }
...@@ -30,8 +30,11 @@ ...@@ -30,8 +30,11 @@
"build": "mkdir -p build; browserify src/index.js -o build/app.js", "build": "mkdir -p build; browserify src/index.js -o build/app.js",
"test": "standard && tape ./test/tests.js", "test": "standard && tape ./test/tests.js",
"serve": "http-server .", "serve": "http-server .",
"nightwatch_remote": "nightwatch --config nightwatch.js --env default", "nightwatch_local": "nightwatch --config nightwatch.js --env local",
"nightwatch_local": "nightwatch --config nightwatch.js --env local" "nightwatch_remote_firefox": "nightwatch --config nightwatch.js --env default",
"nightwatch_remote_chrome": "nightwatch --config nightwatch.js --env chrome",
"nightwatch_remote_safari": "nightwatch --config nightwatch.js --env safari",
"nightwatch_remote_ie": "nightwatch --config nightwatch.js --env ie"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
......
...@@ -51,9 +51,7 @@ ASMCode.prototype.codeChanged = function (code, address, index) { ...@@ -51,9 +51,7 @@ ASMCode.prototype.codeChanged = function (code, address, index) {
ASMCode.prototype.renderAssemblyItems = function () { ASMCode.prototype.renderAssemblyItems = function () {
if (this.code) { if (this.code) {
this.codeView = this.code.map(function (item, i) { this.codeView = this.code.map(function (item, i) {
return yo`<option key=${i} value=${i}> return yo`<option key=${i} value=${i}>${item}</option>`
${item}
</option>`
}) })
return this.codeView return this.codeView
} }
......
...@@ -42,7 +42,7 @@ function injectScript (file, browser, callback) { ...@@ -42,7 +42,7 @@ function injectScript (file, browser, callback) {
function extendBrowser (browser) { function extendBrowser (browser) {
browser.assertCurrentSelectedItem = function (expected) { browser.assertCurrentSelectedItem = function (expected) {
browser.getValue('#asmitems', function (result) { browser.getValue('#asmitems', function (result) {
browser.assert.containsText('#asmitems option[value="' + result.value + '"]', expected) browser.expect.element('#asmitems option[value="' + result.value + '"]').text.to.equal(expected)
}) })
return browser return browser
} }
......
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