MDL-56840 behat: Wait till pdf conversion progress is finished

This commit is contained in:
Rajesh Taneja
2016-11-09 14:50:53 +08:00
parent 67b81de806
commit 60a67bd6ee
4 changed files with 21 additions and 3 deletions
@@ -3539,7 +3539,9 @@ EDITOR.prototype = {
}
// New ajax request delayed of a second.
M.util.js_pending('checkconversionstatus');
Y.later(1000, this, function () {
M.util.js_complete('checkconversionstatus');
Y.io(AJAXBASEPROGRESS, checkconversionstatus);
});
}
@@ -3549,7 +3551,9 @@ EDITOR.prototype = {
// We only continue on error if the all pages were not generated,
// and if the ajax call did not produce 5 errors in the row.
if (this.pagecount === 0 && ajax_error_total < 5) {
M.util.js_pending('checkconversionstatus');
Y.later(1000, this, function () {
M.util.js_complete('checkconversionstatus');
Y.io(AJAXBASEPROGRESS, checkconversionstatus);
});
}
@@ -3559,8 +3563,10 @@ EDITOR.prototype = {
};
// We start the AJAX "generated page total number" call a second later to give a chance to
// the AJAX "combined pdf generation" call to clean the previous submission images.
M.util.js_pending('checkconversionstatus');
Y.later(1000, this, function () {
ajax_error_total = 0;
M.util.js_complete('checkconversionstatus');
Y.io(AJAXBASEPROGRESS, checkconversionstatus);
});
}
File diff suppressed because one or more lines are too long
@@ -3539,7 +3539,9 @@ EDITOR.prototype = {
}
// New ajax request delayed of a second.
M.util.js_pending('checkconversionstatus');
Y.later(1000, this, function () {
M.util.js_complete('checkconversionstatus');
Y.io(AJAXBASEPROGRESS, checkconversionstatus);
});
}
@@ -3549,7 +3551,9 @@ EDITOR.prototype = {
// We only continue on error if the all pages were not generated,
// and if the ajax call did not produce 5 errors in the row.
if (this.pagecount === 0 && ajax_error_total < 5) {
M.util.js_pending('checkconversionstatus');
Y.later(1000, this, function () {
M.util.js_complete('checkconversionstatus');
Y.io(AJAXBASEPROGRESS, checkconversionstatus);
});
}
@@ -3559,8 +3563,10 @@ EDITOR.prototype = {
};
// We start the AJAX "generated page total number" call a second later to give a chance to
// the AJAX "combined pdf generation" call to clean the previous submission images.
M.util.js_pending('checkconversionstatus');
Y.later(1000, this, function () {
ajax_error_total = 0;
M.util.js_complete('checkconversionstatus');
Y.io(AJAXBASEPROGRESS, checkconversionstatus);
});
}
@@ -459,7 +459,9 @@ EDITOR.prototype = {
}
// New ajax request delayed of a second.
M.util.js_pending('checkconversionstatus');
Y.later(1000, this, function () {
M.util.js_complete('checkconversionstatus');
Y.io(AJAXBASEPROGRESS, checkconversionstatus);
});
}
@@ -469,7 +471,9 @@ EDITOR.prototype = {
// We only continue on error if the all pages were not generated,
// and if the ajax call did not produce 5 errors in the row.
if (this.pagecount === 0 && ajax_error_total < 5) {
M.util.js_pending('checkconversionstatus');
Y.later(1000, this, function () {
M.util.js_complete('checkconversionstatus');
Y.io(AJAXBASEPROGRESS, checkconversionstatus);
});
}
@@ -479,8 +483,10 @@ EDITOR.prototype = {
};
// We start the AJAX "generated page total number" call a second later to give a chance to
// the AJAX "combined pdf generation" call to clean the previous submission images.
M.util.js_pending('checkconversionstatus');
Y.later(1000, this, function () {
ajax_error_total = 0;
M.util.js_complete('checkconversionstatus');
Y.io(AJAXBASEPROGRESS, checkconversionstatus);
});
}