[Libreoffice-commits] online.git: cypress_test/integration_tests
Henry Castro (via logerrit)
logerrit at kemper.freedesktop.org
Wed May 13 15:24:56 UTC 2020
cypress_test/integration_tests/common/helper.js | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
New commits:
commit 580f06a21e045e8a732862542c5d729f02d18607
Author: Henry Castro <hcastro at collabora.com>
AuthorDate: Tue May 12 15:31:10 2020 -0400
Commit: Henry Castro <hcastro at collabora.com>
CommitDate: Wed May 13 17:24:38 2020 +0200
cypress: logging the command state changes
So when unit test fails, we can inspect the response
from server some UNO command states
Change-Id: Ic652918a8e57cadfd1cd58a89d7a1c9905abcfc9
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/94081
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Henry Castro <hcastro at collabora.com>
diff --git a/cypress_test/integration_tests/common/helper.js b/cypress_test/integration_tests/common/helper.js
index 7a8c6d38c..8d68cfb38 100644
--- a/cypress_test/integration_tests/common/helper.js
+++ b/cypress_test/integration_tests/common/helper.js
@@ -1,5 +1,9 @@
/* global cy Cypress*/
+function onCommandStateChanged(e) {
+ Cypress.log({ displayName: 'onCommandState', message: e.commandName + '=' + JSON.stringify(e.state)});
+}
+
function loadTestDoc(fileName, subFolder, mobile) {
cy.log('Loading test document - start.');
cy.log('Param - fileName: ' + fileName);
@@ -47,7 +51,11 @@ function loadTestDoc(fileName, subFolder, mobile) {
cy.visit(URI, {
onLoad: function(win) {
win.onerror = cy.onUncaughtException;
- }});
+ }})
+ .then(function(win) {
+ var map = win.L.Map.THIS;
+ map.on('commandstatechanged', onCommandStateChanged);
+ });
// Wait for the document to fully load
cy.get('.leaflet-tile-loaded', {timeout : 10000});
More information about the Libreoffice-commits
mailing list