diff --git a/CloudronManifest.json b/CloudronManifest.json index af13b96..e76742f 100644 --- a/CloudronManifest.json +++ b/CloudronManifest.json @@ -5,7 +5,7 @@ "description": "file://DESCRIPTION.md", "changelog": "file://CHANGELOG", "tagline": "Decentralized file synchronization", - "version": "1.0.0", + "version": "1.0.0-1", "healthCheckPath": "/healthcheck", "httpPort": 8000, "addons": { diff --git a/test/package.json b/test/package.json index c36a51e..803ca7d 100644 --- a/test/package.json +++ b/test/package.json @@ -9,6 +9,7 @@ "author": "", "license": "ISC", "dependencies": { + "chromedriver": "^2.31.0", "ejs": "^2.4.2", "expect.js": "^0.3.1", "mkdirp": "^0.5.1", @@ -16,7 +17,6 @@ "rimraf": "^2.5.3", "selenium-server-standalone-jar": "^2.53.1", "selenium-webdriver": "^2.53.1", - "superagent": "^1.4.0", - "chromedriver": "^2.31.0" + "superagent": "^1.8.5" } } diff --git a/test/test.js b/test/test.js index c74fc26..e34a13b 100644 --- a/test/test.js +++ b/test/test.js @@ -4,6 +4,7 @@ var execSync = require('child_process').execSync, expect = require('expect.js'), + superagent = require('superagent'), path = require('path'), webdriver = require('selenium-webdriver'); @@ -61,6 +62,14 @@ describe('Application life cycle test', function () { }); } + function invalidPassword(callback) { + superagent.get('https://' + app.fqdn).auth(username, password + 'x').end(function (error, result) { + expect(result.status).to.eql(401); + + callback(); + }); + } + function loadPage(callback) { browser.manage().deleteAllCookies().then(function () { return browser.get('https://' + username + ':' + encodeURIComponent(password) + '@' + app.fqdn).then(function () { @@ -135,6 +144,7 @@ describe('Application life cycle test', function () { expect(app).to.be.an('object'); }); + it('fails with invalid password', invalidPassword); it('can load page', loadPage); it('can add folder', addFolder);