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

This commit is contained in:
Rajesh Taneja
2016-11-09 13:39:00 +08:00
parent 258d07d37e
commit 26ca972e9e
4 changed files with 21 additions and 3 deletions
@@ -3551,7 +3551,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);
});
}
@@ -3561,7 +3563,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);
});
}
@@ -3571,8 +3575,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
@@ -3551,7 +3551,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);
});
}
@@ -3561,7 +3563,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);
});
}
@@ -3571,8 +3575,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);
});
}
@@ -460,7 +460,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);
});
}
@@ -470,7 +472,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);
});
}
@@ -480,8 +484,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);
});
}