Half way in improving e2e test infrastructure and refactoring tests to the enhanced (un)subscription process

This commit is contained in:
Tomas Bures 2017-05-23 04:15:32 +02:00
parent 62cc881fd4
commit 328034bae0
16 changed files with 482 additions and 153 deletions

5
app.js
View file

@ -184,8 +184,9 @@ app.use((req, res, next) => {
res.locals.customScripts = config.customscripts || [];
let bodyClasses = [];
app.get('env') === 'test' && bodyClasses.push('page--' + (req.path.substring(1).replace(/\//g, '--') || 'home'));
req.user && bodyClasses.push('logged-in user-' + req.user.username);
if (req.user) {
bodyClasses.push('logged-in user-' + req.user.username);
}
res.locals.bodyClass = bodyClasses.join(' ');
settingsModel.list(['ua_code', 'shoutout'], (err, configItems) => {