|
@@ -72,6 +72,15 @@ describe('Application life cycle test', function () {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ function logout(done) {
|
|
|
+ browser.manage().deleteAllCookies().then(function () {
|
|
|
+ browser.executeScript('localStorage.clear();');
|
|
|
+ browser.executeScript('sessionStorage.clear();');
|
|
|
+
|
|
|
+ done();
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
function checkHtaccess(done) {
|
|
|
var out = execSync('cloudron exec -- cat /app/data/htaccess');
|
|
|
expect(out.toString('utf8').indexOf('RewriteEngine On')).to.not.be(-1); // wp generates this with permalinks in hard mode
|
|
@@ -264,6 +273,7 @@ describe('Application life cycle test', function () {
|
|
|
it('has correct htaccess', checkHtaccess);
|
|
|
it('can access permalink', checkPermalink);
|
|
|
it('can login', login.bind(null, username, password));
|
|
|
+ it('can logout', logout);
|
|
|
|
|
|
it('uninstall app', function () {
|
|
|
execSync('cloudron uninstall --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
|
@@ -279,7 +289,7 @@ describe('Application life cycle test', function () {
|
|
|
|
|
|
login(email, password, function () {
|
|
|
execSync('cloudron uninstall --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
|
|
- done();
|
|
|
+ logout(done);
|
|
|
});
|
|
|
});
|
|
|
|
|
@@ -302,6 +312,8 @@ describe('Application life cycle test', function () {
|
|
|
browser.wait(until.elementLocated(by.xpath('//div[@class="wp-menu-name" and contains(text(), "Plugins")]')), TIMEOUT).then(function () { done(); });
|
|
|
});
|
|
|
|
|
|
+ it('can logout', logout);
|
|
|
+
|
|
|
it('uninstall app (no sso)', function () {
|
|
|
execSync('cloudron uninstall --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
|
|
});
|