e2e tests (draft)

This commit is contained in:
witzig 2017-05-10 01:40:02 +02:00
parent 408db13fd4
commit 6c35046ab2
26 changed files with 1659 additions and 29 deletions

5
app.js
View file

@ -183,6 +183,11 @@ app.use((req, res, next) => {
res.locals.customStyles = config.customstyles || [];
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);
res.locals.bodyClass = bodyClasses.join(' ');
settingsModel.list(['ua_code', 'shoutout'], (err, configItems) => {
if (err) {
return next(err);