cypress_test/integration_tests/common/helper.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
New commits: commit 580f06a21e045e8a732862542c5d729f02d18607 Author: Henry Castro <hcas...@collabora.com> AuthorDate: Tue May 12 15:31:10 2020 -0400 Commit: Henry Castro <hcas...@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 <jenkinscollaboraoff...@gmail.com> Reviewed-by: Henry Castro <hcas...@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}); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits