Commit 93e22df7 authored by Roque's avatar Roque

erp5_officejs: logging more error details for failing unit test

parent 2f0651f6
......@@ -48,6 +48,7 @@
AppCacheStorage.prototype.getAttachment = function (origin_url,
relative_url) {
console.log("[DEBUG] APPCACHESTORAGE: getAttachment for" + relative_url);
return new RSVP.Queue()
.push(function () {
return jIO.util.ajax({
......@@ -62,6 +63,11 @@
};
AppCacheStorage.prototype.allAttachments = function (id) {
console.log("[DEBUG] APPCACHESTORAGE allAttachments");
console.log("[DEBUG] APPCACHESTORAGE this._origin_url");
console.log(this._origin_url);
console.log("[DEBUG] APPCACHESTORAGE parameter id");
console.log(id);
if (id === this._origin_url) {
var result = {}, i, len = this._relative_url_list.length;
for (i = 0; i < len; i += 1) {
......@@ -87,16 +93,21 @@
};
AppCacheStorage.prototype.repair = function () {
var storage = this;
console.log("[DEBUG] APPCACHESTORAGE repair");
var storage = this, url = "";
return new RSVP.Queue()
.push(function () {
console.log("[DEBUG] APPCACHESTORAGE JIO.util.ajax...");
url = new URL(storage._manifest, new URL(storage._version,
storage._origin_url))
return jIO.util.ajax({
type: "GET",
url: new URL(storage._manifest, new URL(storage._version,
storage._origin_url))
url: url
});
})
.push(function (response) {
console.log("[DEBUG] APPCACHESTORAGE ajax response:");
console.log(response);
var text = response.target.responseText,
relative_url_list = text.split('\n'),
i,
......@@ -120,10 +131,14 @@
take = true;
}
}
console.log("[DEBUG] APPCACHESTORAGE end url-iteration. storage._relative_url_list:");
console.log(storage._relative_url_list);
})
.push(undefined, function (error) {
if (!error.message) {
error.message = "Can't get manifest";
console.log("error getting the manifest:");
console.log(error);
error.message = "Can't get manifest. URL: " + url + " \n. error object: " + String(error);
}
throw error;
});
......
......@@ -223,7 +223,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>vincent</string> </value>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -237,7 +237,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>964.50005.13436.62685</string> </value>
<value> <string>974.30068.18493.49373</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -255,7 +255,7 @@
</tuple>
<state>
<tuple>
<float>1515753347.5</float>
<float>1553014464.38</float>
<string>UTC</string>
</tuple>
</state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment