diff options
author | Johannes Zellner <johannes@cloudron.io> | 2020-01-06 00:18:33 +0100 |
---|---|---|
committer | Johannes Zellner <johannes@cloudron.io> | 2020-01-06 00:18:33 +0100 |
commit | 33ee47f3ca0322ccb19153cafa1c1f7b886dc61a (patch) | |
tree | d5a5dc8bc29db7774b4babcd7eddeb77a6008be6 | |
parent | a0ce51e752db8b10493a01055961299ebd283803 (diff) | |
download | Surfer-33ee47f3ca0322ccb19153cafa1c1f7b886dc61a.tar.gz Surfer-33ee47f3ca0322ccb19153cafa1c1f7b886dc61a.tar.zst Surfer-33ee47f3ca0322ccb19153cafa1c1f7b886dc61a.zip |
Fixup some more tests
-rw-r--r-- | test/test.js | 17 |
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 | ||