1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-08-08 06:55:28 +02:00

Enable log transitions in tests

This commit is contained in:
zinyando 2016-07-07 14:09:35 +02:00
parent ad119eeb48
commit a7894d6800

View file

@ -11,90 +11,90 @@
/* jshint node: true */ /* jshint node: true */
module.exports = function(environment) { module.exports = function (environment) {
var ENV = { var ENV = {
modulePrefix: 'documize', modulePrefix: 'documize',
podModulePrefix: 'documize/pods', podModulePrefix: 'documize/pods',
locationType: 'auto', locationType: 'auto',
environment: environment, environment: environment,
baseURL: '/', baseURL: '/',
apiHost: '', apiHost: '',
apiNamespace: '', apiNamespace: '',
contentSecurityPolicyHeader: 'Content-Security-Policy-Report-Only', contentSecurityPolicyHeader: 'Content-Security-Policy-Report-Only',
EmberENV: { EmberENV: {
FEATURES: {} FEATURES: {}
}, },
"ember-cli-mirage": { "ember-cli-mirage": {
enabled: false enabled: false
}, },
'ember-simple-auth': { 'ember-simple-auth': {
authenticationRoute: 'auth.login', authenticationRoute: 'auth.login',
routeAfterAuthentication: 'folders.folder', routeAfterAuthentication: 'folders.folder',
routeIfAlreadyAuthenticated: 'folders.folder' routeIfAlreadyAuthenticated: 'folders.folder'
}, },
APP: { APP: {
// Allows to disable audit service in tests // Allows to disable audit service in tests
auditEnabled: true, auditEnabled: true,
intercomKey: "" intercomKey: ""
} }
}; };
if (environment === 'development') { if (environment === 'development') {
ENV.APP.LOG_TRANSITIONS = true; ENV.APP.LOG_TRANSITIONS = true;
ENV.APP.LOG_TRANSITIONS_INTERNAL = true; ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
ENV['ember-cli-mirage'] = { ENV['ember-cli-mirage'] = {
enabled: false enabled: false
}; };
ENV.apiHost = "https://localhost:5001"; ENV.apiHost = "https://localhost:5001";
ENV.apiNamespace = "api"; ENV.apiNamespace = "api";
} }
if (environment === 'test') { if (environment === 'test') {
ENV.APP.LOG_RESOLVER = false; ENV.APP.LOG_RESOLVER = false;
ENV.APP.LOG_ACTIVE_GENERATION = false; ENV.APP.LOG_ACTIVE_GENERATION = false;
ENV.APP.LOG_VIEW_LOOKUPS = false; ENV.APP.LOG_VIEW_LOOKUPS = false;
// ENV.APP.LOG_TRANSITIONS = false; ENV.APP.LOG_TRANSITIONS = true;
// ENV.APP.LOG_TRANSITIONS_INTERNAL = false; // ENV.APP.LOG_TRANSITIONS_INTERNAL = false;
ENV.baseURL = '/'; ENV.baseURL = '/';
ENV.locationType = 'none'; ENV.locationType = 'none';
ENV.APP.rootElement = '#ember-testing'; ENV.APP.rootElement = '#ember-testing';
ENV['ember-cli-mirage'] = { ENV['ember-cli-mirage'] = {
enabled: true enabled: true
}; };
ENV.APP.auditEnabled = false; ENV.APP.auditEnabled = false;
ENV.apiHost = "https://localhost:5001"; ENV.apiHost = "https://localhost:5001";
} }
if (environment === 'production') { if (environment === 'production') {
ENV.APP.LOG_RESOLVER = false; ENV.APP.LOG_RESOLVER = false;
ENV.APP.LOG_ACTIVE_GENERATION = false; ENV.APP.LOG_ACTIVE_GENERATION = false;
ENV.APP.LOG_VIEW_LOOKUPS = false; ENV.APP.LOG_VIEW_LOOKUPS = false;
ENV.APP.LOG_TRANSITIONS = false; ENV.APP.LOG_TRANSITIONS = false;
ENV.APP.LOG_TRANSITIONS_INTERNAL = false; ENV.APP.LOG_TRANSITIONS_INTERNAL = false;
ENV.apiHost = ""; ENV.apiHost = "";
} }
process.argv.forEach(function(element) { process.argv.forEach(function (element) {
if (element !== undefined) { if (element !== undefined) {
if (element.startsWith("intercom=")) { if (element.startsWith("intercom=")) {
element = element.replace("intercom=", ""); element = element.replace("intercom=", "");
ENV.APP.intercomKey = element; ENV.APP.intercomKey = element;
} }
if (element.startsWith("apiHost=")) { if (element.startsWith("apiHost=")) {
element = element.replace("apiHost=", ""); element = element.replace("apiHost=", "");
ENV.apiHost = element; ENV.apiHost = element;
} }
} }
}); });
ENV.apiNamespace = "api"; ENV.apiNamespace = "api";
ENV.contentSecurityPolicy = null; ENV.contentSecurityPolicy = null;
return ENV; return ENV;
}; };