|
@@ -77,6 +77,24 @@ describe('Application life cycle test SSO', function () {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ function adminLogin(callback) {
|
|
|
|
+ browser.get('https://' + app.fqdn + '/admin').then(function () {
|
|
|
|
+ return browser.findElement(by.name('username')).sendKeys('admin');
|
|
|
|
+ }).then(function () {
|
|
|
|
+ return browser.findElement(by.name('password')).sendKeys('123123');
|
|
|
|
+ }).then(function () {
|
|
|
|
+ return browser.findElement(by.className('login-form')).submit();
|
|
|
|
+ }).then(function () {
|
|
|
|
+ return waitForElement(by.xpath('//h1[text()="Site administration"]'));
|
|
|
|
+ }).then(function () {
|
|
|
|
+ return browser.findElement(by.xpath('//a[text()="Log out"]')).click();
|
|
|
|
+ }).then(function () {
|
|
|
|
+ return browser.sleep(2000);
|
|
|
|
+ }).then(function () {
|
|
|
|
+ callback();
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
function userStoryExists(callback) {
|
|
function userStoryExists(callback) {
|
|
browser.get('https://' + app.fqdn + '/project/' + process.env.USERNAME + '-' + PROJECT_NAME + '/us/1').then(function () {
|
|
browser.get('https://' + app.fqdn + '/project/' + process.env.USERNAME + '-' + PROJECT_NAME + '/us/1').then(function () {
|
|
return waitForElement(by.xpath('//span[text()="' + USER_STORY_SUBJECT + '"]'));
|
|
return waitForElement(by.xpath('//span[text()="' + USER_STORY_SUBJECT + '"]'));
|
|
@@ -165,6 +183,7 @@ describe('Application life cycle test SSO', function () {
|
|
});
|
|
});
|
|
|
|
|
|
it('can get app information', getAppInfo);
|
|
it('can get app information', getAppInfo);
|
|
|
|
+ it('can admin login', adminLogin);
|
|
it('can login', login);
|
|
it('can login', login);
|
|
it('can dismiss tutorial', dismissTutorial);
|
|
it('can dismiss tutorial', dismissTutorial);
|
|
it('can create project', createProject);
|
|
it('can create project', createProject);
|
|
@@ -187,6 +206,7 @@ describe('Application life cycle test SSO', function () {
|
|
|
|
|
|
it('can get app information', getAppInfo);
|
|
it('can get app information', getAppInfo);
|
|
|
|
|
|
|
|
+ it('can admin login', adminLogin);
|
|
// origin change requires new login
|
|
// origin change requires new login
|
|
it('can login', login);
|
|
it('can login', login);
|
|
it('user story is still present', userStoryExists);
|
|
it('user story is still present', userStoryExists);
|
|
@@ -202,6 +222,7 @@ describe('Application life cycle test SSO', 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 ' + app.manifest.id + ' --location ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ it('can admin login', adminLogin);
|
|
it('can get app information', getAppInfo);
|
|
it('can get app information', getAppInfo);
|
|
it('can login', login);
|
|
it('can login', login);
|
|
it('can dismiss tutorial', dismissTutorial);
|
|
it('can dismiss tutorial', dismissTutorial);
|
|
@@ -211,6 +232,7 @@ describe('Application life cycle test SSO', function () {
|
|
it('can update', function () {
|
|
it('can update', function () {
|
|
execSync('cloudron install --wait --app ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
|
execSync('cloudron install --wait --app ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
|
});
|
|
});
|
|
|
|
+ it('can admin login', adminLogin);
|
|
it('user story exists', userStoryExists);
|
|
it('user story exists', userStoryExists);
|
|
it('uninstall app', function () {
|
|
it('uninstall app', function () {
|
|
execSync('cloudron uninstall --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
|
execSync('cloudron uninstall --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|