[Libreoffice-commits] online.git: 2 commits - cypress_test/integration_tests loleaflet/src

Tamás Zolnai (via logerrit) logerrit at kemper.freedesktop.org
Mon Jan 27 16:18:20 UTC 2020


 cypress_test/integration_tests/common/helper.js             |    6 ++++--
 cypress_test/integration_tests/mobile/insert_object_spec.js |    1 -
 loleaflet/src/layer/marker/Annotation.js                    |    3 ++-
 3 files changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 89f05278bbc2c9f37a1768095c39f1e97b020de5
Author:     Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Mon Jan 27 17:05:48 2020 +0100
Commit:     Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Mon Jan 27 17:17:04 2020 +0100

    cypress: Make test run fail when an exception is thrown.
    
    Change-Id: Ie96cb771c9cec737c0352a843e42b14161cf9e7f

diff --git a/cypress_test/integration_tests/common/helper.js b/cypress_test/integration_tests/common/helper.js
index 5ecd678a8..e4cc9cc39 100644
--- a/cypress_test/integration_tests/common/helper.js
+++ b/cypress_test/integration_tests/common/helper.js
@@ -16,8 +16,10 @@ function loadTestDoc(fileName, mobile) {
 	cy.visit('http://localhost:9980/loleaflet/' +
 		Cypress.env('WSD_VERSION_HASH') +
 		'/loleaflet.html?file_path=file://' +
-		Cypress.env('WORKDIR') + fileName);
-
+		Cypress.env('WORKDIR') + fileName, {
+		onLoad: function(win) {
+			win.onerror = cy.onUncaughtException;
+		}});
 	// Wait for the document to fully load
 	cy.get('.leaflet-tile-loaded', {timeout : 10000});
 }
commit c4f66b32b7e899d84db9d82b2b482c393baf2588
Author:     Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Mon Jan 27 16:56:37 2020 +0100
Commit:     Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Mon Jan 27 17:17:04 2020 +0100

    mobile: Fix a console error triggered by a cypress test.
    
    Now idea whether it happens in real life.
    
    Change-Id: I172bf265dd2b8fdbc1d2759d8669bd90f9097336

diff --git a/cypress_test/integration_tests/mobile/insert_object_spec.js b/cypress_test/integration_tests/mobile/insert_object_spec.js
index f2e9d435b..562b7ad57 100644
--- a/cypress_test/integration_tests/mobile/insert_object_spec.js
+++ b/cypress_test/integration_tests/mobile/insert_object_spec.js
@@ -39,7 +39,6 @@ describe('Insert objects via insertion wizard.', function() {
 		// Push cancel to close the dialog
 		cy.get('.vex-dialog-button-secondary.vex-dialog-button.vex-last')
 			.click();
-		// TODO: fix console error here
 	});
 
 	it('Insert table.', function() {
diff --git a/loleaflet/src/layer/marker/Annotation.js b/loleaflet/src/layer/marker/Annotation.js
index 4c57b09e4..2ae65ef57 100644
--- a/loleaflet/src/layer/marker/Annotation.js
+++ b/loleaflet/src/layer/marker/Annotation.js
@@ -281,7 +281,8 @@ L.Annotation = L.Layer.extend({
 		this._nodeModifyText.value = this._contentText.origText;
 		this._nodeReplyText.value = '';
 		this.show();
-		this._map.fire('AnnotationCancel', {annotation: this});
+		if (this._map)
+			this._map.fire('AnnotationCancel', {annotation: this});
 	},
 
 	_onSaveComment: function (e) {


More information about the Libreoffice-commits mailing list