X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=test%2Ftest.js;h=be812c29cebc2b53adce2155e25968d7ec042625;hb=83544c5c8685db63b98d8035b99c501afe509776;hp=8145f179486d7340821ec8ee1a60e9e9a9d4b9aa;hpb=a0ce51e752db8b10493a01055961299ebd283803;p=perso%2FImmae%2FProjets%2FNodejs%2FSurfer.git 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 () { browser.quit(); }); - function getAppInfo() { + function getAppInfo(location, done) { + if (!done) { + done = location; + location = LOCATION; + } + var inspect = JSON.parse(execSync('cloudron inspect')); - 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'); + + done(); } function waitForElement(elem) { @@ -135,7 +142,6 @@ describe('Application life cycle test', function () { xit('build app', function () { execSync('cloudron build', EXEC_ARGS); }); it('install app', function () { execSync(`cloudron install --location ${LOCATION}`, EXEC_ARGS); }); - it('can get app information', getAppInfo); it('can login', login); @@ -168,10 +174,7 @@ describe('Application life cycle test', function () { // ensure we don't hit NXDOMAIN in the mean time browser.get('about:blank').then(function () { execSync(`cloudron configure --location ${LOCATION}2 --app ${app.id}`, EXEC_ARGS); - - getAppInfo(); - - done(); + getAppInfo(`${LOCATION}2`, done); }); });