|
@@ -21,7 +21,7 @@ describe('Application life cycle test', function () {
|
|
|
|
|
|
var chrome = require('selenium-webdriver/chrome');
|
|
var chrome = require('selenium-webdriver/chrome');
|
|
var server, browser = new chrome.Driver(), uploadedImageUrl;
|
|
var server, browser = new chrome.Driver(), uploadedImageUrl;
|
|
- var username = 'admin', password = 'changeme123';
|
|
|
|
|
|
+ var username = 'admin', password = 'changeme123', oldPassword = 'changeme';
|
|
|
|
|
|
before(function (done) {
|
|
before(function (done) {
|
|
var seleniumJar= require('selenium-server-standalone-jar');
|
|
var seleniumJar= require('selenium-server-standalone-jar');
|
|
@@ -43,7 +43,7 @@ describe('Application life cycle test', function () {
|
|
var app;
|
|
var app;
|
|
var email, token;
|
|
var email, token;
|
|
|
|
|
|
- function login(done) {
|
|
|
|
|
|
+ function login(username, password, done) {
|
|
// browser.manage().window().setSize(1280,768).then(function () {
|
|
// browser.manage().window().setSize(1280,768).then(function () {
|
|
browser.manage().deleteAllCookies().then(function () {
|
|
browser.manage().deleteAllCookies().then(function () {
|
|
return browser.get('https://' + app.fqdn + '/login');
|
|
return browser.get('https://' + app.fqdn + '/login');
|
|
@@ -196,7 +196,7 @@ describe('Application life cycle test', function () {
|
|
expect(app).to.be.an('object');
|
|
expect(app).to.be.an('object');
|
|
});
|
|
});
|
|
|
|
|
|
- it('can login', login);
|
|
|
|
|
|
+ it('can login', login.bind(null, username, password));
|
|
it('check mail plugin', checkMailPlugin);
|
|
it('check mail plugin', checkMailPlugin);
|
|
it('can install custom plugin', installCustomPlugin);
|
|
it('can install custom plugin', installCustomPlugin);
|
|
it('can restart forum', restartForum); // required before activate!
|
|
it('can restart forum', restartForum); // required before activate!
|
|
@@ -213,7 +213,7 @@ describe('Application life cycle test', function () {
|
|
execSync('cloudron restore --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
|
execSync('cloudron restore --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
|
});
|
|
});
|
|
|
|
|
|
- it('can login', login);
|
|
|
|
|
|
+ it('can login', login.bind(null, username, password));
|
|
it('can list custom plugin', listCustomPlugin);
|
|
it('can list custom plugin', listCustomPlugin);
|
|
it('can check image', checkImage);
|
|
it('can check image', checkImage);
|
|
|
|
|
|
@@ -222,7 +222,7 @@ describe('Application life cycle test', function () {
|
|
done();
|
|
done();
|
|
});
|
|
});
|
|
|
|
|
|
- it('can login', login);
|
|
|
|
|
|
+ it('can login', login.bind(null, username, password));
|
|
it('can list custom plugin', listCustomPlugin);
|
|
it('can list custom plugin', listCustomPlugin);
|
|
it('can check image', checkImage);
|
|
it('can check image', checkImage);
|
|
|
|
|
|
@@ -233,7 +233,7 @@ describe('Application life cycle test', function () {
|
|
expect(app).to.be.an('object');
|
|
expect(app).to.be.an('object');
|
|
});
|
|
});
|
|
|
|
|
|
- it('can login', login);
|
|
|
|
|
|
+ it('can login', login.bind(null, username, password));
|
|
it('can list custom plugin', listCustomPlugin);
|
|
it('can list custom plugin', listCustomPlugin);
|
|
it('can check image', checkImage);
|
|
it('can check image', checkImage);
|
|
|
|
|
|
@@ -248,7 +248,7 @@ describe('Application life cycle test', function () {
|
|
app = inspect.apps.filter(function (a) { return a.location === LOCATION; })[0];
|
|
app = inspect.apps.filter(function (a) { return a.location === LOCATION; })[0];
|
|
expect(app).to.be.an('object');
|
|
expect(app).to.be.an('object');
|
|
});
|
|
});
|
|
- it('can login', login);
|
|
|
|
|
|
+ it('can login', login.bind(null, username, oldPassword));
|
|
it('check mail plugin', checkMailPlugin);
|
|
it('check mail plugin', checkMailPlugin);
|
|
it('can update', function () {
|
|
it('can update', function () {
|
|
execSync('cloudron install --wait --app ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
|
execSync('cloudron install --wait --app ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|