|
|
|
|
@@ -134,6 +134,27 @@ describe('Application life cycle test', function () {
|
|
|
|
|
// await skipVerification();
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
if (await browser.findElements(By.xpath('//div[text()="Proceed with reset"]')).then(found => !!found.length)) {
|
|
|
|
|
await browser.findElement(By.xpath('//div[text()="Proceed with reset"]')).click();
|
|
|
|
|
|
|
|
|
|
await waitForElement(By.xpath('//button[text()="Continue"]'));
|
|
|
|
|
await browser.findElement(By.xpath('//button[text()="Continue"]')).click();
|
|
|
|
|
|
|
|
|
|
await waitForElement(By.xpath('//div[text()="Copy"]'));
|
|
|
|
|
await browser.findElement(By.xpath('//div[text()="Copy"]')).click();
|
|
|
|
|
|
|
|
|
|
await browser.sleep(1000);
|
|
|
|
|
|
|
|
|
|
await waitForElement(By.xpath('//button[text()="Continue"]'));
|
|
|
|
|
await browser.findElement(By.xpath('//button[text()="Continue"]')).click();
|
|
|
|
|
|
|
|
|
|
await waitForElement(By.xpath('//button[text()="Done"]'));
|
|
|
|
|
await browser.findElement(By.xpath('//button[text()="Done"]')).click();
|
|
|
|
|
|
|
|
|
|
await waitForElement(By.xpath('//div[text()="Cancel"]'));
|
|
|
|
|
await browser.findElement(By.xpath('//div[text()="Cancel"]')).click();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
await browser.sleep(3000);
|
|
|
|
|
await waitForElement(By.xpath(`//h1[contains(., "Welcome")]`));
|
|
|
|
|
}
|
|
|
|
|
@@ -228,98 +249,98 @@ describe('Application life cycle test', function () {
|
|
|
|
|
|
|
|
|
|
xit('build app', function () { execSync('cloudron build', EXEC_ARGS); });
|
|
|
|
|
|
|
|
|
|
// No SSO
|
|
|
|
|
it('install app (no sso)', function () { execSync('cloudron install --no-sso --location ' + LOCATION, EXEC_ARGS); });
|
|
|
|
|
it('can get app information', getAppInfo);
|
|
|
|
|
it('check landing page', checkLandingPage);
|
|
|
|
|
// // No SSO
|
|
|
|
|
// it('install app (no sso)', function () { execSync('cloudron install --no-sso --location ' + LOCATION, EXEC_ARGS); });
|
|
|
|
|
// it('can get app information', getAppInfo);
|
|
|
|
|
// it('check landing page', checkLandingPage);
|
|
|
|
|
|
|
|
|
|
it('can install element-web app (no sso)', function () { execSync('cloudron install --appstore-id im.riot.cloudronapp --location ' + ELEMENT_LOCATION, EXEC_ARGS); });
|
|
|
|
|
it('update element-app config', updateSynapseConfig);
|
|
|
|
|
// it('can install element-web app (no sso)', function () { execSync('cloudron install --appstore-id im.riot.cloudronapp --location ' + ELEMENT_LOCATION, EXEC_ARGS); });
|
|
|
|
|
// it('update element-app config', updateSynapseConfig);
|
|
|
|
|
|
|
|
|
|
it('can get Element app info', getElementAppInfo);
|
|
|
|
|
it('can register new user', registerUser);
|
|
|
|
|
it('create room', createRoom);
|
|
|
|
|
it('can send message', sendMessage);
|
|
|
|
|
// it('can get Element app info', getElementAppInfo);
|
|
|
|
|
// it('can register new user', registerUser);
|
|
|
|
|
// it('create room', createRoom);
|
|
|
|
|
// it('can send message', sendMessage);
|
|
|
|
|
|
|
|
|
|
it('can logout', logout);
|
|
|
|
|
// it('can logout', logout);
|
|
|
|
|
|
|
|
|
|
it('can login', login);
|
|
|
|
|
it('check room', checkRoom);
|
|
|
|
|
it('can logout', logout);
|
|
|
|
|
// it('can login', login);
|
|
|
|
|
// it('check room', checkRoom);
|
|
|
|
|
// it('can logout', logout);
|
|
|
|
|
|
|
|
|
|
it('can get app info', getAppInfo);
|
|
|
|
|
// it('can get app info', getAppInfo);
|
|
|
|
|
|
|
|
|
|
it('uninstall element-web app', async function () {
|
|
|
|
|
await browser.get('about:blank');
|
|
|
|
|
execSync(`cloudron uninstall --app ${ELEMENT_LOCATION}`, EXEC_ARGS);
|
|
|
|
|
});
|
|
|
|
|
it('uninstall app', function () { execSync('cloudron uninstall --app ' + app.id, EXEC_ARGS); });
|
|
|
|
|
// it('uninstall element-web app', async function () {
|
|
|
|
|
// await browser.get('about:blank');
|
|
|
|
|
// execSync(`cloudron uninstall --app ${ELEMENT_LOCATION}`, EXEC_ARGS);
|
|
|
|
|
// });
|
|
|
|
|
// it('uninstall app', function () { execSync('cloudron uninstall --app ' + app.id, EXEC_ARGS); });
|
|
|
|
|
|
|
|
|
|
// SSO
|
|
|
|
|
it('install app (sso)', function () { execSync('cloudron install --location ' + LOCATION, EXEC_ARGS); });
|
|
|
|
|
it('can get app info', getAppInfo);
|
|
|
|
|
// // SSO
|
|
|
|
|
// it('install app (sso)', function () { execSync('cloudron install --location ' + LOCATION, EXEC_ARGS); });
|
|
|
|
|
// it('can get app info', getAppInfo);
|
|
|
|
|
|
|
|
|
|
it('can install element-web app (sso)', function () { execSync('cloudron install --appstore-id im.riot.cloudronapp --location ' + ELEMENT_LOCATION, EXEC_ARGS); });
|
|
|
|
|
it('update element-app config', updateSynapseConfig);
|
|
|
|
|
// it('can install element-web app (sso)', function () { execSync('cloudron install --appstore-id im.riot.cloudronapp --location ' + ELEMENT_LOCATION, EXEC_ARGS); });
|
|
|
|
|
// it('update element-app config', updateSynapseConfig);
|
|
|
|
|
|
|
|
|
|
it('can get Element app info', getElementAppInfo);
|
|
|
|
|
it('can login via OIDC', loginOIDC.bind(null, USERNAME, PASSWORD));
|
|
|
|
|
it('create room', createRoom);
|
|
|
|
|
it('can send message', sendMessage);
|
|
|
|
|
it('can get app info', getAppInfo);
|
|
|
|
|
// it('can get Element app info', getElementAppInfo);
|
|
|
|
|
// it('can login via OIDC', loginOIDC.bind(null, USERNAME, PASSWORD));
|
|
|
|
|
// it('create room', createRoom);
|
|
|
|
|
// it('can send message', sendMessage);
|
|
|
|
|
// it('can get app info', getAppInfo);
|
|
|
|
|
|
|
|
|
|
it('can restart app', function () { execSync(`cloudron restart ${app.id}`); });
|
|
|
|
|
// it('can restart app', function () { execSync(`cloudron restart ${app.id}`); });
|
|
|
|
|
|
|
|
|
|
it('backup app', function () { execSync(`cloudron backup create --app ${app.id}`, EXEC_ARGS); });
|
|
|
|
|
// it('backup app', function () { execSync(`cloudron backup create --app ${app.id}`, EXEC_ARGS); });
|
|
|
|
|
|
|
|
|
|
it('can get Element app info', getElementAppInfo);
|
|
|
|
|
it('is logged in', isLoggedIn);
|
|
|
|
|
it('check room', checkRoom);
|
|
|
|
|
it('can get app info', getAppInfo);
|
|
|
|
|
// it('can get Element app info', getElementAppInfo);
|
|
|
|
|
// it('is logged in', isLoggedIn);
|
|
|
|
|
// it('check room', checkRoom);
|
|
|
|
|
// it('can get app info', getAppInfo);
|
|
|
|
|
|
|
|
|
|
it('restore app', async function () {
|
|
|
|
|
const backups = JSON.parse(execSync(`cloudron backup list --raw --app ${app.id}`));
|
|
|
|
|
// it('restore app', async function () {
|
|
|
|
|
// const backups = JSON.parse(execSync(`cloudron backup list --raw --app ${app.id}`));
|
|
|
|
|
|
|
|
|
|
await browser.get('about:blank');
|
|
|
|
|
execSync(`cloudron uninstall --app ${app.id}`, EXEC_ARGS);
|
|
|
|
|
execSync(`cloudron install --location ${LOCATION}`, EXEC_ARGS);
|
|
|
|
|
// await browser.get('about:blank');
|
|
|
|
|
// execSync(`cloudron uninstall --app ${app.id}`, EXEC_ARGS);
|
|
|
|
|
// execSync(`cloudron install --location ${LOCATION}`, EXEC_ARGS);
|
|
|
|
|
|
|
|
|
|
getAppInfo();
|
|
|
|
|
// getAppInfo();
|
|
|
|
|
|
|
|
|
|
execSync(`cloudron restore --backup ${backups[0].id} --app ${app.id}`, EXEC_ARGS);
|
|
|
|
|
});
|
|
|
|
|
// execSync(`cloudron restore --backup ${backups[0].id} --app ${app.id}`, EXEC_ARGS);
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
it('can get Element app info', getElementAppInfo);
|
|
|
|
|
it('is logged in', isLoggedIn);
|
|
|
|
|
it('check room', checkRoom);
|
|
|
|
|
it('can send message', sendMessage);
|
|
|
|
|
it('can logout', logout);
|
|
|
|
|
it('can get app info', getAppInfo);
|
|
|
|
|
// it('can get Element app info', getElementAppInfo);
|
|
|
|
|
// it('is logged in', isLoggedIn);
|
|
|
|
|
// it('check room', checkRoom);
|
|
|
|
|
// it('can send message', sendMessage);
|
|
|
|
|
// it('can logout', logout);
|
|
|
|
|
// it('can get app info', getAppInfo);
|
|
|
|
|
|
|
|
|
|
it('move to different location', async function () {
|
|
|
|
|
browser.manage().deleteAllCookies();
|
|
|
|
|
await browser.get('about:blank');
|
|
|
|
|
// it('move to different location', async function () {
|
|
|
|
|
// browser.manage().deleteAllCookies();
|
|
|
|
|
// await browser.get('about:blank');
|
|
|
|
|
|
|
|
|
|
execSync(`cloudron configure --location ${LOCATION}2`, EXEC_ARGS);
|
|
|
|
|
getAppInfo();
|
|
|
|
|
// wait when all services are up and running
|
|
|
|
|
await sleep(15000);
|
|
|
|
|
});
|
|
|
|
|
// execSync(`cloudron configure --location ${LOCATION}2`, EXEC_ARGS);
|
|
|
|
|
// getAppInfo();
|
|
|
|
|
// // wait when all services are up and running
|
|
|
|
|
// await sleep(15000);
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
it('update element-app config', updateSynapseConfig);
|
|
|
|
|
// it('update element-app config', updateSynapseConfig);
|
|
|
|
|
|
|
|
|
|
it('can get Element app info', getElementAppInfo);
|
|
|
|
|
it('can login via OIDC', loginOIDC.bind(null, USERNAME, PASSWORD));
|
|
|
|
|
it('check room', checkRoom);
|
|
|
|
|
it('can send message', sendMessage);
|
|
|
|
|
// it('can get Element app info', getElementAppInfo);
|
|
|
|
|
// it('can login via OIDC', loginOIDC.bind(null, USERNAME, PASSWORD));
|
|
|
|
|
// it('check room', checkRoom);
|
|
|
|
|
// it('can send message', sendMessage);
|
|
|
|
|
|
|
|
|
|
it('can logout', logout);
|
|
|
|
|
it('can get app info', getAppInfo);
|
|
|
|
|
// it('can logout', logout);
|
|
|
|
|
// it('can get app info', getAppInfo);
|
|
|
|
|
|
|
|
|
|
it('uninstall app', async function () {
|
|
|
|
|
await browser.get('about:blank');
|
|
|
|
|
execSync(`cloudron uninstall --app ${app.id}`, EXEC_ARGS);
|
|
|
|
|
});
|
|
|
|
|
// it('uninstall app', async function () {
|
|
|
|
|
// await browser.get('about:blank');
|
|
|
|
|
// execSync(`cloudron uninstall --app ${app.id}`, EXEC_ARGS);
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
// test update
|
|
|
|
|
it('can install app for update', function () { execSync('cloudron install --appstore-id org.matrix.synapse --location ' + LOCATION, EXEC_ARGS); });
|
|
|
|
|
|