mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-06 22:20:55 +03:00
testing circle install firefox
This commit is contained in:
22
test/frontend/driver.js
Normal file
22
test/frontend/driver.js
Normal file
@@ -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>
|
||||
mocha.checkLeaks();
|
||||
mocha.globals(['jQuery']);
|
||||
mocha.run();
|
||||
mocha.run(function(err) {
|
||||
document.title = err;
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user