[Libreoffice-commits] online.git: loleaflet/src
Tamás Zolnai (via logerrit)
logerrit at kemper.freedesktop.org
Wed Feb 19 21:20:27 UTC 2020
loleaflet/src/control/Control.MobileWizard.js | 12 ++++++++++++
1 file changed, 12 insertions(+)
New commits:
commit 20b5825ce59345e3ad769d83cb63734a1cf5b0e5
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Wed Feb 19 14:53:36 2020 +0100
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Wed Feb 19 22:20:09 2020 +0100
cypress: mobile: Avoid render the same mobile wizard twice.
We get the sidebar's content twice when we open
the mobile wizard. It makes some tests to fail
randomly. I have no idea whether this causes other
issue or not. So let's use it only for cypress now.
Change-Id: I8a43b493934aaebfa52aa230ded228ac4b9bd064
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89025
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Andras Timar <andras.timar at collabora.com>
diff --git a/loleaflet/src/control/Control.MobileWizard.js b/loleaflet/src/control/Control.MobileWizard.js
index cc387cd5d..de54a6d71 100644
--- a/loleaflet/src/control/Control.MobileWizard.js
+++ b/loleaflet/src/control/Control.MobileWizard.js
@@ -17,6 +17,7 @@ L.Control.MobileWizard = L.Control.extend({
_currentPath: [],
_tabs: [],
_currentScrollPosition: 0,
+ _lastSidebarData: '',
initialize: function (options) {
L.setOptions(this, options);
@@ -288,6 +289,17 @@ L.Control.MobileWizard = L.Control.extend({
return;
}
+ // 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;
+ }
+
this._isActive = true;
var currentPath = null;
var lastScrollPosition = null;
More information about the Libreoffice-commits
mailing list