loleaflet/spec/loleaflet/control/SearchSpec.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
New commits: commit a6f9cd430b823615fb674f72a96b5f9ae3ce24de Author: Pranav Kant <[email protected]> Date: Fri Feb 19 21:18:14 2016 +0530 loleaflet: Wait for 'partpagerectangles' before starting search This is required because we want to test on which page search is found, and we can not do it before we get results for partpagerectangles. Change-Id: I6f927ae27b91e62d86a8e46dc9c21ee9aa913894 Reviewed-on: https://gerrit.libreoffice.org/22507 Reviewed-by: Andras Timar <[email protected]> Tested-by: Andras Timar <[email protected]> diff --git a/loleaflet/spec/loleaflet/control/SearchSpec.js b/loleaflet/spec/loleaflet/control/SearchSpec.js index 7db5ae5..6135945 100644 --- a/loleaflet/spec/loleaflet/control/SearchSpec.js +++ b/loleaflet/spec/loleaflet/control/SearchSpec.js @@ -2,7 +2,7 @@ describe('Search', function () { this.timeout(10000); var map; - before(function () { + before(function (done) { var htmlPath = window.location.pathname; var dir = htmlPath.substring(0, htmlPath.lastIndexOf('/')); var fileURL = 'file://' + dir + '/data/eval.odt'; @@ -13,6 +13,14 @@ describe('Search', function () { edit: false, readOnly: false }); + + map.once('partpagerectangles', function(e) { + done(); + }); + + setTimeout(function() { + done(new Error('No response for partpagerectangles')); + }, 5000); }); afterEach(function () { _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
