Преглед изворни кода

Wait for configure to finish

Girish Ramakrishnan пре 8 година
родитељ
комит
72867e4d36
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      test/test.js

+ 2 - 2
test/test.js

@@ -85,7 +85,7 @@ describe('Application life cycle test', function () {
 
     function checkPost(done) {
         browser.get('https://' + app.fqdn);
-        browser.findElement(by.xpath('//h2/a[text()="Hello Cloudron!"]')).then(function () { done(); });
+        browser.wait(until.elementLocated(by.xpath('//h2/a[text()="Hello Cloudron!"]')), TIMEOUT).then(function () { done(); });
     }
 
     xit('build app', function () {
@@ -206,7 +206,7 @@ describe('Application life cycle test', function () {
 
     it('move to different location', function () {
         browser.manage().deleteAllCookies();
-        execSync('cloudron configure --location ' + LOCATION + '2', { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
+        execSync('cloudron configure --wait --location ' + LOCATION + '2', { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
         var inspect = JSON.parse(execSync('cloudron inspect'));
         app = inspect.apps.filter(function (a) { return a.location === LOCATION + '2'; })[0];
         expect(app).to.be.an('object');