|
@@ -42,6 +42,7 @@ describe('Application life cycle test', function () {
|
|
var email, token;
|
|
var email, token;
|
|
|
|
|
|
function login(done) {
|
|
function login(done) {
|
|
|
|
+ browser.manage().window().setSize(1280,768);
|
|
browser.manage().deleteAllCookies();
|
|
browser.manage().deleteAllCookies();
|
|
browser.get('https://' + app.fqdn + '/login');
|
|
browser.get('https://' + app.fqdn + '/login');
|
|
browser.executeScript('localStorage.clear();')
|
|
browser.executeScript('localStorage.clear();')
|
|
@@ -59,8 +60,8 @@ describe('Application life cycle test', function () {
|
|
function checkMailPlugin(done) {
|
|
function checkMailPlugin(done) {
|
|
browser.get('https://' + app.fqdn + '/admin/emailers/local');
|
|
browser.get('https://' + app.fqdn + '/admin/emailers/local');
|
|
browser.sleep(4000);
|
|
browser.sleep(4000);
|
|
- browser.wait(until.elementLocated(by.id('emailer:local:host')), TEST_TIMEOUT).then(function () {
|
|
|
|
- browser.findElement(by.id('emailer:local:host')).getAttribute('value').then(function (val) {
|
|
|
|
|
|
+ browser.wait(until.elementLocated(by.id('host')), TEST_TIMEOUT).then(function () {
|
|
|
|
+ browser.findElement(by.id('host')).getAttribute('value').then(function (val) {
|
|
if (val !== 'mail') return done(new Error('Incorrect mail server value: ' + val));
|
|
if (val !== 'mail') return done(new Error('Incorrect mail server value: ' + val));
|
|
done();
|
|
done();
|
|
});
|
|
});
|
|
@@ -84,7 +85,7 @@ describe('Application life cycle test', function () {
|
|
}
|
|
}
|
|
|
|
|
|
function installCustomPlugin(done) {
|
|
function installCustomPlugin(done) {
|
|
- execSync('cloudron exec -- /usr/local/bin/gosu cloudron:cloudron npm install nodebb-plugin-beep', { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
|
|
|
|
|
+ execSync('cloudron exec --app ' + app.id + ' -- /usr/local/bin/gosu cloudron:cloudron npm install nodebb-plugin-beep', { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
|
done();
|
|
done();
|
|
}
|
|
}
|
|
|
|
|
|
@@ -138,9 +139,7 @@ describe('Application life cycle test', function () {
|
|
execSync('cloudron build', { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
|
execSync('cloudron build', { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
|
});
|
|
});
|
|
|
|
|
|
- console.log('IMPORTANT: make the browser window full screen. Otherwise the responsive UI hides elements required for this test');
|
|
|
|
-
|
|
|
|
- it('install app', function () {
|
|
|
|
|
|
+ xit('install app', function () {
|
|
execSync('cloudron install --new --wait --location ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
|
execSync('cloudron install --new --wait --location ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
|
});
|
|
});
|
|
|
|
|
|
@@ -183,7 +182,7 @@ describe('Application life cycle test', function () {
|
|
it('can check image', checkImage);
|
|
it('can check image', checkImage);
|
|
|
|
|
|
it('move to different location', function () {
|
|
it('move to different location', function () {
|
|
- execSync('cloudron configure --wait --location ' + LOCATION + '2', { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
|
|
|
|
|
+ execSync('cloudron configure --wait --location ' + LOCATION + '2 --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
|
var inspect = JSON.parse(execSync('cloudron inspect'));
|
|
var inspect = JSON.parse(execSync('cloudron inspect'));
|
|
app = inspect.apps.filter(function (a) { return a.location === LOCATION + '2'; })[0];
|
|
app = inspect.apps.filter(function (a) { return a.location === LOCATION + '2'; })[0];
|
|
expect(app).to.be.an('object');
|
|
expect(app).to.be.an('object');
|