testing circle install firefox
This commit is contained in:
parent
e9c49073a8
commit
e5f2b386bb
|
@ -5,6 +5,11 @@ machine:
|
||||||
- docker
|
- docker
|
||||||
- redis
|
- redis
|
||||||
|
|
||||||
|
dependencies:
|
||||||
|
pre:
|
||||||
|
- npm i -g get-firefox
|
||||||
|
- get-firefox --platform linux --extract --target /home/ubuntu/send
|
||||||
|
|
||||||
deployment:
|
deployment:
|
||||||
latest:
|
latest:
|
||||||
branch: master
|
branch: master
|
||||||
|
|
|
@ -28,6 +28,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"adm-zip": {
|
||||||
|
"version": "0.4.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.7.tgz",
|
||||||
|
"integrity": "sha1-hgbCy/HEJs6MjsABdER/1Jtur8E="
|
||||||
|
},
|
||||||
"ajv": {
|
"ajv": {
|
||||||
"version": "4.11.8",
|
"version": "4.11.8",
|
||||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz",
|
"resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz",
|
||||||
|
@ -1376,8 +1381,7 @@
|
||||||
"fs.realpath": {
|
"fs.realpath": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
||||||
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
|
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"fsevents": {
|
"fsevents": {
|
||||||
"version": "1.1.2",
|
"version": "1.1.2",
|
||||||
|
@ -3189,8 +3193,7 @@
|
||||||
"os-tmpdir": {
|
"os-tmpdir": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
|
||||||
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
|
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"outpipe": {
|
"outpipe": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
|
@ -3777,13 +3780,11 @@
|
||||||
"version": "2.6.1",
|
"version": "2.6.1",
|
||||||
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.1.tgz",
|
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.1.tgz",
|
||||||
"integrity": "sha1-wjOOxkPfeht/5cVPqG9XQopV8z0=",
|
"integrity": "sha1-wjOOxkPfeht/5cVPqG9XQopV8z0=",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"glob": {
|
"glob": {
|
||||||
"version": "7.1.2",
|
"version": "7.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
|
||||||
"integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
|
"integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ=="
|
||||||
"dev": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -3833,6 +3834,18 @@
|
||||||
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz",
|
||||||
"integrity": "sha1-e45lYZCyKOgaZq6nSEgNgozS03o="
|
"integrity": "sha1-e45lYZCyKOgaZq6nSEgNgozS03o="
|
||||||
},
|
},
|
||||||
|
"selenium-webdriver": {
|
||||||
|
"version": "3.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-3.4.0.tgz",
|
||||||
|
"integrity": "sha1-FR90RSlNpqZsScwwB0eioX5TxSo=",
|
||||||
|
"dependencies": {
|
||||||
|
"tmp": {
|
||||||
|
"version": "0.0.30",
|
||||||
|
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.30.tgz",
|
||||||
|
"integrity": "sha1-ckGdSovn1s51FI/YsyTlk6cRwu0="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"semver": {
|
"semver": {
|
||||||
"version": "5.3.0",
|
"version": "5.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz",
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
"raven": "^2.1.0",
|
"raven": "^2.1.0",
|
||||||
"raven-js": "^3.16.0",
|
"raven-js": "^3.16.0",
|
||||||
"redis": "^2.7.1",
|
"redis": "^2.7.1",
|
||||||
|
"selenium-webdriver": "^3.4.0",
|
||||||
"supertest": "^3.0.0",
|
"supertest": "^3.0.0",
|
||||||
"uglify-es": "3.0.19"
|
"uglify-es": "3.0.19"
|
||||||
},
|
},
|
||||||
|
@ -51,8 +52,8 @@
|
||||||
"lint:css": "stylelint 'public/*.css'",
|
"lint:css": "stylelint 'public/*.css'",
|
||||||
"lint:js": "eslint .",
|
"lint:js": "eslint .",
|
||||||
"start": "node server/server",
|
"start": "node server/server",
|
||||||
"test": "mocha test/unit && mocha test/server",
|
"test": "mocha test/unit && mocha test/server && npm run test-browser && node test/frontend/driver.js",
|
||||||
"test-browser": "watchify test/frontend/frontend.bundle.js -o test/frontend/bundle.js -d",
|
"test-browser": "browserify test/frontend/frontend.bundle.js -o test/frontend/bundle.js -d",
|
||||||
"version": "node scripts/version"
|
"version": "node scripts/version"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
var webdriver = require('selenium-webdriver'),
|
||||||
|
By = webdriver.By,
|
||||||
|
until = webdriver.until;
|
||||||
|
|
||||||
|
var driver = new webdriver.Builder()
|
||||||
|
.forBrowser('firefox')
|
||||||
|
.build();
|
||||||
|
|
||||||
|
driver.get('file:///' + __dirname + '/frontend.test.html');
|
||||||
|
driver.wait(until.titleIs('Mocha Tests'), 1000);
|
||||||
|
driver.wait(until.titleMatches(/^[0-1]$/), 10000);
|
||||||
|
|
||||||
|
driver.getTitle().then(title => {
|
||||||
|
driver.quit().then(() => {
|
||||||
|
if (title === "0") {
|
||||||
|
process.exit(0);
|
||||||
|
} else {
|
||||||
|
throw new Error(`Frontend tests are failing. ` +
|
||||||
|
`Please open the frontend.test.html file in a browser.`);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
|
@ -16,7 +16,12 @@
|
||||||
<script>
|
<script>
|
||||||
mocha.checkLeaks();
|
mocha.checkLeaks();
|
||||||
mocha.globals(['jQuery']);
|
mocha.globals(['jQuery']);
|
||||||
mocha.run();
|
mocha.run(function(err) {
|
||||||
|
document.title = err;
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
Loading…
Reference in New Issue