enable named views for smoke tests

pull/175/head
Keivan Beigi 9 years ago
parent 327802fae4
commit c1467d0ecd

@ -45,6 +45,8 @@ namespace NzbDrone.Automation.Test
var page = new PageBase(driver);
page.WaitForNoSpinner();
driver.ExecuteScript("window.NzbDrone.NameViews = true;");
GetPageErrors().Should().BeEmpty();
}

@ -1,5 +1,7 @@
module.exports = function(){
window.NzbDrone.NameViews = window.NzbDrone.NameViews || !window.NzbDrone.Production;
var regex = new RegExp('/', 'g');
var _getViewName = function(template){
@ -11,7 +13,10 @@ module.exports = function(){
var originalOnRender = this.onRender;
this.onRender = function(){
this.$el.addClass('iv-' + _getViewName(this.template));
if(window.NzbDrone.NameViews) {
this.$el.addClass('iv-' + _getViewName(this.template));
}
if(originalOnRender) {
return originalOnRender.call(this);

@ -8,8 +8,8 @@ var asNamedView = require('../Mixins/AsNamedView');
templateMixin.call(window.Marionette.TemplateCache);
if(!window.NzbDrone.Production) {
asNamedView.call(window.Marionette.ItemView.prototype);
}
asNamedView.call(window.Marionette.ItemView.prototype);
module.exports = window.Marionette;
Loading…
Cancel
Save