aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/test.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/test.js')
-rw-r--r--test/test.js17
1 files changed, 10 insertions, 7 deletions
diff --git a/test/test.js b/test/test.js
index 8145f17..be812c2 100644
--- a/test/test.js
+++ b/test/test.js
@@ -40,10 +40,17 @@ describe('Application life cycle test', function () {
40 browser.quit(); 40 browser.quit();
41 }); 41 });
42 42
43 function getAppInfo() { 43 function getAppInfo(location, done) {
44 if (!done) {
45 done = location;
46 location = LOCATION;
47 }
48
44 var inspect = JSON.parse(execSync('cloudron inspect')); 49 var inspect = JSON.parse(execSync('cloudron inspect'));
45 app = inspect.apps.filter(function (a) { return a.location === LOCATION; })[0]; 50 app = inspect.apps.filter(function (a) { return a.location === location; })[0];
46 expect(app).to.be.an('object'); 51 expect(app).to.be.an('object');
52
53 done();
47 } 54 }
48 55
49 function waitForElement(elem) { 56 function waitForElement(elem) {
@@ -135,7 +142,6 @@ describe('Application life cycle test', function () {
135 xit('build app', function () { execSync('cloudron build', EXEC_ARGS); }); 142 xit('build app', function () { execSync('cloudron build', EXEC_ARGS); });
136 143
137 it('install app', function () { execSync(`cloudron install --location ${LOCATION}`, EXEC_ARGS); }); 144 it('install app', function () { execSync(`cloudron install --location ${LOCATION}`, EXEC_ARGS); });
138
139 it('can get app information', getAppInfo); 145 it('can get app information', getAppInfo);
140 146
141 it('can login', login); 147 it('can login', login);
@@ -168,10 +174,7 @@ describe('Application life cycle test', function () {
168 // ensure we don't hit NXDOMAIN in the mean time 174 // ensure we don't hit NXDOMAIN in the mean time
169 browser.get('about:blank').then(function () { 175 browser.get('about:blank').then(function () {
170 execSync(`cloudron configure --location ${LOCATION}2 --app ${app.id}`, EXEC_ARGS); 176 execSync(`cloudron configure --location ${LOCATION}2 --app ${app.id}`, EXEC_ARGS);
171 177 getAppInfo(`${LOCATION}2`, done);
172 getAppInfo();
173
174 done();
175 }); 178 });
176 }); 179 });
177 180