mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-13 13:03:20 +00:00
Fix #1639 logs error in mocha phantom js
This commit is contained in:
@@ -7,7 +7,10 @@ module.exports = function(grunt) {
|
|||||||
},
|
},
|
||||||
mocha_phantomjs: {
|
mocha_phantomjs: {
|
||||||
options: {
|
options: {
|
||||||
'reporter': 'dot'
|
'reporter': 'dot',
|
||||||
|
'setting': [
|
||||||
|
'loadImages=false'
|
||||||
|
]
|
||||||
},
|
},
|
||||||
all: ['www/scripts/tests/index.html']
|
all: ['www/scripts/tests/index.html']
|
||||||
},
|
},
|
||||||
|
@@ -20,8 +20,8 @@ define([
|
|||||||
"apps/admin/fields/views/fieldError",
|
"apps/admin/fields/views/fieldError",
|
||||||
"apps/admin/fields/errors/errorManager"
|
"apps/admin/fields/errors/errorManager"
|
||||||
], function ($, _, Backbone, i18n, FieldsCollection, VocabulariesCollection, DcFieldsCollection, FieldListView, SaveView, FieldErrorView, ErrorManager) {
|
], function ($, _, Backbone, i18n, FieldsCollection, VocabulariesCollection, DcFieldsCollection, FieldListView, SaveView, FieldErrorView, ErrorManager) {
|
||||||
var initialize = function () {
|
var create = function () {
|
||||||
AdminFieldApp = {
|
window.AdminFieldApp = {
|
||||||
$window: $(window),
|
$window: $(window),
|
||||||
$scope: $("#admin-field-app"),
|
$scope: $("#admin-field-app"),
|
||||||
$top: $(".row-top", this.$scope),
|
$top: $(".row-top", this.$scope),
|
||||||
@@ -58,7 +58,9 @@ define([
|
|||||||
});
|
});
|
||||||
AdminFieldApp.vocabularyCollection = new VocabulariesCollection();
|
AdminFieldApp.vocabularyCollection = new VocabulariesCollection();
|
||||||
AdminFieldApp.dcFieldsCollection = new DcFieldsCollection();
|
AdminFieldApp.dcFieldsCollection = new DcFieldsCollection();
|
||||||
|
};
|
||||||
|
|
||||||
|
var load = function() {
|
||||||
// load strings
|
// load strings
|
||||||
i18n.init({resGetPath: "/admin/fields/language.json"});
|
i18n.init({resGetPath: "/admin/fields/language.json"});
|
||||||
|
|
||||||
@@ -101,7 +103,14 @@ define([
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var initialize = function () {
|
||||||
|
create();
|
||||||
|
load();
|
||||||
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
create: create,
|
||||||
|
load: load,
|
||||||
initialize: initialize
|
initialize: initialize
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
@@ -25,7 +25,7 @@ define([
|
|||||||
$("body").append(fixtures.read('admin/fields/dom', 'admin/fields/templates'));
|
$("body").append(fixtures.read('admin/fields/dom', 'admin/fields/templates'));
|
||||||
var sbasId = 1;
|
var sbasId = 1;
|
||||||
|
|
||||||
App.initialize();
|
App.create();
|
||||||
|
|
||||||
describe("Admin field", function () {
|
describe("Admin field", function () {
|
||||||
describe("Initialization", function () {
|
describe("Initialization", function () {
|
||||||
|
Reference in New Issue
Block a user