[Libreoffice-commits] online.git: loleaflet/spec
Pranav Kant
pranavk at collabora.com
Mon Mar 7 10:08:10 UTC 2016
loleaflet/spec/loleaflet/control/SearchSpec.js | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
New commits:
commit a6f9cd430b823615fb674f72a96b5f9ae3ce24de
Author: Pranav Kant <pranavk at collabora.com>
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 <andras.timar at collabora.com>
Tested-by: Andras Timar <andras.timar at collabora.com>
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 () {
More information about the Libreoffice-commits
mailing list