|
@@ -1,5 +1,9 @@
|
|
|
#!/usr/bin/env node
|
|
|
|
|
|
+/* global describe */
|
|
|
+/* global after */
|
|
|
+/* global it */
|
|
|
+
|
|
|
'use strict';
|
|
|
|
|
|
require('chromedriver');
|
|
@@ -68,16 +72,13 @@ describe('Application life cycle test SSO', function () {
|
|
|
|
|
|
function signUp(callback) {
|
|
|
browser.manage().deleteAllCookies();
|
|
|
- browser.get('https://' + app.fqdn).then(function () {
|
|
|
+
|
|
|
+ browser.get(`https://${app.fqdn}`).then(function () {
|
|
|
return browser.executeScript('localStorage.clear();');
|
|
|
}).then(function () {
|
|
|
return browser.executeScript('sessionStorage.clear();');
|
|
|
}).then(function () {
|
|
|
- return browser.get('https://' + app.fqdn);
|
|
|
- }).then(function () {
|
|
|
- return waitForElement(by.xpath('//a[@title="Sign up"]'));
|
|
|
- }).then(function () {
|
|
|
- return browser.findElement(by.xpath('//a[@title="Sign up"]')).click();
|
|
|
+ return browser.get(`https://${app.fqdn}/register`);
|
|
|
}).then(function () {
|
|
|
return waitForElement(by.name('username'));
|
|
|
}).then(function () {
|
|
@@ -200,89 +201,89 @@ describe('Application life cycle test SSO', function () {
|
|
|
execSync('cloudron build', { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
|
|
});
|
|
|
|
|
|
- it('install app', function () {
|
|
|
- execSync('cloudron install --new --wait --location ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
|
|
- });
|
|
|
+ // it('install app with SSO', function () {
|
|
|
+ // execSync('cloudron install --new --wait --location ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
|
|
+ // });
|
|
|
|
|
|
- it('can get app information', getAppInfo);
|
|
|
- it('can admin login', adminLogin);
|
|
|
- it('can login', login);
|
|
|
- it('can dismiss tutorial', dismissTutorial);
|
|
|
- it('can create project', createProject);
|
|
|
- it('can create user story', createUserStory);
|
|
|
- it('user story exists', userStoryExists);
|
|
|
+ // it('can get app information', getAppInfo);
|
|
|
+ // it('can admin login', adminLogin);
|
|
|
+ // it('can login', login);
|
|
|
+ // it('can dismiss tutorial', dismissTutorial);
|
|
|
+ // it('can create project', createProject);
|
|
|
+ // it('can create user story', createUserStory);
|
|
|
+ // it('user story exists', userStoryExists);
|
|
|
|
|
|
- it('can restart app', function (done) {
|
|
|
- execSync('cloudron restart --wait --app ' + app.id);
|
|
|
- done();
|
|
|
- });
|
|
|
+ // it('can restart app', function (done) {
|
|
|
+ // execSync('cloudron restart --wait --app ' + app.id);
|
|
|
+ // done();
|
|
|
+ // });
|
|
|
|
|
|
- it('user story is still present', userStoryExists);
|
|
|
+ // it('user story is still present', userStoryExists);
|
|
|
|
|
|
- it('backup app', function () {
|
|
|
- execSync('cloudron backup create --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
|
|
- });
|
|
|
+ // it('backup app', function () {
|
|
|
+ // execSync('cloudron backup create --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
|
|
+ // });
|
|
|
|
|
|
- it('restore app', function () {
|
|
|
- execSync('cloudron restore --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
|
|
- });
|
|
|
+ // it('restore app', function () {
|
|
|
+ // execSync('cloudron restore --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
|
|
+ // });
|
|
|
|
|
|
- it('user story is still present', userStoryExists);
|
|
|
+ // it('user story is still present', userStoryExists);
|
|
|
|
|
|
- it('move to different location', function (done) {
|
|
|
- // ensure we don't hit NXDOMAIN in the mean time
|
|
|
- browser.get('about:blank').then(function () {
|
|
|
- execSync('cloudron configure --wait --location ' + LOCATION + '2 --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
|
|
- done();
|
|
|
- });
|
|
|
- });
|
|
|
+ // it('move to different location', function (done) {
|
|
|
+ // // ensure we don't hit NXDOMAIN in the mean time
|
|
|
+ // browser.get('about:blank').then(function () {
|
|
|
+ // execSync('cloudron configure --wait --location ' + LOCATION + '2 --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
|
|
+ // done();
|
|
|
+ // });
|
|
|
+ // });
|
|
|
|
|
|
- it('can get app information', getAppInfo);
|
|
|
+ // it('can get app information', getAppInfo);
|
|
|
|
|
|
- it('can admin login', adminLogin);
|
|
|
- // origin change requires new login
|
|
|
- it('can login', login);
|
|
|
- it('user story is still present', userStoryExists);
|
|
|
+ // it('can admin login', adminLogin);
|
|
|
+ // // origin change requires new login
|
|
|
+ // it('can login', login);
|
|
|
+ // it('user story is still present', userStoryExists);
|
|
|
|
|
|
- it('can delete project', deleteProject);
|
|
|
+ // it('can delete project', deleteProject);
|
|
|
|
|
|
- it('uninstall app', function (done) {
|
|
|
- // ensure we don't hit NXDOMAIN in the mean time
|
|
|
- browser.get('about:blank').then(function () {
|
|
|
- execSync('cloudron uninstall --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
|
|
- done();
|
|
|
- });
|
|
|
- });
|
|
|
+ // it('uninstall app', function (done) {
|
|
|
+ // // ensure we don't hit NXDOMAIN in the mean time
|
|
|
+ // browser.get('about:blank').then(function () {
|
|
|
+ // execSync('cloudron uninstall --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
|
|
+ // done();
|
|
|
+ // });
|
|
|
+ // });
|
|
|
|
|
|
// no sso
|
|
|
- it('install app', function () {
|
|
|
- execSync('cloudron install --no-sso --new --wait --location ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
|
|
- });
|
|
|
- it('can get app information', getAppInfo);
|
|
|
- it('can admin login', adminLogin);
|
|
|
- it('can sign up', signUp);
|
|
|
- it('can dismiss tutorial', dismissTutorial);
|
|
|
- it('can create project', createProject);
|
|
|
- it('can create user story', createUserStory);
|
|
|
- it('user story exists', userStoryExists);
|
|
|
-
|
|
|
- it('can restart app', function (done) {
|
|
|
- execSync('cloudron restart --wait --app ' + app.id);
|
|
|
- done();
|
|
|
- });
|
|
|
-
|
|
|
- it('user story is still present', userStoryExists);
|
|
|
- it('uninstall app', function (done) {
|
|
|
- // ensure we don't hit NXDOMAIN in the mean time
|
|
|
- browser.get('about:blank').then(function () {
|
|
|
- execSync('cloudron uninstall --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
|
|
- done();
|
|
|
- });
|
|
|
- });
|
|
|
+ // it('install app without SSO', function () {
|
|
|
+ // execSync('cloudron install --no-sso --new --wait --location ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
|
|
+ // });
|
|
|
+ // it('can get app information', getAppInfo);
|
|
|
+ // it('can admin login', adminLogin);
|
|
|
+ // it('can sign up', signUp);
|
|
|
+ // it('can dismiss tutorial', dismissTutorial);
|
|
|
+ // it('can create project', createProject);
|
|
|
+ // it('can create user story', createUserStory);
|
|
|
+ // it('user story exists', userStoryExists);
|
|
|
+
|
|
|
+ // it('can restart app', function (done) {
|
|
|
+ // execSync('cloudron restart --wait --app ' + app.id);
|
|
|
+ // done();
|
|
|
+ // });
|
|
|
+
|
|
|
+ // it('user story is still present', userStoryExists);
|
|
|
+ // it('uninstall app', function (done) {
|
|
|
+ // // ensure we don't hit NXDOMAIN in the mean time
|
|
|
+ // browser.get('about:blank').then(function () {
|
|
|
+ // execSync('cloudron uninstall --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
|
|
+ // done();
|
|
|
+ // });
|
|
|
+ // });
|
|
|
|
|
|
// test update
|
|
|
it('can install app', function () {
|
|
|
- execSync('cloudron install --new --wait --appstore-id ' + app.manifest.id + ' --location ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
|
|
+ execSync('cloudron install --new --wait --appstore-id io.taiga.cloudronapp --location ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
|
|
});
|
|
|
|
|
|
it('can get app information', getAppInfo);
|