Commit 33ee47f3 by Johannes Zellner

Fixup some more tests

1 parent a0ce51e7
Showing with 10 additions and 7 deletions
...@@ -40,10 +40,17 @@ describe('Application life cycle test', function () { ...@@ -40,10 +40,17 @@ describe('Application life cycle test', function () {
browser.quit(); browser.quit();
}); });
function getAppInfo() { function getAppInfo(location, done) {
if (!done) {
done = location;
location = LOCATION;
}
var inspect = JSON.parse(execSync('cloudron inspect')); 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'); expect(app).to.be.an('object');
done();
} }
function waitForElement(elem) { function waitForElement(elem) {
...@@ -135,7 +142,6 @@ describe('Application life cycle test', function () { ...@@ -135,7 +142,6 @@ describe('Application life cycle test', function () {
xit('build app', function () { execSync('cloudron build', EXEC_ARGS); }); xit('build app', function () { execSync('cloudron build', EXEC_ARGS); });
it('install app', function () { execSync(`cloudron install --location ${LOCATION}`, EXEC_ARGS); }); it('install app', function () { execSync(`cloudron install --location ${LOCATION}`, EXEC_ARGS); });
it('can get app information', getAppInfo); it('can get app information', getAppInfo);
it('can login', login); it('can login', login);
...@@ -168,10 +174,7 @@ describe('Application life cycle test', function () { ...@@ -168,10 +174,7 @@ describe('Application life cycle test', function () {
// ensure we don't hit NXDOMAIN in the mean time // ensure we don't hit NXDOMAIN in the mean time
browser.get('about:blank').then(function () { browser.get('about:blank').then(function () {
execSync(`cloudron configure --location ${LOCATION}2 --app ${app.id}`, EXEC_ARGS); execSync(`cloudron configure --location ${LOCATION}2 --app ${app.id}`, EXEC_ARGS);
getAppInfo(`${LOCATION}2`, done);
getAppInfo();
done();
}); });
}); });
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!