فهرست منبع

add phpmyadmin test

Girish Ramakrishnan 8 سال پیش
والد
کامیت
9f079b6bc3
1فایلهای تغییر یافته به همراه15 افزوده شده و 0 حذف شده
  1. 15 0
      test/test.js

+ 15 - 0
test/test.js

@@ -67,6 +67,19 @@ describe('Application life cycle test', function () {
         });
     }
 
+    function checkPhpMyAdmin(callback) {
+        browser.get('https://' + app.fqdn + '/phpmyadmin');
+
+        browser.wait(by.xpath('//h2[text()="General settings"]'), TEST_TIMEOUT)
+            .catch(function () {
+            // let's assume we could not login
+
+            browser.get('https://' + process.env.USERNAME + ':' + process.env.PASSWORD + '@' + app.fqdn + '/phpmyadmin');
+
+            waitForElement(by.xpath('//h2[text()="General settings"]'), callback);
+        });
+    }
+
     xit('build app', function () {
         execSync('cloudron build', { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
     });
@@ -91,6 +104,8 @@ describe('Application life cycle test', function () {
     });
     it('can get uploaded file', uploadedFileExists);
 
+    it('can access phpmyadmin', checkPhpMyAdmin);
+
     it('backup app', function () {
         execSync('cloudron backup create --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
     });