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

Tamás Zolnai (via logerrit) logerrit at kemper.freedesktop.org
Sat May 30 04:55:37 UTC 2020


 cypress_test/integration_tests/common/mobile_helper.js           |    6 +++++
 cypress_test/integration_tests/mobile/impress/apply_font_spec.js |    5 ----
 loleaflet/src/control/Control.MobileWizard.js                    |   12 ----------
 3 files changed, 6 insertions(+), 17 deletions(-)

New commits:
commit b761ab848dcad6f38c38c28ff6619743b0502a9f
Author:     Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Sat May 30 05:58:43 2020 +0200
Commit:     Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Sat May 30 06:55:13 2020 +0200

    cypress: wait for the second rendering of the mobile wizard.
    
    Filtering out duplicated sidebar content does not work
    in all use cases.
    
    Change-Id: I913ad8c15eb58ef9dfa5c6f7819914d1dbe207c8
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95175
    Tested-by: Jenkins
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>

diff --git a/cypress_test/integration_tests/common/mobile_helper.js b/cypress_test/integration_tests/common/mobile_helper.js
index 55639460c..d60400d83 100644
--- a/cypress_test/integration_tests/common/mobile_helper.js
+++ b/cypress_test/integration_tests/common/mobile_helper.js
@@ -144,6 +144,12 @@ function openMobileWizard() {
 	cy.get('#tb_actionbar_item_mobile_wizard table')
 		.should('have.class', 'checked');
 
+	// Mobile wizard is requested twice on opening
+	// The second request is sent after a 400 ms delay
+	// see _refreshSidebar() method. So let's just wait
+	// until mobile wizard gets it's final state.
+	cy.wait(1000);
+
 	cy.log('Opening mobile wizard - end.');
 }
 
diff --git a/cypress_test/integration_tests/mobile/impress/apply_font_spec.js b/cypress_test/integration_tests/mobile/impress/apply_font_spec.js
index 18cfa750c..f7a83c464 100644
--- a/cypress_test/integration_tests/mobile/impress/apply_font_spec.js
+++ b/cypress_test/integration_tests/mobile/impress/apply_font_spec.js
@@ -284,11 +284,6 @@ describe('Apply font on text shape.', function() {
 		// Remove direct formatting
 		openTextPropertiesPanel();
 
-		// Opening the mobile wizard for the second time
-		// triggeres two jsdialog message and so the mobile
-		// wizard is rendered twice.
-		cy.wait(500);
-
 		cy.get('#clearFormatting')
 			.click();
 
diff --git a/loleaflet/src/control/Control.MobileWizard.js b/loleaflet/src/control/Control.MobileWizard.js
index 406ba8716..6e819d359 100644
--- a/loleaflet/src/control/Control.MobileWizard.js
+++ b/loleaflet/src/control/Control.MobileWizard.js
@@ -17,7 +17,6 @@ L.Control.MobileWizard = L.Control.extend({
 	_currentPath: [],
 	_tabs: [],
 	_currentScrollPosition: 0,
-	_lastSidebarData: '',
 
 	initialize: function (options) {
 		L.setOptions(this, options);
@@ -330,17 +329,6 @@ L.Control.MobileWizard = L.Control.extend({
 				window.mobileDialogId = data.id;
 			}
 
-			// Sometimes it happens that we get the same sidebar
-			// structure twice. This makes hard to test mobile wizard.
-			if (isSidebar && L.Browser.cypressTest) {
-				var dataString = JSON.stringify(data.children);
-				if (this._isActive && this.map.showSidebar &&
-					dataString === this._lastSidebarData) {
-					return;
-				}
-				this._lastSidebarData = dataString;
-			}
-
 			if (this.map.getDocType() === 'presentation')
 				$('#mobile-wizard-header').show();
 


More information about the Libreoffice-commits mailing list