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

2020-09-30 Thread Jan Holesovsky (via logerrit)
 cypress_test/integration_tests/mobile/calc/hamburger_menu_spec.js  
   |9 
 cypress_test/integration_tests/mobile/calc/insertion_wizard_spec.js
   |3 
 cypress_test/integration_tests/mobile/impress/apply_font_shape_spec.js 
   |   42 ++-
 cypress_test/integration_tests/mobile/impress/apply_font_text_spec.js  
   |   39 ++-
 
cypress_test/integration_tests/mobile/impress/apply_paragraph_props_shape_spec.js
 |   27 +-
 
cypress_test/integration_tests/mobile/impress/apply_paragraph_props_text_spec.js
  |   36 +-
 cypress_test/integration_tests/mobile/impress/hamburger_menu_spec.js   
   |6 
 cypress_test/integration_tests/mobile/impress/impress_focus_spec.js
   |6 
 cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js
   |   21 +
 loleaflet/Makefile.am  
   |1 
 loleaflet/js/global.js 
   |4 
 loleaflet/src/layer/tile/CalcTileLayer.js  
   |6 
 loleaflet/src/layer/tile/CanvasTileLayer.js
   |3 
 loleaflet/src/layer/tile/ImpressTileLayer.js   
   |2 
 loleaflet/src/layer/tile/TileLayer.js  
   |4 
 loleaflet/src/layer/tile/WriterTileLayer.js
   |2 
 loleaflet/src/map/anim/Map.ZoomAnimation.js
   |  123 --
 17 files changed, 130 insertions(+), 204 deletions(-)

New commits:
commit 26fc803a0ea108ef1911b87c243b9544c9e5f7c9
Author: Jan Holesovsky 
AuthorDate: Wed Sep 30 12:57:34 2020 +0200
Commit: Jan Holesovsky 
CommitDate: Wed Sep 30 20:16:45 2020 +0200

Use the CanvasTileLayer for all rendering.

Fixes problems particularly with the new Chrome where the original
approach to tiles can be causing blurry text.

Change-Id: Icf598df0e997d493b111fad1c59e7dcb5f376801
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/103681
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Jan Holesovsky 

diff --git a/cypress_test/integration_tests/mobile/calc/hamburger_menu_spec.js 
b/cypress_test/integration_tests/mobile/calc/hamburger_menu_spec.js
index d57805f04..4a6a708c2 100644
--- a/cypress_test/integration_tests/mobile/calc/hamburger_menu_spec.js
+++ b/cypress_test/integration_tests/mobile/calc/hamburger_menu_spec.js
@@ -512,7 +512,8 @@ describe('Trigger hamburger menu options.', function() {
});
});
 
-   it('Sheet: insert / delete row break.', function() {
+   // FIXME temporarily disabled, does not work with CanvasTileLayer
+   it.skip('Sheet: insert / delete row break.', function() {
before('hamburger_menu_sheet.ods');
 
// Select B2 cell
@@ -559,7 +560,8 @@ describe('Trigger hamburger menu options.', function() {
cy.wait(500);
});
 
-   it('Sheet: insert / delete column break.', function() {
+   // FIXME temporarily disabled, does not work with CanvasTileLayer
+   it.skip('Sheet: insert / delete column break.', function() {
before('hamburger_menu_sheet.ods');
 
// Select B2 cell
@@ -854,7 +856,8 @@ describe('Trigger hamburger menu options.', function() {
.should('exist');
});
 
-   it('Automatic spell checking.', function() {
+   // FIXME temporarily disabled, does not work with CanvasTileLayer
+   it.skip('Automatic spell checking.', function() {
before('hamburger_menu.ods');
 
// Make everything white on tile
diff --git 
a/cypress_test/integration_tests/mobile/calc/insertion_wizard_spec.js 
b/cypress_test/integration_tests/mobile/calc/insertion_wizard_spec.js
index a323e7fa4..1660bdb6b 100644
--- a/cypress_test/integration_tests/mobile/calc/insertion_wizard_spec.js
+++ b/cypress_test/integration_tests/mobile/calc/insertion_wizard_spec.js
@@ -54,7 +54,8 @@ describe('Calc insertion wizard.', function() {
.should('exist');
});
 
-   it('Insert chart.', function() {
+   // FIXME temporarily disabled, does not work with CanvasTileLayer
+   it.skip('Insert chart.', function() {
cy.contains('.menu-entry-with-icon', 'Chart...')
.click();
 
diff --git 
a/cypress_test/integration_tests/mobile/impress/apply_font_shape_spec.js 
b/cypress_test/integration_tests/mobile/impress/apply_font_shape_spec.js
index e7a235586..2d29a11c3 100644
--- a/cypress_test/integration_tests/mobile/impress/apply_font_shape_spec.js
+++ b/cypress_test/integration_tests/mobile/impress/apply_font_shape_spec.js
@@ -24,7 +24,8 @@ describe('Apply font on selected shape.', function() {
impressMobileHelper.triggerNewSVGForShapeInTheCenter();
 

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

2020-09-24 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/common/nextcloud_helper.js   |  123 
++
 cypress_test/integration_tests/mobile/calc/nextcloud_spec.js|  110 
 cypress_test/integration_tests/mobile/impress/nextcloud_spec.js |  110 
 cypress_test/integration_tests/mobile/writer/nextcloud_spec.js  |  111 
-
 4 files changed, 138 insertions(+), 316 deletions(-)

New commits:
commit 391b8b7fd7cc4ea42189782926472591d5934d4a
Author: Tamás Zolnai 
AuthorDate: Thu Sep 24 09:02:58 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Thu Sep 24 10:59:07 2020 +0200

cypress: NC: extract some helper methods for nextcloud specific features.

Change-Id: I47b1811ce0501733544eaa42b8b117a08a8c
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/103292
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/common/nextcloud_helper.js 
b/cypress_test/integration_tests/common/nextcloud_helper.js
new file mode 100644
index 0..304c814e9
--- /dev/null
+++ b/cypress_test/integration_tests/common/nextcloud_helper.js
@@ -0,0 +1,123 @@
+/* global cy Cypress require */
+
+var mobileHelper = require('./mobile_helper');
+
+function checkAndCloseRevisionHistory() {
+   mobileHelper.openHamburgerMenu();
+
+   cy.contains('.menu-entry-with-icon', 'File')
+   .click();
+
+   cy.contains('.menu-entry-with-icon', 'See revision history')
+   .then(function(item) {
+   Cypress.env('IFRAME_LEVEL', '');
+   cy.wrap(item)
+   .click();
+   });
+   cy.get('#app-sidebar')
+   .should('be.visible');
+
+   cy.get('section#tab-versionsTabView')
+   .should('be.visible');
+
+   cy.get('.app-sidebar__close.icon-close')
+   .then(function(item) {
+   Cypress.env('IFRAME_LEVEL', '1');
+   cy.wrap(item)
+   .click();
+   });
+
+   cy.get('#revViewerContainer .icon-close')
+   .then(function(item) {
+   Cypress.env('IFRAME_LEVEL', '2');
+   cy.wrap(item)
+   .click();
+   });
+}
+
+function checkAndCloseSharing() {
+   mobileHelper.openHamburgerMenu();
+
+   cy.contains('.menu-entry-with-icon', 'File')
+   .click();
+
+   cy.contains('.menu-entry-with-icon', 'Share...')
+   .then(function(item) {
+   Cypress.env('IFRAME_LEVEL', '');
+   cy.wrap(item)
+   .click();
+   });
+
+   cy.get('#app-sidebar')
+   .should('be.visible');
+
+   // issue here
+   //cy.get('section#sharing')
+   //  .should('be.visible');
+
+   cy.get('.app-sidebar__close.icon-close')
+   .then(function(item) {
+   Cypress.env('IFRAME_LEVEL', '2');
+   cy.wrap(item)
+   .click();
+   });
+}
+
+function insertImageFromStorage(fileName) {
+   mobileHelper.openInsertionWizard();
+
+   cy.get('.insertgraphicremote')
+   .then(function(item) {
+   Cypress.env('IFRAME_LEVEL', '');
+   cy.wrap(item)
+   .click();
+   });
+
+   cy.get('.oc-dialog')
+   .should('be.visible');
+
+   cy.get('tr[data-entryname=\'' + fileName + '\']')
+   .click();
+
+   cy.get('.oc-dialog-buttonrow .primary')
+   .then(function(item) {
+   Cypress.env('IFRAME_LEVEL', '2');
+   cy.wrap(item)
+   .click();
+   });
+}
+
+function saveFileAs(fileName) {
+   mobileHelper.enableEditingMobile();
+
+   mobileHelper.openHamburgerMenu();
+
+   cy.contains('.menu-entry-with-icon', 'File')
+   .click();
+
+   cy.contains('.menu-entry-with-icon', 'Save As...')
+   .then(function(item) {
+   Cypress.env('IFRAME_LEVEL', '1');
+   cy.wrap(item)
+   .click();
+   });
+
+   cy.get('.oc-dialog')
+   .should('be.visible');
+
+   cy.get('.oc-dialog input')
+   .clear()
+   .type(fileName);
+
+   cy.get('.oc-dialog-buttonrow .primary')
+   .then(function(item) {
+   Cypress.env('IFRAME_LEVEL', '2');
+   cy.wrap(item)
+   .click();
+   });
+}
+
+module.exports.checkAndCloseRevisionHistory = checkAndCloseRevisionHistory;
+module.exports.checkAndCloseSharing = checkAndCloseSharing;
+module.exports.insertImageFromStorage = insertImageFromStorage;
+module.exports.saveFileAs = 

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

2020-09-20 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/common/helper.js |4 
 1 file changed, 4 insertions(+)

New commits:
commit 95fbcdebed842b4fcd3712ccd7fa80b70f4f35fb
Author: Tamás Zolnai 
AuthorDate: Sat Sep 19 20:04:07 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Sun Sep 20 14:23:08 2020 +0200

cypress: fix stopping test run in interactive test runner.

I reported the issue. Let's have a workaround until,
the bug fix is released.

Change-Id: I7d7719d311e0c0584b7d6e710286f28962d00a96
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/103038
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/common/helper.js 
b/cypress_test/integration_tests/common/helper.js
index 113ee79ee..f748b9bde 100644
--- a/cypress_test/integration_tests/common/helper.js
+++ b/cypress_test/integration_tests/common/helper.js
@@ -328,6 +328,10 @@ function beforeAll(fileName, subFolder, noFileCopy) {
 function afterAll(fileName) {
cy.log('Waiting for closing the document - start.');
 
+   //https://github.com/cypress-io/cypress/issues/8621
+   if (Cypress.mocha.getRunner().stopped)
+   return;
+
if (Cypress.env('INTEGRATION') === 'nextcloud') {
if (Cypress.env('WITHIN_IFRAME') === 'TRUE') {
// Close the document
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-18 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/common/helper.js |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 5b6c0b8e1c4df4120613cc0356485c03bd8c3b2b
Author: Tamás Zolnai 
AuthorDate: Fri Sep 18 13:00:31 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Fri Sep 18 14:12:26 2020 +0200

cypress: NC: update afterAll method for mobile.

Newly close button does not actually close the document,
but steps back to read only mode. So we need to push it
twice.

Change-Id: Ic38f1e658396d9afe49496cfb75aa68df1c4623f
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102997
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/common/helper.js 
b/cypress_test/integration_tests/common/helper.js
index 38edadbf2..113ee79ee 100644
--- a/cypress_test/integration_tests/common/helper.js
+++ b/cypress_test/integration_tests/common/helper.js
@@ -332,6 +332,12 @@ function afterAll(fileName) {
if (Cypress.env('WITHIN_IFRAME') === 'TRUE') {
// Close the document
doIfOnMobile(function() {
+   cy.get('#tb_actionbar_item_closemobile')
+   .click();
+
+   cy.get('#mobile-edit-button')
+   .should('be.visible');
+
cy.get('#tb_actionbar_item_closemobile')
.then(function(item) {
cy.wrap(item)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-17 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/common/helper.js |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 011efb4ac4733c437dabfc7b3c31208fd777c1bc
Author: Tamás Zolnai 
AuthorDate: Thu Sep 17 17:06:46 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Thu Sep 17 19:10:54 2020 +0200

cypress: improve moveCursor() helper method.

Change-Id: I41b781a2cd2f413b4daea979478351d29588fda3
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102966
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/common/helper.js 
b/cypress_test/integration_tests/common/helper.js
index 505108bac..38edadbf2 100644
--- a/cypress_test/integration_tests/common/helper.js
+++ b/cypress_test/integration_tests/common/helper.js
@@ -692,6 +692,9 @@ function moveCursor(direction) {
}
typeIntoDocument(key);
 
+   cy.get('.blinking-cursor')
+   .should('be.visible');
+
cy.get('@origCursorPos')
.then(function(origCursorPos) {
cy.get('.blinking-cursor')
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-15 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/calc/calc_mobile_helper.js |   30 
+++---
 1 file changed, 23 insertions(+), 7 deletions(-)

New commits:
commit 328ed481179cb8d79c5a1eacc1a24e69b492739a
Author: Tamás Zolnai 
AuthorDate: Tue Sep 15 13:58:24 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Tue Sep 15 18:20:40 2020 +0200

cypress: php-proxy: select a row to remove text selection.

Instead of selecting a column. Selecting a column means
1048576 cells, which makes things slow. While selecting a
row means only 1024 cells, which won't slow down the
execution. This issue becomes more visible with php-proxy
since it's even slower.

Change-Id: I67828dcba250b2d04053cd44c6f8c83e7a466792
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102749
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/mobile/calc/calc_mobile_helper.js 
b/cypress_test/integration_tests/mobile/calc/calc_mobile_helper.js
index 70b4f1e67..5947dba2c 100644
--- a/cypress_test/integration_tests/mobile/calc/calc_mobile_helper.js
+++ b/cypress_test/integration_tests/mobile/calc/calc_mobile_helper.js
@@ -1,15 +1,31 @@
-/* global cy expect */
+/* global cy expect require */
+
+require('cypress-wait-until');
 
 function removeTextSelection() {
cy.log('Removing text selection - start.');
 
-   cy.get('.spreadsheet-header-columns')
-   .click();
+   cy.get('.spreadsheet-header-rows')
+   .then(function(header) {
+   var rect = header[0].getBoundingClientRect();
+   var posX = (rect.right + rect.left) / 2.0;
+   var posY = (rect.top + rect.bottom) / 2.0;
+
+   var moveY = 0.0;
+   cy.waitUntil(function() {
+   cy.get('body')
+   .click(posX, posY + moveY);
+
+   moveY += 1.0;
+   var regex = /A([0-9]+):AMJ\1$/;
+   return cy.get('input#addressInput')
+   .should('have.prop', 'value')
+   .then(function(value) {
+   return regex.test(value);
+   });
+   });
+   });
 
-   var regex = /[A-Z]1:[A-Z]1048576/;
-   cy.get('input#addressInput')
-   .should('have.prop', 'value')
-   .should('match', regex);
 
cy.log('Removing text selection - end.');
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-15 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/calc/alignment_options_spec.js |   25 
-
 cypress_test/integration_tests/mobile/calc/bottom_toolbar_spec.js|   27 
+-
 2 files changed, 27 insertions(+), 25 deletions(-)

New commits:
commit 8899b587459910e6b08253f04b23d2ca1c69c453
Author: Tamás Zolnai 
AuthorDate: Tue Sep 15 14:30:53 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Tue Sep 15 17:05:14 2020 +0200

cypress: php-proxy: fix text wraping test.

It could fail without php-proy too, but php-proxy
slows things down and makes this issue more visible.

Change-Id: I6bda9bfd195b28c797b0690e05cddf3f0ee98e12
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102750
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git 
a/cypress_test/integration_tests/mobile/calc/alignment_options_spec.js 
b/cypress_test/integration_tests/mobile/calc/alignment_options_spec.js
index e90368bf0..39c5e29d5 100644
--- a/cypress_test/integration_tests/mobile/calc/alignment_options_spec.js
+++ b/cypress_test/integration_tests/mobile/calc/alignment_options_spec.js
@@ -5,6 +5,8 @@ var calcHelper = require('../../common/calc_helper');
 var mobileHelper = require('../../common/mobile_helper');
 var calcMobileHelper = require('./calc_mobile_helper');
 
+require('cypress-wait-until');
+
 describe('Change alignment settings.', function() {
var testFileName = 'alignment_options.ods';
 
@@ -273,18 +275,17 @@ describe('Change alignment settings.', function() {
.should('have.prop', 'checked', true);
 
// We use the text position as indicator
-   cy.get('body')
-   .should(function() {
-   getTextPosForFirstCell();
-
-   cy.get('@currentTextPos')
-   .then(function(currentTextPos) {
-   cy.get('@originalTextPos')
-   
.then(function(originalTextPos) {
-   
expect(originalTextPos).to.be.greaterThan(currentTextPos);
-   });
-   });
-   });
+   cy.waitUntil(function() {
+   getTextPosForFirstCell();
+
+   return cy.get('@currentTextPos')
+   .then(function(currentTextPos) {
+   return cy.get('@originalTextPos')
+   .then(function(originalTextPos) 
{
+   return originalTextPos 
> currentTextPos;
+   });
+   });
+   });
});
 
it('Apply stacked option.', function() {
diff --git a/cypress_test/integration_tests/mobile/calc/bottom_toolbar_spec.js 
b/cypress_test/integration_tests/mobile/calc/bottom_toolbar_spec.js
index a94993ed6..dcbcdb870 100644
--- a/cypress_test/integration_tests/mobile/calc/bottom_toolbar_spec.js
+++ b/cypress_test/integration_tests/mobile/calc/bottom_toolbar_spec.js
@@ -1,10 +1,12 @@
-/* global describe it cy require expect afterEach */
+/* global describe it cy require afterEach */
 
 var helper = require('../../common/helper');
 var calcHelper = require('../../common/calc_helper');
 var mobileHelper = require('../../common/mobile_helper');
 var calcMobileHelper = require('./calc_mobile_helper');
 
+require('cypress-wait-until');
+
 describe('Interact with bottom toolbar.', function() {
var testFileName;
 
@@ -203,18 +205,17 @@ describe('Interact with bottom toolbar.', function() {
.click();
 
// We use the text position as indicator
-   cy.get('body')
-   .should(function() {
-   getTextPosForFirstCell();
-
-   cy.get('@currentTextPos')
-   .then(function(currentTextPos) {
-   cy.get('@originalTextPos')
-   
.then(function(originalTextPos) {
-   
expect(originalTextPos).to.be.greaterThan(currentTextPos);
-   });
-   });
-   });
+   cy.waitUntil(function() {
+   getTextPosForFirstCell();
+
+   return cy.get('@currentTextPos')
+   .then(function(currentTextPos) {
+   return cy.get('@originalTextPos')
+   

[Libreoffice-commits] online.git: cypress_test/integration_tests cypress_test/Makefile.am cypress_test/support

2020-09-15 Thread Tamás Zolnai (via logerrit)
 cypress_test/Makefile.am|5 ++-
 cypress_test/integration_tests/common/helper.js |   34 
 cypress_test/support/index.js   |   10 ++-
 3 files changed, 36 insertions(+), 13 deletions(-)

New commits:
commit f6d5cf9c3fdd6def25f2c2d3911ba580b00709df
Author: Tamás Zolnai 
AuthorDate: Mon Sep 14 15:53:51 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Tue Sep 15 15:40:22 2020 +0200

cypress: support running tests with php-proxy.

Change-Id: I9fe4a974582e0475026f6798a338bae033e6d7e6
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102733
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/Makefile.am b/cypress_test/Makefile.am
index 821886137..429473e30 100644
--- a/cypress_test/Makefile.am
+++ b/cypress_test/Makefile.am
@@ -235,7 +235,9 @@ endef
 define start_loolwsd
$(if $(findstring nextcloud, $(CYPRESS_INTEGRATION)),\
$(eval FREE_PORT:=9980),\
-   $(eval FREE_PORT:=$(shell $(GET_PORT_BINARY) --host=127.0.0.1 
$(ALLOWED_PORTS
+   $(if $(findstring php-proxy, $(CYPRESS_INTEGRATION)),
+   $(eval FREE_PORT:=9982),\
+   $(eval FREE_PORT:=$(shell $(GET_PORT_BINARY) 
--host=127.0.0.1 $(ALLOWED_PORTS)
@echo "Found available port for testing: $(FREE_PORT)"
@echo
@echo "Launching loolwsd..."
@@ -248,6 +250,7 @@ define start_loolwsd
--o:logging.file[@enable]=true --o:logging.level=trace \
--port=$(FREE_PORT) \
--pidfile=$(PID_FILE) \
+   $(if $(findstring php-proxy, 
$(CYPRESS_INTEGRATION)),--o:net.proxy_prefix=true) \
 > /dev/null 2>&1 &
@$(WAIT_ON_BINARY) http://localhost:$(FREE_PORT) --timeout 6
@echo
diff --git a/cypress_test/integration_tests/common/helper.js 
b/cypress_test/integration_tests/common/helper.js
index 4ef9cd937..9c1823b81 100644
--- a/cypress_test/integration_tests/common/helper.js
+++ b/cypress_test/integration_tests/common/helper.js
@@ -31,18 +31,20 @@ function loadTestDocLocal(fileName, subFolder, noFileCopy) {
});
 
// Open test document
-   var URI;
+   var URI = 'http://localhost';
+   if (Cypress.env('INTEGRATION') === 'php-proxy') {
+   URI += '/richproxy/proxy.php?req=';
+   } else {
+   URI += ':' + Cypress.env('SERVER_PORT');
+   }
+
if (subFolder === undefined) {
-   URI = 'http://localhost:'+
-   Cypress.env('SERVER_PORT') +
-   '/loleaflet/' +
+   URI += '/loleaflet/' +
Cypress.env('WSD_VERSION_HASH') +
'/loleaflet.html?lang=en-US_path=file://' +
Cypress.env('WORKDIR') + fileName;
} else {
-   URI = 'http://localhost:'+
-   Cypress.env('SERVER_PORT') +
-   '/loleaflet/' +
+   URI += '/loleaflet/' +
Cypress.env('WSD_VERSION_HASH') +
'/loleaflet.html?lang=en-US_path=file://' +
Cypress.env('WORKDIR') + subFolder + '/' + fileName;
@@ -192,6 +194,11 @@ function loadTestDoc(fileName, subFolder, noFileCopy) {
// Wait for the document to fully load
cy.get('.leaflet-tile-loaded', {timeout : 
Cypress.config('defaultCommandTimeout') * 2.0});
 
+   // The client is irresponsive for some seconds after load, because of 
the incoming messages.
+   if (Cypress.env('INTEGRATION') === 'php-proxy') {
+   cy.wait(1);
+   }
+
// Wait for the sidebar to open.
doIfOnDesktop(function() {
// sometimes sidebar fails to open
@@ -360,11 +367,16 @@ function afterAll(fileName) {
.should('not.exist');
 
}
-   } else if (Cypress.env('SERVER_PORT') === 9979) {
+   } else if (Cypress.env('SERVER_PORT') === 9979 || 
Cypress.env('INTEGRATION') === 'php-proxy') {
// Make sure that the document is closed
-   cy.visit('http://admin:admin@localhost:' +
-   Cypress.env('SERVER_PORT') +
-   '/loleaflet/dist/admin/admin.html');
+   if (Cypress.env('INTEGRATION') === 'php-proxy') {
+   
cy.visit('http://admin:admin@localhost/richproxy/proxy.php?req=' +
+   '/loleaflet/dist/admin/admin.html');
+   } else {
+   cy.visit('http://admin:admin@localhost:' +
+   Cypress.env('SERVER_PORT') +
+   '/loleaflet/dist/admin/admin.html');
+   }
 
cy.wait(5000);
} else {
diff --git a/cypress_test/support/index.js 

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

2020-09-14 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js |   16 
+-
 1 file changed, 9 insertions(+), 7 deletions(-)

New commits:
commit f0ad3cad533e58f8b8c1e658a0fb65231d995431
Author: Tamás Zolnai 
AuthorDate: Mon Sep 14 11:40:56 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Mon Sep 14 12:15:19 2020 +0200

cypress: fix random failure of date / time field insertion test.

Change-Id: Icc7d28ab1c436d4dc7fc32c7a6ecb3fdc98281d9
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102656
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git 
a/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js 
b/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js
index 5ef4f658a..6adf0cbef 100644
--- a/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js
+++ b/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js
@@ -19,7 +19,7 @@ describe('Impress insertion wizard.', function() {
helper.afterAll(testFileName);
});
 
-   function selectionShouldBeTextShape() {
+   function selectionShouldBeTextShape(checkShape) {
// Check that the shape is there
cy.get('.leaflet-pane.leaflet-overlay-pane svg')
.should(function(svg) {
@@ -27,8 +27,10 @@ describe('Impress insertion wizard.', function() {

expect(svg[0].getBBox().height).to.be.greaterThan(0);
});
 
-   cy.get('.leaflet-pane.leaflet-overlay-pane svg g.Page g')
-   .should('be.visible');
+   if (checkShape) {
+   cy.get('.leaflet-pane.leaflet-overlay-pane svg g.Page 
g')
+   .should('be.visible');
+   }
 
// Check also that the shape is fully visible
// TODO: shapes are hungs out of the slide after insertion
@@ -220,7 +222,7 @@ describe('Impress insertion wizard.', function() {
.click();
 
// Check that the shape is there
-   selectionShouldBeTextShape();
+   selectionShouldBeTextShape(false);
 
// Check the text
impressMobileHelper.selectTextOfShape();
@@ -240,7 +242,7 @@ describe('Impress insertion wizard.', function() {
.click();
 
// Check that the shape is there
-   selectionShouldBeTextShape();
+   selectionShouldBeTextShape(false);
 
// Check the text
impressMobileHelper.selectTextOfShape();
@@ -260,7 +262,7 @@ describe('Impress insertion wizard.', function() {
.click();
 
// Check that the shape is there
-   selectionShouldBeTextShape();
+   selectionShouldBeTextShape(false);
 
// Check the text
impressMobileHelper.selectTextOfShape();
@@ -280,7 +282,7 @@ describe('Impress insertion wizard.', function() {
.click();
 
// Check that the shape is there
-   selectionShouldBeTextShape();
+   selectionShouldBeTextShape(false);
 
// Check the text
impressMobileHelper.selectTextOfShape();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-11 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/common/helper.js |   24 +---
 1 file changed, 17 insertions(+), 7 deletions(-)

New commits:
commit 69645b9697d3296a62e11a90cb0633b0ae3b4501
Author: Tamás Zolnai 
AuthorDate: Thu Sep 10 15:56:09 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Fri Sep 11 18:27:42 2020 +0200

cypress: NC: delete exisitng test file more effectively.

We could not remove the existing test file, if there are
a lots of files in the NC storage, because in this case
not all files were displayed on the screen and so we could
not know whether the file was there or not.
So instead we remove all files, what we can do easily.

Change-Id: Iae7a8ee5c2064ecd94c29d990b7507001827b0dc
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102469
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/common/helper.js 
b/cypress_test/integration_tests/common/helper.js
index ce08fe87f..4550ad90c 100644
--- a/cypress_test/integration_tests/common/helper.js
+++ b/cypress_test/integration_tests/common/helper.js
@@ -84,15 +84,25 @@ function loadTestDocNextcloud(fileName, subFolder) {
cy.get('#free_space')
.should('not.have.attr', 'value', '');
 
-   // Remove file if exists
+   // Remove all files
cy.get('#fileList')
.then(function(filelist) {
-   if (filelist.find('tr[data-file=\'' + fileName + 
'\']').length !== 0) {
-   cy.get('tr[data-file=\'' + fileName + '\'] 
.action-menu.permanent')
-   .click();
-
-   
cy.get('.menuitem.action.action-delete.permanent')
-   .click();
+   if (filelist.find('tr').length !== 0) {
+   cy.waitUntil(function() {
+   cy.get('#fileList tr:nth-of-type(1) 
.action-menu.permanent')
+   .click();
+
+   
cy.get('.menuitem.action.action-delete.permanent')
+   .click();
+
+   cy.get('#uploadprogressbar')
+   .should('not.be.visible');
+
+   return cy.get('#fileList')
+   .then(function(filelist) {
+   return 
filelist.find('tr').length === 0;
+   });
+   }, {timeout: 6});
}
});
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: cypress_test/integration_tests cypress_test/Makefile.am test/Makefile.am test/UnitPHPProxy.cpp

2020-09-09 Thread Tamás Zolnai (via logerrit)
 cypress_test/Makefile.am|   16 ++
 cypress_test/integration_tests/common/helper.js |   26 +---
 test/Makefile.am|1 
 test/UnitPHPProxy.cpp   |2 -
 4 files changed, 32 insertions(+), 13 deletions(-)

New commits:
commit 0d7a58aa5765a9c997a6ad3e4b77863ed5a29176
Author: Tamás Zolnai 
AuthorDate: Tue Sep 1 14:57:36 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Wed Sep 9 15:50:35 2020 +0200

cypress: add 'make check-proxy-mobile' command.

To run mobile test with php-proxy simulation.
It's an initial command, should be improved later,
after php proxy simulation nicely works with the
tests.

Change-Id: Id9d2bacfbf09ca34a2c84e0d32808749df4c1909
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102321
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/Makefile.am b/cypress_test/Makefile.am
index 16bbc28c4..78ab24784 100644
--- a/cypress_test/Makefile.am
+++ b/cypress_test/Makefile.am
@@ -205,6 +205,22 @@ do-run-cov: @JAILS_PATH@ $(NODE_BINS)
$(call run_all_multiuser_tests,COVERAGE_RUN="1")
@$(KILL_COMMAND) || true
 
+check-proxy-mobile: @JAILS_PATH@ $(NODE_BINS)
+   $(call run_JS_error_check)
+   $(eval FREE_PORT:=9979)
+   @pkill loolwsd || pkill --signal SIGKILL loolwsd || true
+   @sleep 5
+   ../test/run_unit.sh \
+   --test-name unit-php-proxy.la \
+   --log-file workdir/php-proxy.log \
+   --trs-file workdir/php-proxy.trs \
+   --color-tests yes \
+   --enable-hard-errors yes \
+   --expect-failure no -- ../test/unit-php-proxy.la &
+   @$(WAIT_ON_BINARY) http://localhost:$(FREE_PORT) --timeout 6
+   $(call run_mobile_tests,$(spec))
+   @pkill loolwsd || pkill --signal SIGKILL loolwsd || true
+
 @JAILS_PATH@:
mkdir -p $@
 
diff --git a/cypress_test/integration_tests/common/helper.js 
b/cypress_test/integration_tests/common/helper.js
index 8113ee55e..f461f90cc 100644
--- a/cypress_test/integration_tests/common/helper.js
+++ b/cypress_test/integration_tests/common/helper.js
@@ -188,17 +188,21 @@ function afterAll(fileName) {
Cypress.env('SERVER_PORT') +
'/loleaflet/dist/admin/admin.html');
 
-   cy.get('#uptime')
-   .should('not.have.text', '0');
-
-   // We have all lines of document infos as one long string.
-   // We have PID number before the file names, with matching
-   // also on the PID number we can make sure to match on the
-   // whole file name, not on a suffix of a file name.
-   var regex = new RegExp('[0-9]' + fileName);
-   cy.get('#docview', { timeout: Cypress.config('defaultCommandTimeout') * 
2.0 })
-   .invoke('text')
-   .should('not.match', regex);
+   if (Cypress.env('SERVER_PORT') === 9979) {
+   cy.wait(5000);
+   } else {
+   cy.get('#uptime')
+   .should('not.have.text', '0');
+
+   // We have all lines of document infos as one long string.
+   // We have PID number before the file names, with matching
+   // also on the PID number we can make sure to match on the
+   // whole file name, not on a suffix of a file name.
+   var regex = new RegExp('[0-9]' + fileName);
+   cy.get('#docview', { timeout: 
Cypress.config('defaultCommandTimeout') * 2.0 })
+   .invoke('text')
+   .should('not.match', regex);
+   }
 
cy.log('Waiting for closing the document - end.');
 }
diff --git a/test/Makefile.am b/test/Makefile.am
index 899dd0764..967143b3e 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -228,7 +228,6 @@ TESTS = \
unit-load.la \
unit-cursor.la \
unit-calc.la \
-   unit-php-proxy.la \
unit-insert-delete.la \
unit-close.la \
unit-bad-doc-load.la \
diff --git a/test/UnitPHPProxy.cpp b/test/UnitPHPProxy.cpp
index 57c44ac30..b3154415e 100644
--- a/test/UnitPHPProxy.cpp
+++ b/test/UnitPHPProxy.cpp
@@ -248,7 +248,7 @@ public:
 
 lastRequestMS = Util::getNowInMS();
 int64_t diff = 0;
-while (diff < 15000)
+while (diff < 60)
 {
 auto nowMS = Util::getNowInMS();
 diff = nowMS - lastRequestMS;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-08 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/writer/shape_properties_spec.js |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b027150707a388ce4cbddca7dc8bcdd64ac345e0
Author: Tamás Zolnai 
AuthorDate: Fri Sep 4 14:35:39 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Tue Sep 8 16:39:58 2020 +0200

cypress: disable unstable test.

Change-Id: I3358c38d11692bcd7e08aa79fd6a9e95c6509654
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102259
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git 
a/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js 
b/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js
index e9457a3e9..6f3748ed6 100644
--- a/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js
@@ -190,7 +190,7 @@ describe('Change shape properties via mobile wizard.', 
function() {
.should('have.attr', 'stroke', 'rgb(152,0,0)');
});
 
-   it('Change line style', function() {
+   it.skip('Change line style', function() {
openLinePropertyPanel();
 
helper.clickOnIdle('#linestyle');
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: cypress_test/integration_tests kit/ChildSession.cpp loleaflet/src test/UnitSession.cpp wsd/DocumentBroker.cpp wsd/DocumentBroker.hpp wsd/LOOLWSD.cpp

2020-09-07 Thread Szymon Kłos (via logerrit)
 cypress_test/integration_tests/mobile/calc/hamburger_menu_spec.js|8 -
 cypress_test/integration_tests/mobile/impress/hamburger_menu_spec.js |8 -
 cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js  |   12 +-
 kit/ChildSession.cpp |   10 +-
 loleaflet/src/core/Socket.js |3 
 loleaflet/src/layer/tile/TileLayer.js|2 
 test/UnitSession.cpp |   16 +--
 wsd/DocumentBroker.cpp   |   27 
++
 wsd/DocumentBroker.hpp   |9 ++
 wsd/LOOLWSD.cpp  |   45 
+++---
 10 files changed, 85 insertions(+), 55 deletions(-)

New commits:
commit 70827c372c31f5d11dc9578269cdd850eee639ef
Author: Szymon Kłos 
AuthorDate: Thu Sep 3 11:34:13 2020 +0200
Commit: Michael Meeks 
CommitDate: Mon Sep 7 15:00:20 2020 +0200

Simplify download process

Use hash to identify download and pass that to the client.
This allows us to reduce parameters for download requests.
DocBroker maps download ids to URL in the file system.

Change-Id: I254d4f0ccaf3cff9f038a817c8162510ae228bc5
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101992
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Tested-by: Michael Meeks 
Reviewed-by: Michael Meeks 

diff --git a/cypress_test/integration_tests/mobile/calc/hamburger_menu_spec.js 
b/cypress_test/integration_tests/mobile/calc/hamburger_menu_spec.js
index 7b71b3c16..19d49cdab 100644
--- a/cypress_test/integration_tests/mobile/calc/hamburger_menu_spec.js
+++ b/cypress_test/integration_tests/mobile/calc/hamburger_menu_spec.js
@@ -69,7 +69,7 @@ describe('Trigger hamburger menu options.', function() {
 
cy.get('iframe')
.should('have.attr', 'data-src')
-   .should('contain', 'document.pdf');
+   .should('contain', 'download');
});
 
it('Download as ODS', function() {
@@ -85,7 +85,7 @@ describe('Trigger hamburger menu options.', function() {
 
cy.get('iframe')
.should('have.attr', 'data-src')
-   .should('contain', 'document.ods');
+   .should('contain', 'download');
});
 
it('Download as XLS', function() {
@@ -101,7 +101,7 @@ describe('Trigger hamburger menu options.', function() {
 
cy.get('iframe')
.should('have.attr', 'data-src')
-   .should('contain', 'document.xls');
+   .should('contain', 'download');
});
 
it('Download as XLSX', function() {
@@ -117,7 +117,7 @@ describe('Trigger hamburger menu options.', function() {
 
cy.get('iframe')
.should('have.attr', 'data-src')
-   .should('contain', 'document.xlsx');
+   .should('contain', 'download');
});
 
it('Undo/redo.', function() {
diff --git 
a/cypress_test/integration_tests/mobile/impress/hamburger_menu_spec.js 
b/cypress_test/integration_tests/mobile/impress/hamburger_menu_spec.js
index 73c58ee13..92d3e6dbc 100644
--- a/cypress_test/integration_tests/mobile/impress/hamburger_menu_spec.js
+++ b/cypress_test/integration_tests/mobile/impress/hamburger_menu_spec.js
@@ -80,7 +80,7 @@ describe('Trigger hamburger menu options.', function() {
 
cy.get('iframe')
.should('have.attr', 'data-src')
-   .should('contain', 'document.pdf');
+   .should('contain', 'download');
});
 
it('Download as ODP', function() {
@@ -96,7 +96,7 @@ describe('Trigger hamburger menu options.', function() {
 
cy.get('iframe')
.should('have.attr', 'data-src')
-   .should('contain', 'document.odp');
+   .should('contain', 'download');
});
 
it('Download as PPT', function() {
@@ -112,7 +112,7 @@ describe('Trigger hamburger menu options.', function() {
 
cy.get('iframe')
.should('have.attr', 'data-src')
-   .should('contain', 'document.ppt');
+   .should('contain', 'download');
});
 
it('Download as PPTX', function() {
@@ -128,7 +128,7 @@ describe('Trigger hamburger menu options.', function() {
 
cy.get('iframe')
.should('have.attr', 'data-src')
-   .should('contain', 'document.pptx');
+   .should('contain', 'download');
});
 
it('Undo/redo.', function() {
diff --git 

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

2020-08-19 Thread Michael Meeks (via logerrit)
 cypress_test/integration_tests/desktop/writer/focus_spec.js |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit ab0538bf30a47df5c57658c21b692de101e0220b
Author: Michael Meeks 
AuthorDate: Tue Aug 18 19:54:41 2020 +0100
Commit: Michael Meeks 
CommitDate: Wed Aug 19 14:24:19 2020 +0200

Enable cypress search / focus test.

Change-Id: I9f6482d80fac4dae677dcb471deff3b3575dbbfd
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100986
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Michael Meeks 

diff --git a/cypress_test/integration_tests/desktop/writer/focus_spec.js 
b/cypress_test/integration_tests/desktop/writer/focus_spec.js
index ab830e34a..780ee0619 100644
--- a/cypress_test/integration_tests/desktop/writer/focus_spec.js
+++ b/cypress_test/integration_tests/desktop/writer/focus_spec.js
@@ -70,10 +70,10 @@ describe('Focus tests', function() {
 
// Search field still has the focus.
// We have a focus issue here.
-   //cy.document().its('activeElement.id')
-   //  .should('be.eq', 'search-input');
+   cy.document().its('activeElement.id')
+   .should('be.eq', 'search-input');
 
-   //cy.get('#search-input')
-   //  .should('have.prop', 'value', text);
+   cy.get('#search-input')
+   .should('have.prop', 'value', text);
});
 });
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-08-14 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/impress/impress_mobile_helper.js |   16 
++
 1 file changed, 16 insertions(+)

New commits:
commit 8d3209dd1e49edbc1c0d6551347dd1a461d510b7
Author: Tamás Zolnai 
AuthorDate: Fri Aug 14 16:33:34 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Fri Aug 14 21:33:39 2020 +0200

cypress: add log lines to impress helper methods.

Change-Id: I64289fa556e12142400bca07ff9d45f2b2df72cd
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100757
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git 
a/cypress_test/integration_tests/mobile/impress/impress_mobile_helper.js 
b/cypress_test/integration_tests/mobile/impress/impress_mobile_helper.js
index 6341caa96..62202bc4e 100644
--- a/cypress_test/integration_tests/mobile/impress/impress_mobile_helper.js
+++ b/cypress_test/integration_tests/mobile/impress/impress_mobile_helper.js
@@ -3,6 +3,8 @@
 var helper = require('../../common/helper');
 
 function selectTextShapeInTheCenter() {
+   cy.log('Selecting text shape - start.');
+
// Click on the center of the slide to select the text shape there
cy.get('#document-container')
.then(function(items) {
@@ -21,9 +23,13 @@ function selectTextShapeInTheCenter() {
expect(shape.hasClass('com.sun.star.drawing.TextShape') 
||
   shape.hasClass('Outline')).to.be.true;
});
+
+   cy.log('Selecting text shape - end.');
 }
 
 function selectTextOfShape() {
+   cy.log('Selecting text of shape - start.');
+
// Double click onto the selected shape
cy.waitUntil(function() {
cy.get('svg g .leaflet-interactive')
@@ -47,9 +53,13 @@ function selectTextOfShape() {
.should('exist');
 
helper.selectAllText(false);
+
+   cy.log('Selecting text of shape - end.');
 }
 
 function removeShapeSelection() {
+   cy.log('Removing shape selection - start.');
+
// Remove selection with on the top-left corner of the slide
cy.waitUntil(function() {
cy.get('.leaflet-tile')
@@ -70,9 +80,13 @@ function removeShapeSelection() {
 
cy.get('.leaflet-drag-transform-marker')
.should('not.exist');
+
+   cy.log('Removing shape selection - end.');
 }
 
 function triggerNewSVGForShapeInTheCenter() {
+   cy.log('Triggering new SVG for shape - start.');
+
removeShapeSelection();
 
// If we click too fast on the shape again
@@ -81,6 +95,8 @@ function triggerNewSVGForShapeInTheCenter() {
 
// Select text shape again which will retrigger a new SVG from core
selectTextShapeInTheCenter();
+
+   cy.log('Triggering new SVG for shape - end.');
 }
 
 module.exports.selectTextShapeInTheCenter = selectTextShapeInTheCenter;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-08-14 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/impress/impress_mobile_helper.js |   28 
+-
 1 file changed, 16 insertions(+), 12 deletions(-)

New commits:
commit 15444dbf33fdd5d045c7e9fd5128fe323977a1bf
Author: Tamás Zolnai 
AuthorDate: Fri Aug 14 16:31:31 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Fri Aug 14 20:44:39 2020 +0200

cypress: improve removeShapeSelection() method.

Instead of using a click() and a dblclick() method, do
click() repeatedly, until selection is actually removed.
For example, it takes ony click when the shape is selected,
but no text is selected inside it. It takes two clicks when
a text also selected and sometimes when selection stucks it
takes even more click.

Change-Id: Ic017d0f5b623de29343cf171a8f4d64988fdb721
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100756
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git 
a/cypress_test/integration_tests/mobile/impress/impress_mobile_helper.js 
b/cypress_test/integration_tests/mobile/impress/impress_mobile_helper.js
index 1f197e3ba..6341caa96 100644
--- a/cypress_test/integration_tests/mobile/impress/impress_mobile_helper.js
+++ b/cypress_test/integration_tests/mobile/impress/impress_mobile_helper.js
@@ -50,19 +50,23 @@ function selectTextOfShape() {
 }
 
 function removeShapeSelection() {
-   // Remove selection first with clicking next to the rotate handler
-   cy.get('.transform-handler--rotate')
-   .then(function(items) {
-   var XPos = items[0].getBoundingClientRect().left - 10;
-   var YPos = items[0].getBoundingClientRect().top;
-   // Sometimes selection is persistent, so click more 
times
-   // to achive actual deselection.
-   cy.get('body')
-   .click(XPos, YPos);
+   // Remove selection with on the top-left corner of the slide
+   cy.waitUntil(function() {
+   cy.get('.leaflet-tile')
+   .then(function(items) {
+   var XPos = 
items[0].getBoundingClientRect().left + 10;
+   var YPos = items[0].getBoundingClientRect().top 
+ 10;
+   cy.get('body')
+   .click(XPos, YPos);
+   });
 
-   cy.get('body')
-   .dblclick(XPos, YPos);
-   });
+   cy.wait(2000);
+
+   return cy.get('.leaflet-zoom-animated')
+   .then(function(overlay) {
+   return overlay.children('g').length === 0;
+   });
+   });
 
cy.get('.leaflet-drag-transform-marker')
.should('not.exist');
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-08-14 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/calc/calc_mobile_helper.js |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 0139a7c2f468bbd21955a3adf0131706d10300ce
Author: Tamás Zolnai 
AuthorDate: Fri Aug 14 13:54:12 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Fri Aug 14 14:31:12 2020 +0200

cypress: improve selectAllMobile() method.

A bug occures when we remove a column selcetion.
The document freezes for seconds before it is
updated. Let's workaround it in cypress tests,
until it's fixed.

Change-Id: I5436c969655260d377d4ce47c86270ef15a15c2f
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100740
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/mobile/calc/calc_mobile_helper.js 
b/cypress_test/integration_tests/mobile/calc/calc_mobile_helper.js
index fb1c8ef5c..70b4f1e67 100644
--- a/cypress_test/integration_tests/mobile/calc/calc_mobile_helper.js
+++ b/cypress_test/integration_tests/mobile/calc/calc_mobile_helper.js
@@ -25,6 +25,11 @@ function selectAllMobile(removeSelection = true) {
var yPos = corner.height() - 10;
cy.get('#spreadsheet-header-corner')
.click(0, yPos);
+   // A known issue that removing a column selection
+   // triggers a small freeze of the document.
+   // So let's wait here to avoit timeout.
+   if (removeSelection)
+   cy.wait(3000);
});
 
cy.get('.spreadsheet-cell-resize-marker')
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-08-13 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/common/helper.js |   52 +++-
 1 file changed, 42 insertions(+), 10 deletions(-)

New commits:
commit a3da55a28de05445ac2c920868d23a18ff6630a8
Author: Tamás Zolnai 
AuthorDate: Thu Aug 13 15:13:49 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Thu Aug 13 20:23:30 2020 +0200

cypress: avoid random failure of slide operations tests.

It seems there is a bug in sidebar showing code,
that it's not always shown by opening a document.
So instead of checking the visibility of sidebar,
just wait some time to finish document load.

Change-Id: I9d94b7fe085f4dfcf366789e27ab1bb388bf13b1
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100675
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/common/helper.js 
b/cypress_test/integration_tests/common/helper.js
index e9e3450ab..8596246bc 100644
--- a/cypress_test/integration_tests/common/helper.js
+++ b/cypress_test/integration_tests/common/helper.js
@@ -58,18 +58,21 @@ function loadTestDoc(fileName, subFolder, noFileCopy) {
 
// Wait for the sidebar to open.
doIfOnDesktop(function() {
-   cy.get('#sidebar-panel')
-   .should('be.visible');
+   // sometimes sidebar fails to open
+   cy.wait(1000);
+
+   //cy.get('#sidebar-panel')
+   //  .should('be.visible');
 
// Check that the document does not take the whole window width.
-   cy.window()
-   .then(function(win) {
-   cy.get('#document-container')
-   .should(function(doc) {
-   expect(doc).to.have.lengthOf(1);
-   
expect(doc[0].getBoundingClientRect().right).to.be.lessThan(win.innerWidth * 
0.95);
-   });
-   });
+   //cy.window()
+   //  .then(function(win) {
+   //  cy.get('#document-container')
+   //  .should(function(doc) {
+   //  expect(doc).to.have.lengthOf(1);
+   //  
expect(doc[0].getBoundingClientRect().right).to.be.lessThan(win.innerWidth * 
0.95);
+   //  });
+   //  });
});
 
cy.log('Loading test document - end.');
@@ -241,6 +244,15 @@ function doIfInCalc(callback) {
});
 }
 
+function doIfNotInCalc(callback) {
+   cy.get('#document-container')
+   .then(function(doc) {
+   if (!doc.hasClass('spreadsheet-doctype')) {
+   callback();
+   }
+   });
+}
+
 function doIfInImpress(callback) {
cy.get('#document-container')
.then(function(doc) {
@@ -249,6 +261,14 @@ function doIfInImpress(callback) {
}
});
 }
+function doIfNotInImpress(callback) {
+   cy.get('#document-container')
+   .then(function(doc) {
+   if (!doc.hasClass('presentation-doctype')) {
+   callback();
+   }
+   });
+}
 
 function doIfInWriter(callback) {
cy.get('#document-container')
@@ -259,6 +279,15 @@ function doIfInWriter(callback) {
});
 }
 
+function doIfNotInWriter(callback) {
+   cy.get('#document-container')
+   .then(function(doc) {
+   if (!doc.hasClass('text-doctype')) {
+   callback();
+   }
+   });
+}
+
 // Types text into elem with a delay in between characters.
 // Sometimes cy.type results in random character insertion,
 // this avoids that, which is not clear why it happens.
@@ -507,6 +536,9 @@ module.exports.initAliasToEmptyString = 
initAliasToEmptyString;
 module.exports.doIfInCalc = doIfInCalc;
 module.exports.doIfInImpress = doIfInImpress;
 module.exports.doIfInWriter = doIfInWriter;
+module.exports.doIfNotInCalc = doIfNotInCalc;
+module.exports.doIfNotInImpress = doIfNotInImpress;
+module.exports.doIfNotInWriter = doIfNotInWriter;
 module.exports.beforeAll = beforeAll;
 module.exports.typeText = typeText;
 module.exports.getLOVersion = getLOVersion;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-08-12 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/common/helper.js |9 +
 1 file changed, 9 insertions(+)

New commits:
commit 815802e6e0fbf5eeff17a48d3d84b4b6fe687058
Author: Tamás Zolnai 
AuthorDate: Wed Aug 12 16:59:12 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Wed Aug 12 19:59:35 2020 +0200

cypress: improve typeIntoDocument() helper method.

First grab the focus to the textarea, otherwise
the force: true flag leads to unexpected behavior.

Change-Id: Ic99bb1b22734733d7bb40b895173e5382c2ba5f4
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100605
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/common/helper.js 
b/cypress_test/integration_tests/common/helper.js
index 9853b7174..e9e3450ab 100644
--- a/cypress_test/integration_tests/common/helper.js
+++ b/cypress_test/integration_tests/common/helper.js
@@ -480,6 +480,15 @@ function moveCursor(direction) {
 }
 
 function typeIntoDocument(text) {
+   cy.get('textarea.clipboard')
+   .focus();
+
+   cy.document().its('activeElement.tagName')
+   .should('be.eq', 'TEXTAREA');
+
+   cy.document().its('activeElement.className')
+   .should('be.eq', 'clipboard');
+
cy.get('textarea.clipboard')
.type(text, {force: true});
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-08-12 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/calc/calc_mobile_helper.js |8 

 1 file changed, 8 deletions(-)

New commits:
commit 8b35a4618f89f5c45efd2b04bc1e228ee263309d
Author: Tamás Zolnai 
AuthorDate: Wed Aug 12 15:12:02 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Wed Aug 12 16:51:31 2020 +0200

cypress: improve calc column selection methods.

Searching '-8px,' is not stable, because sometimes it's
'-9px,'.

Change-Id: I6226a1ec3086b84540d74cb1c7691cf355752337
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100600
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/mobile/calc/calc_mobile_helper.js 
b/cypress_test/integration_tests/mobile/calc/calc_mobile_helper.js
index dde072665..fb1c8ef5c 100644
--- a/cypress_test/integration_tests/mobile/calc/calc_mobile_helper.js
+++ b/cypress_test/integration_tests/mobile/calc/calc_mobile_helper.js
@@ -6,10 +6,6 @@ function removeTextSelection() {
cy.get('.spreadsheet-header-columns')
.click();
 
-   cy.get('.spreadsheet-cell-resize-marker')
-   .invoke('attr', 'style')
-   .should('contain', '-8px,');
-
var regex = /[A-Z]1:[A-Z]1048576/;
cy.get('input#addressInput')
.should('have.prop', 'value')
@@ -72,10 +68,6 @@ function selectFirstColumn() {
.click(XPos, YPos);
});
 
-   cy.get('.spreadsheet-cell-resize-marker')
-   .invoke('attr', 'style')
-   .should('contain', '-8px,');
-
cy.get('input#addressInput')
.should('have.prop', 'value', 'A1:A1048576');
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-08-12 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/common/helper.js   |   20 
++--
 cypress_test/integration_tests/common/impress_helper.js   |3 
 cypress_test/integration_tests/desktop/calc/focus_spec.js |   14 
+--
 cypress_test/integration_tests/desktop/writer/form_field_spec.js  |   42 
-
 cypress_test/integration_tests/mobile/calc/alignment_options_spec.js  |3 
 cypress_test/integration_tests/mobile/calc/bottom_toolbar_spec.js |3 
 cypress_test/integration_tests/mobile/calc/calc_mobile_helper.js  |   36 
++--
 cypress_test/integration_tests/mobile/calc/focus_spec.js  |   20 
++--
 cypress_test/integration_tests/mobile/calc/spellchecking_spec.js  |3 
 cypress_test/integration_tests/mobile/impress/hamburger_menu_spec.js  |9 --
 cypress_test/integration_tests/mobile/impress/impress_focus_spec.js   |9 --
 cypress_test/integration_tests/mobile/impress/spellchecking_spec.js   |3 
 cypress_test/integration_tests/mobile/writer/focus_spec.js|9 --
 cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js   |   30 
++
 cypress_test/integration_tests/mobile/writer/insert_object_spec.js|   17 
+--
 cypress_test/integration_tests/mobile/writer/shape_properties_spec.js |9 +-
 cypress_test/integration_tests/mobile/writer/spellchecking_spec.js|3 
 cypress_test/integration_tests/mobile/writer/table_properties_spec.js |   45 
+-
 cypress_test/integration_tests/mobile/writer/toolbar_spec.js  |4 
 cypress_test/integration_tests/mobile/writer/writer_mobile_helper.js  |6 -
 20 files changed, 107 insertions(+), 181 deletions(-)

New commits:
commit dbe8502a5815e16198ac1de3f66eedb071fcbaa4
Author: Tamás Zolnai 
AuthorDate: Wed Aug 12 05:23:25 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Wed Aug 12 14:59:30 2020 +0200

cypress: introduce typeIntoDocument helper method.

It was not consistent what we used to type into the
document (e.g. 'body', 'textarea.clipboard' or
'#document-container'). Also we need to use force
parameter because 'textarea.clipboard' has no actual area
which makes cypress fail with: '`cy.type()` failed because
the center of this element is hidden from view'.

Change-Id: I04e0a82ed8450d583e407715fde1855197cae109
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100574
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/common/helper.js 
b/cypress_test/integration_tests/common/helper.js
index 7cfce8f9f..9853b7174 100644
--- a/cypress_test/integration_tests/common/helper.js
+++ b/cypress_test/integration_tests/common/helper.js
@@ -114,8 +114,7 @@ function selectAllText(assertFocus = true) {
cy.log('Select all text');
 
// Trigger select all
-   cy.get('textarea.clipboard')
-   .type('{ctrl}a');
+   typeIntoDocument('{ctrl}a');
 
cy.get('.leaflet-marker-icon')
.should('exist');
@@ -128,15 +127,13 @@ function clearAllText() {
cy.log('Clear all text');
 
// Trigger select all
-   cy.get('textarea.clipboard')
-   .type('{ctrl}a');
+   typeIntoDocument('{ctrl}a');
 
cy.get('.leaflet-marker-icon')
.should('exist');
 
// Then remove
-   cy.get('textarea.clipboard')
-   .type('{del}');
+   typeIntoDocument('{del}');
 
cy.get('.leaflet-marker-icon')
.should('not.exist');
@@ -427,10 +424,9 @@ function doIfOnDesktop(callback) {
});
 }
 
-function moveCursor(direction, forceType = false) {
+function moveCursor(direction) {
cy.log('Moving text cursor - start.');
cy.log('Param - direction: ' + direction);
-   cy.log('Param - forceType: ' + forceType);
 
initAliasToNegative('origCursorPos');
 
@@ -462,8 +458,7 @@ function moveCursor(direction, forceType = false) {
} else if (direction === 'right') {
key = '{rightarrow}';
}
-   cy.get('textarea.clipboard')
-   .type(key, {force : forceType});
+   typeIntoDocument(key);
 
cy.get('@origCursorPos')
.then(function(origCursorPos) {
@@ -484,6 +479,10 @@ function moveCursor(direction, forceType = false) {
cy.log('Moving text cursor - end.');
 }
 
+function typeIntoDocument(text) {
+   cy.get('textarea.clipboard')
+   .type(text, {force: true});
+}
 
 module.exports.loadTestDoc = loadTestDoc;
 module.exports.assertCursorAndFocus = assertCursorAndFocus;
@@ -509,3 +508,4 @@ module.exports.waitUntilIdle = waitUntilIdle;
 module.exports.doIfOnMobile = doIfOnMobile;
 module.exports.doIfOnDesktop = doIfOnDesktop;
 module.exports.moveCursor = moveCursor;
+module.exports.typeIntoDocument = typeIntoDocument;
diff --git a/cypress_test/integration_tests/common/impress_helper.js 

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

2020-08-11 Thread Tamás Zolnai (via logerrit)
 
cypress_test/integration_tests/multiuser/writer/simultaneous_typing_user1_spec.js
 |   10 --
 
cypress_test/integration_tests/multiuser/writer/simultaneous_typing_user2_spec.js
 |8 
 2 files changed, 18 deletions(-)

New commits:
commit e4a40a515bab15fa15f9822f3bf30c484ae61631
Author: Tamás Zolnai 
AuthorDate: Tue Aug 11 18:46:53 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Tue Aug 11 19:26:42 2020 +0200

cypress: stabilize simultaneous typing test.

Change-Id: I1ce16b16fcab38fd63255d18de257ece5977c9be
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100544
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git 
a/cypress_test/integration_tests/multiuser/writer/simultaneous_typing_user1_spec.js
 
b/cypress_test/integration_tests/multiuser/writer/simultaneous_typing_user1_spec.js
index 517b98b48..8cccd8dc4 100644
--- 
a/cypress_test/integration_tests/multiuser/writer/simultaneous_typing_user1_spec.js
+++ 
b/cypress_test/integration_tests/multiuser/writer/simultaneous_typing_user1_spec.js
@@ -33,16 +33,6 @@ describe('Simultaneous typing: user-1.', function() {
 
cy.get('#copy-paste-container p')
.should('contain.text', text);
-
-   // Change paragraph alignment to trigger user-2 actions
-   helper.moveCursor('up');
-
-   cy.get('#tb_editbar_item_centerpara .w2ui-button')
-   .click();
-
-   // user-2 changes the paragraph alignment after finished
-   cy.get('#tb_editbar_item_rightpara .w2ui-button')
-   .should('have.class', 'checked');
});
 
 });
diff --git 
a/cypress_test/integration_tests/multiuser/writer/simultaneous_typing_user2_spec.js
 
b/cypress_test/integration_tests/multiuser/writer/simultaneous_typing_user2_spec.js
index d8cc961c7..e7d79872b 100644
--- 
a/cypress_test/integration_tests/multiuser/writer/simultaneous_typing_user2_spec.js
+++ 
b/cypress_test/integration_tests/multiuser/writer/simultaneous_typing_user2_spec.js
@@ -33,13 +33,5 @@ describe('Simultaneous typing: user-2.', function() {
 
cy.get('#copy-paste-container p')
.should('contain.text', text);
-
-   // user-1 changes the paragraph alignment after finished
-   cy.get('#tb_editbar_item_centerpara .w2ui-button')
-   .should('have.class', 'checked');
-
-   // Change paragraph alignment to trigger user-2 actions
-   cy.get('#tb_editbar_item_rightpara .w2ui-button')
-   .click();
});
 });
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-08-11 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/desktop/writer/form_field_spec.js |   24 
+++---
 1 file changed, 9 insertions(+), 15 deletions(-)

New commits:
commit 4c2ba4ae57d64e4288f1e6bf4ddf386f1260e6b0
Author: Tamás Zolnai 
AuthorDate: Tue Aug 11 15:48:20 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Tue Aug 11 18:47:50 2020 +0200

cypress: stabilize form field tests.

Change-Id: Iceeb8ff6231fc401943c4be8835955a50278cf17
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100530
Tested-by: Jenkins
Tested-by: Tamás Zolnai 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/desktop/writer/form_field_spec.js 
b/cypress_test/integration_tests/desktop/writer/form_field_spec.js
index 0f6c44390..b507a28f7 100644
--- a/cypress_test/integration_tests/desktop/writer/form_field_spec.js
+++ b/cypress_test/integration_tests/desktop/writer/form_field_spec.js
@@ -9,11 +9,12 @@ describe('Form field button tests.', function() {
testFileName = fileName;
helper.beforeAll(fileName, 'writer');
 
-   cy.get('#document-container')
-   .click();
-
+   // Blinking cursor is not visible for some reason.
cy.get('textarea.clipboard')
-   .type('{home}');
+   .type('x');
+
+   cy.get('.blinking-cursor')
+   .should('be.visible');
}
afterEach(function() {
helper.afterAll(testFileName, 'writer');
@@ -175,9 +176,11 @@ describe('Form field button tests.', function() {
cy.contains('.drop-down-field-list-item', 'January')
.click();
 
+   cy.get('.drop-down-field-list-item.selected')
+   .should('have.text', 'January');
+
// Move the cursor away and back
-   cy.get('textarea.clipboard')
-   .type('{home}', {force : true});
+   moveCursor('left');
 
buttonShouldNotExist();
 
@@ -204,15 +207,6 @@ describe('Form field button tests.', function() {
cy.contains('.drop-down-field-list-item', 'December')
.click();
 
-   moveCursor('right');
-
-   buttonShouldNotExist();
-
-   // Move the cursor back next to the field
-   moveCursor('left');
-
-   buttonShouldExist();
-
cy.get('.drop-down-field-list-item.selected')
.should('have.text', 'December');
});
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-08-11 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/common/helper.js |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a6e2ca178083f7d0ab78e31c21860b13d349c352
Author: Tamás Zolnai 
AuthorDate: Tue Aug 11 15:18:11 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Tue Aug 11 18:44:11 2020 +0200

cypress: improve moveCursor() helper method.

Allow zero as cursor position.

Change-Id: Icfcae959ab011b2e8ad76db424552a152d4267dc
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100500
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/common/helper.js 
b/cypress_test/integration_tests/common/helper.js
index 51abe98a6..7cfce8f9f 100644
--- a/cypress_test/integration_tests/common/helper.js
+++ b/cypress_test/integration_tests/common/helper.js
@@ -450,7 +450,7 @@ function moveCursor(direction, forceType = false) {
}
 
cy.get('@origCursorPos')
-   .should('be.greaterThan', 0);
+   .should('be.at.least', 0);
 
var key = '';
if (direction === 'up') {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-08-11 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/common/helper.js  |   16 
++
 cypress_test/integration_tests/desktop/writer/form_field_spec.js |4 --
 2 files changed, 16 insertions(+), 4 deletions(-)

New commits:
commit 8aab73a4e21caebbda514cbaaa176249c0784fc7
Author: Tamás Zolnai 
AuthorDate: Mon Aug 10 16:25:56 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Tue Aug 11 12:09:14 2020 +0200

cypress: wait for the sidebar after load in dekstop tests.

The sidebar is opened after the document is opened.
Opening the sidebar affects the whole layout, so better
to wait until it's finished before we start to interact
with the document.

Change-Id: I15537e8823d1c6c80fb586eb3560103b9173f37c
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100442
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/common/helper.js 
b/cypress_test/integration_tests/common/helper.js
index 5201f34fe..51abe98a6 100644
--- a/cypress_test/integration_tests/common/helper.js
+++ b/cypress_test/integration_tests/common/helper.js
@@ -56,6 +56,22 @@ function loadTestDoc(fileName, subFolder, noFileCopy) {
// Wait for the document to fully load
cy.get('.leaflet-tile-loaded', {timeout : 
Cypress.config('defaultCommandTimeout') * 2.0});
 
+   // Wait for the sidebar to open.
+   doIfOnDesktop(function() {
+   cy.get('#sidebar-panel')
+   .should('be.visible');
+
+   // Check that the document does not take the whole window width.
+   cy.window()
+   .then(function(win) {
+   cy.get('#document-container')
+   .should(function(doc) {
+   expect(doc).to.have.lengthOf(1);
+   
expect(doc[0].getBoundingClientRect().right).to.be.lessThan(win.innerWidth * 
0.95);
+   });
+   });
+   });
+
cy.log('Loading test document - end.');
 }
 
diff --git a/cypress_test/integration_tests/desktop/writer/form_field_spec.js 
b/cypress_test/integration_tests/desktop/writer/form_field_spec.js
index cd8dcb9e7..0f6c44390 100644
--- a/cypress_test/integration_tests/desktop/writer/form_field_spec.js
+++ b/cypress_test/integration_tests/desktop/writer/form_field_spec.js
@@ -9,10 +9,6 @@ describe('Form field button tests.', function() {
testFileName = fileName;
helper.beforeAll(fileName, 'writer');
 
-   // Wait for the sidebar to change the zoom level by load
-   cy.get('#tb_actionbar_item_zoom .w2ui-tb-caption')
-   .should('not.have.text', '100');
-
cy.get('#document-container')
.click();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-08-05 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/common/helper.js|   
57 ++
 cypress_test/integration_tests/desktop/calc/focus_spec.js  |   
 4 
 cypress_test/integration_tests/mobile/calc/focus_spec.js   |   
 2 
 cypress_test/integration_tests/multiuser/simultaneous_typing_user1_spec.js |   
10 -
 4 files changed, 63 insertions(+), 10 deletions(-)

New commits:
commit eb179113e5a8696a0fd900064f12774e4b8964a7
Author: Tamás Zolnai 
AuthorDate: Wed Aug 5 17:17:43 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Wed Aug 5 19:00:28 2020 +0200

cypress: introduce moveCursor() helper method.

Change-Id: I67a1e74fe03e464e71100428969f9458b8a018a2
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100179
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/common/helper.js 
b/cypress_test/integration_tests/common/helper.js
index 484b8cad0..bd2598a7a 100644
--- a/cypress_test/integration_tests/common/helper.js
+++ b/cypress_test/integration_tests/common/helper.js
@@ -411,6 +411,62 @@ function doIfOnDesktop(callback) {
});
 }
 
+function moveCursor(direction) {
+   cy.log('Moving text cursor - start.');
+   cy.log('Param - direction: ' + direction);
+
+   initAliasToNegative('origCursorPos');
+
+   cy.get('.blinking-cursor')
+   .should('be.visible');
+
+   if (direction === 'up' || direction === 'down') {
+   cy.get('.blinking-cursor')
+   .invoke('offset')
+   .its('top')
+   .as('origCursorPos');
+   } else if (direction === 'left' || direction === 'right') {
+   cy.get('.blinking-cursor')
+   .invoke('offset')
+   .its('left')
+   .as('origCursorPos');
+   }
+
+   cy.get('@origCursorPos')
+   .should('be.greaterThan', 0);
+
+   var key = '';
+   if (direction === 'up') {
+   key = '{uparrow}';
+   } else if (direction === 'down') {
+   key = '{downarrow}';
+   } else if (direction === 'left') {
+   key = '{leftarrow}';
+   } else if (direction === 'right') {
+   key = '{rightarrow}';
+   }
+   cy.get('textarea.clipboard')
+   .type(key);
+
+   cy.get('@origCursorPos')
+   .then(function(origCursorPos) {
+   cy.get('.blinking-cursor')
+   .should(function(cursor) {
+   if (direction === 'up') {
+   
expect(cursor.offset().top).to.be.lessThan(origCursorPos);
+   } else if (direction === 'down') {
+   
expect(cursor.offset().top).to.be.greaterThan(origCursorPos);
+   } else if (direction === 'left') {
+   
expect(cursor.offset().left).to.be.lessThan(origCursorPos);
+   } else if (direction === 'right') {
+   
expect(cursor.offset().left).to.be.greaterThan(origCursorPos);
+   }
+   });
+   });
+
+   cy.log('Moving text cursor - end.');
+}
+
 
 module.exports.loadTestDoc = loadTestDoc;
 module.exports.assertCursorAndFocus = assertCursorAndFocus;
@@ -435,3 +491,4 @@ module.exports.inputOnIdle = inputOnIdle;
 module.exports.waitUntilIdle = waitUntilIdle;
 module.exports.doIfOnMobile = doIfOnMobile;
 module.exports.doIfOnDesktop = doIfOnDesktop;
+module.exports.moveCursor = moveCursor;
diff --git a/cypress_test/integration_tests/desktop/calc/focus_spec.js 
b/cypress_test/integration_tests/desktop/calc/focus_spec.js
index 568e1fd11..2d9cd623b 100644
--- a/cypress_test/integration_tests/desktop/calc/focus_spec.js
+++ b/cypress_test/integration_tests/desktop/calc/focus_spec.js
@@ -61,10 +61,10 @@ describe('Calc focus tests', function() {
calcHelper.clickFormulaBar();
helper.assertCursorAndFocus();
 
-   // Move cursor before text2
+   // Move cursor inside text2
cy.get('textarea.clipboard').type('{end}');
for (var i = 0; i < 6; i++)
-   cy.get('textarea.clipboard').type('{leftarrow}');
+   helper.moveCursor('left');
 
var text3 = ' BAZINGA';
helper.typeText('textarea.clipboard', text3);
diff --git a/cypress_test/integration_tests/mobile/calc/focus_spec.js 
b/cypress_test/integration_tests/mobile/calc/focus_spec.js
index d12385daf..b9d4dd341 100644
--- a/cypress_test/integration_tests/mobile/calc/focus_spec.js
+++ 

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

2020-08-05 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/multiuser/simultaneous_typing_user1_spec.js |   
 3 +++
 1 file changed, 3 insertions(+)

New commits:
commit ef96bd89ab06782a922362f157116304b308a793
Author: Tamás Zolnai 
AuthorDate: Wed Aug 5 13:11:59 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Wed Aug 5 13:50:00 2020 +0200

cypress: stabilize simultaneous typing test.

Change-Id: I699e0b78583d41be273992fa4aa48b91da1a4e6c
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100166
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git 
a/cypress_test/integration_tests/multiuser/simultaneous_typing_user1_spec.js 
b/cypress_test/integration_tests/multiuser/simultaneous_typing_user1_spec.js
index e36c79bd1..14d277a3a 100644
--- a/cypress_test/integration_tests/multiuser/simultaneous_typing_user1_spec.js
+++ b/cypress_test/integration_tests/multiuser/simultaneous_typing_user1_spec.js
@@ -38,6 +38,9 @@ describe('Simultaneous typing: user-1.', function() {
cy.get('textarea.clipboard')
.type('{uparrow}');
 
+   // TODO
+   cy.wait(1000);
+
cy.get('#tb_editbar_item_centerpara .w2ui-button')
.click();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-08-04 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/common/helper.js|   
33 +-
 cypress_test/integration_tests/multiuser/paragraph_prop_user2_spec.js  |   
 2 
 cypress_test/integration_tests/multiuser/sheet_operations_user2_spec.js|   
 2 
 cypress_test/integration_tests/multiuser/sidebar_visibility_user2_spec.js  |   
 2 
 cypress_test/integration_tests/multiuser/simultaneous_typing_user2_spec.js |   
 2 
 cypress_test/integration_tests/multiuser/slide_operations_user2_spec.js|   
 2 
 6 files changed, 23 insertions(+), 20 deletions(-)

New commits:
commit f657321d2b5a8a3bdfc0af842aacbd609511f68e
Author: Tamás Zolnai 
AuthorDate: Tue Aug 4 17:40:28 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Tue Aug 4 19:04:56 2020 +0200

cypress: don't copy the test file by the second user.

We use file copying to create a clean test document
in the working directory. We don't need to do this twice,
the first user will do it first, then the second user
will open the same document.

Change-Id: Ide01b162b0c6a2b3a694706848c3ce93758f3f22
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100125
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/common/helper.js 
b/cypress_test/integration_tests/common/helper.js
index d7dc0862d..d35637a16 100644
--- a/cypress_test/integration_tests/common/helper.js
+++ b/cypress_test/integration_tests/common/helper.js
@@ -2,24 +2,27 @@
 
 require('cypress-wait-until');
 
-function loadTestDoc(fileName, subFolder) {
+function loadTestDoc(fileName, subFolder, noFileCopy) {
cy.log('Loading test document - start.');
cy.log('Param - fileName: ' + fileName);
cy.log('Param - subFolder: ' + subFolder);
+   cy.log('Param - noFileCopy: ' + noFileCopy);
 
// Get a clean test document
-   if (subFolder === undefined) {
-   cy.task('copyFile', {
-   sourceDir: Cypress.env('DATA_FOLDER'),
-   destDir: Cypress.env('WORKDIR'),
-   fileName: fileName,
-   });
-   } else {
-   cy.task('copyFile', {
-   sourceDir: Cypress.env('DATA_FOLDER') + subFolder + '/',
-   destDir: Cypress.env('WORKDIR') + subFolder + '/',
-   fileName: fileName,
-   });
+   if (noFileCopy !== true) {
+   if (subFolder === undefined) {
+   cy.task('copyFile', {
+   sourceDir: Cypress.env('DATA_FOLDER'),
+   destDir: Cypress.env('WORKDIR'),
+   fileName: fileName,
+   });
+   } else {
+   cy.task('copyFile', {
+   sourceDir: Cypress.env('DATA_FOLDER') + 
subFolder + '/',
+   destDir: Cypress.env('WORKDIR') + subFolder + 
'/',
+   fileName: fileName,
+   });
+   }
}
 
doIfOnMobile(function() {
@@ -156,8 +159,8 @@ function matchClipboardText(regexp) {
});
 }
 
-function beforeAll(fileName, subFolder) {
-   loadTestDoc(fileName, subFolder);
+function beforeAll(fileName, subFolder, noFileCop) {
+   loadTestDoc(fileName, subFolder, noFileCop);
 }
 
 function afterAll(fileName) {
diff --git 
a/cypress_test/integration_tests/multiuser/paragraph_prop_user2_spec.js 
b/cypress_test/integration_tests/multiuser/paragraph_prop_user2_spec.js
index 05cf43b65..0f2b05198 100644
--- a/cypress_test/integration_tests/multiuser/paragraph_prop_user2_spec.js
+++ b/cypress_test/integration_tests/multiuser/paragraph_prop_user2_spec.js
@@ -9,7 +9,7 @@ describe('Change paragraph properties: user-2.', function() {
// Wait here, before loading the document.
// Opening two clients at the same time causes an issue.
cy.wait(5000);
-   helper.beforeAll(testFileName);
+   helper.beforeAll(testFileName, undefined, true);
});
 
afterEach(function() {
diff --git 
a/cypress_test/integration_tests/multiuser/sheet_operations_user2_spec.js 
b/cypress_test/integration_tests/multiuser/sheet_operations_user2_spec.js
index 10f032d50..266a34965 100644
--- a/cypress_test/integration_tests/multiuser/sheet_operations_user2_spec.js
+++ b/cypress_test/integration_tests/multiuser/sheet_operations_user2_spec.js
@@ -9,7 +9,7 @@ describe('Sheet operations: user-2.', function() {
// Wait here, before loading the document.
// Opening two clients at the same time causes an issue.
cy.wait(5000);
-   helper.beforeAll(testFileName);
+   helper.beforeAll(testFileName, undefined, true);
});
 
afterEach(function() {
diff --git 

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

2020-08-04 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/common/helper.js |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 387d2a10b2bff325dfc307214d12a7049f33f42d
Author: Tamás Zolnai 
AuthorDate: Tue Aug 4 11:28:56 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Tue Aug 4 11:59:55 2020 +0200

cypress: wait more time for closing the document.

Change-Id: Icbfef53b630e2a0317e346f40f47f88b694fb909
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100049
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/common/helper.js 
b/cypress_test/integration_tests/common/helper.js
index 7995e7bbb..d7dc0862d 100644
--- a/cypress_test/integration_tests/common/helper.js
+++ b/cypress_test/integration_tests/common/helper.js
@@ -177,7 +177,7 @@ function afterAll(fileName) {
// also on the PID number we can make sure to match on the
// whole file name, not on a suffix of a file name.
var regex = new RegExp('[0-9]' + fileName);
-   cy.get('#docview')
+   cy.get('#docview', { timeout: Cypress.config('defaultCommandTimeout') * 
2.0 })
.invoke('text')
.should('not.match', regex);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-08-03 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/common/mobile_helper.js |   10 
++
 cypress_test/integration_tests/mobile/calc/apply_font_spec.js  |8 -
 cypress_test/integration_tests/mobile/calc/hamburger_menu_spec.js  |7 -
 cypress_test/integration_tests/mobile/impress/apply_font_shape_spec.js |   41 
+++---
 cypress_test/integration_tests/mobile/impress/apply_font_text_spec.js  |   37 
+++--
 cypress_test/integration_tests/mobile/impress/hamburger_menu_spec.js   |7 -
 6 files changed, 43 insertions(+), 67 deletions(-)

New commits:
commit 1d39969a9ae9fa2b1b38c3a805d4a2b2f830bfe1
Author: Tamás Zolnai 
AuthorDate: Mon Aug 3 06:24:11 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Mon Aug 3 13:58:24 2020 +0200

cypress: extract openTextPropertiesPanel() method.

Change-Id: I14f424d3141d596f982cda349df786dd8940b6c1
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/99977
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/common/mobile_helper.js 
b/cypress_test/integration_tests/common/mobile_helper.js
index 8aaa1f8af..9875b29d9 100644
--- a/cypress_test/integration_tests/common/mobile_helper.js
+++ b/cypress_test/integration_tests/common/mobile_helper.js
@@ -203,6 +203,15 @@ function selectFromColorPalette(paletteNum, groupNum, 
colorNum) {
cy.log('Selecting a color from the color palette - end.');
 }
 
+function openTextPropertiesPanel() {
+   openMobileWizard();
+
+   helper.clickOnIdle('#TextPropertyPanel');
+
+   cy.get('#Bold')
+   .should('be.visible');
+}
+
 module.exports.enableEditingMobile = enableEditingMobile;
 module.exports.longPressOnDocument = longPressOnDocument;
 module.exports.openHamburgerMenu = openHamburgerMenu;
@@ -213,3 +222,4 @@ module.exports.executeCopyFromContextMenu = 
executeCopyFromContextMenu;
 module.exports.openInsertionWizard = openInsertionWizard;
 module.exports.closeInsertionWizard = closeInsertionWizard;
 module.exports.selectFromColorPalette = selectFromColorPalette;
+module.exports.openTextPropertiesPanel = openTextPropertiesPanel;
diff --git a/cypress_test/integration_tests/mobile/calc/apply_font_spec.js 
b/cypress_test/integration_tests/mobile/calc/apply_font_spec.js
index 3dca28d9c..c04b45370 100644
--- a/cypress_test/integration_tests/mobile/calc/apply_font_spec.js
+++ b/cypress_test/integration_tests/mobile/calc/apply_font_spec.js
@@ -19,14 +19,8 @@ describe('Apply font changes.', function() {
cy.get('.leaflet-marker-icon')
.should('be.visible');
 
-   // Open mobile wizard
-   mobileHelper.openMobileWizard();
-
// Open character properties
-   helper.clickOnIdle('#TextPropertyPanel');
-
-   cy.get('#Bold')
-   .should('be.visible');
+   mobileHelper.openTextPropertiesPanel();
});
 
afterEach(function() {
diff --git a/cypress_test/integration_tests/mobile/calc/hamburger_menu_spec.js 
b/cypress_test/integration_tests/mobile/calc/hamburger_menu_spec.js
index 298d520d7..7b71b3c16 100644
--- a/cypress_test/integration_tests/mobile/calc/hamburger_menu_spec.js
+++ b/cypress_test/integration_tests/mobile/calc/hamburger_menu_spec.js
@@ -875,12 +875,7 @@ describe('Trigger hamburger menu options.', function() {
 
mobileHelper.closeMobileWizard();
 
-   mobileHelper.openMobileWizard();
-
-   helper.clickOnIdle('#TextPropertyPanel');
-
-   cy.get('#Bold')
-   .should('be.visible');
+   mobileHelper.openTextPropertiesPanel();
 
helper.clickOnIdle('#Color');
 
diff --git 
a/cypress_test/integration_tests/mobile/impress/apply_font_shape_spec.js 
b/cypress_test/integration_tests/mobile/impress/apply_font_shape_spec.js
index f75166055..e7a235586 100644
--- a/cypress_test/integration_tests/mobile/impress/apply_font_shape_spec.js
+++ b/cypress_test/integration_tests/mobile/impress/apply_font_shape_spec.js
@@ -24,17 +24,8 @@ describe('Apply font on selected shape.', function() {
impressMobileHelper.triggerNewSVGForShapeInTheCenter();
}
 
-   function openTextPropertiesPanel() {
-   mobileHelper.openMobileWizard();
-
-   helper.clickOnIdle('#TextPropertyPanel');
-
-   cy.get('.ui-content.level-0.mobile-wizard')
-   .should('be.visible');
-   }
-
it('Apply bold on text shape.', function() {
-   openTextPropertiesPanel();
+   mobileHelper.openTextPropertiesPanel();
 
helper.clickOnIdle('#Bold');
 
@@ -45,7 +36,7 @@ describe('Apply font on selected shape.', function() {
});
 
it('Apply italic on text shape.', function() {
-   openTextPropertiesPanel();
+   

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

2020-07-31 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/common/helper.js
   |   35 +++---
 cypress_test/integration_tests/common/mobile_helper.js 
   |5 -
 cypress_test/integration_tests/desktop/calc/bottom_bar_spec.js 
   |2 
 cypress_test/integration_tests/desktop/calc/focus_spec.js  
   |2 
 cypress_test/integration_tests/desktop/impress/slide_operations_spec.js
   |2 
 cypress_test/integration_tests/desktop/writer/copy_paste_spec.js   
   |2 
 cypress_test/integration_tests/desktop/writer/form_field_spec.js   
   |2 
 cypress_test/integration_tests/desktop/writer/shape_operations_spec.js 
   |2 
 cypress_test/integration_tests/mobile/calc/alignment_options_spec.js   
   |2 
 cypress_test/integration_tests/mobile/calc/apply_font_spec.js  
   |2 
 cypress_test/integration_tests/mobile/calc/bottom_toolbar_spec.js  
   |2 
 cypress_test/integration_tests/mobile/calc/cell_appearance_spec.js 
   |2 
 cypress_test/integration_tests/mobile/calc/focus_spec.js   
   |2 
 cypress_test/integration_tests/mobile/calc/hamburger_menu_spec.js  
   |2 
 cypress_test/integration_tests/mobile/calc/insertion_wizard_spec.js
   |2 
 cypress_test/integration_tests/mobile/calc/number_format_spec.js   
   |2 
 cypress_test/integration_tests/mobile/calc/spellchecking_spec.js   
   |2 
 cypress_test/integration_tests/mobile/impress/apply_font_shape_spec.js 
   |2 
 cypress_test/integration_tests/mobile/impress/apply_font_text_spec.js  
   |2 
 
cypress_test/integration_tests/mobile/impress/apply_paragraph_props_shape_spec.js
 |2 
 
cypress_test/integration_tests/mobile/impress/apply_paragraph_props_text_spec.js
  |2 
 cypress_test/integration_tests/mobile/impress/hamburger_menu_spec.js   
   |2 
 cypress_test/integration_tests/mobile/impress/impress_focus_spec.js
   |2 
 cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js 
   |2 
 cypress_test/integration_tests/mobile/impress/slide_properties_spec.js 
   |2 
 cypress_test/integration_tests/mobile/impress/spellchecking_spec.js
   |2 
 cypress_test/integration_tests/mobile/writer/apply_font_spec.js
   |2 
 
cypress_test/integration_tests/mobile/writer/apply_paragraph_properties_spec.js 
  |2 
 cypress_test/integration_tests/mobile/writer/bottom_toolbar_spec.js
   |2 
 cypress_test/integration_tests/mobile/writer/focus_spec.js 
   |2 
 cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js
   |2 
 cypress_test/integration_tests/mobile/writer/insert_field_spec.js  
   |2 
 cypress_test/integration_tests/mobile/writer/insert_formatting_mark_spec.js
   |2 
 cypress_test/integration_tests/mobile/writer/insert_object_spec.js 
   |2 
 cypress_test/integration_tests/mobile/writer/mobile_wizard_state_spec.js   
   |2 
 cypress_test/integration_tests/mobile/writer/shape_properties_spec.js  
   |2 
 cypress_test/integration_tests/mobile/writer/spellchecking_spec.js 
   |2 
 cypress_test/integration_tests/mobile/writer/table_properties_spec.js  
   |2 
 cypress_test/integration_tests/mobile/writer/toolbar_spec.js   
   |2 
 cypress_test/integration_tests/multiuser/paragraph_prop_user1_spec.js  
   |2 
 cypress_test/integration_tests/multiuser/paragraph_prop_user2_spec.js  
   |2 
 cypress_test/integration_tests/multiuser/sidebar_visibility_user1_spec.js  
   |2 
 cypress_test/integration_tests/multiuser/sidebar_visibility_user2_spec.js  
   |2 
 cypress_test/integration_tests/multiuser/simultaneous_typing_user1_spec.js 
   |2 
 cypress_test/integration_tests/multiuser/simultaneous_typing_user2_spec.js 
   |2 
 45 files changed, 70 insertions(+), 56 deletions(-)

New commits:
commit 210118a40a350b5085fb1ac23ab04f0a2f478cde
Author: Tamás Zolnai 
AuthorDate: Fri Jul 31 15:44:39 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Fri Jul 31 19:06:31 2020 +0200

cypress: simplify beforeAll() methods.

We don't need an explicit parameter indicating the platform
type (e.g. mobile, desktop). We can check the userAgent to
get that information.

Change-Id: Ibbc041c4a389cff92203d245f55268ec4e93b0a0
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/99889
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/common/helper.js 
b/cypress_test/integration_tests/common/helper.js
index a547eaf6a..7995e7bbb 100644
--- 

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

2020-07-31 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/common/helper.js   |3 +++
 cypress_test/integration_tests/mobile/calc/bottom_toolbar_spec.js |2 ++
 2 files changed, 5 insertions(+)

New commits:
commit f05e53af0768e0530db1801788b70664c5ccc3de
Author: Tamás Zolnai 
AuthorDate: Fri Jul 31 15:30:37 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Fri Jul 31 19:06:09 2020 +0200

cypress: fix calc's bottom toolbar test.

Fix 'detached from DOM' error. In Calc we have a small
flickering of the bottom toolbar, because we have also
the formula bar appearing after editing is enabled.

Change-Id: If642d6ae0aae0fcc761382567a2d2e37ad3bf486
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/99888
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/common/helper.js 
b/cypress_test/integration_tests/common/helper.js
index 675391ea9..a547eaf6a 100644
--- a/cypress_test/integration_tests/common/helper.js
+++ b/cypress_test/integration_tests/common/helper.js
@@ -300,6 +300,9 @@ function imageShouldBeFullWhiteOrNot(selector, fullWhite = 
true) {
 
 function waitUntilIdle(selector, content, waitingTime = 1000) {
cy.log('Waiting item to be idle - start.');
+   cy.log('Param - selector: ' + selector);
+   cy.log('Param - content: ' + content);
+   cy.log('Param - waitingTime: ' + waitingTime);
 
var item;
var waitOnce = 250;
diff --git a/cypress_test/integration_tests/mobile/calc/bottom_toolbar_spec.js 
b/cypress_test/integration_tests/mobile/calc/bottom_toolbar_spec.js
index e62a05501..68a4ae835 100644
--- a/cypress_test/integration_tests/mobile/calc/bottom_toolbar_spec.js
+++ b/cypress_test/integration_tests/mobile/calc/bottom_toolbar_spec.js
@@ -15,6 +15,8 @@ describe('Interact with bottom toolbar.', function() {
// Click on edit button
mobileHelper.enableEditingMobile();
 
+   helper.waitUntilIdle('#toolbar-down');
+
calcHelper.clickOnFirstCell();
}
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: cypress_test/integration_tests cypress_test/Makefile.am

2020-07-31 Thread Tamás Zolnai (via logerrit)
 cypress_test/Makefile.am  |
1 
 cypress_test/integration_tests/multiuser/sidebar_visibility_user2_spec.js |   
11 +-
 2 files changed, 3 insertions(+), 9 deletions(-)

New commits:
commit 1604fa99f852767ade64bcdea34b34aeae2ad470
Author: Tamás Zolnai 
AuthorDate: Thu Jul 30 12:01:00 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Fri Jul 31 12:51:22 2020 +0200

cypress: update sidebar visibility test.

Test less which might make this test more stable.

Change-Id: Icf11af96bc5d21a14f0a74a641ffed3f91b6e482
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/99783
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/Makefile.am b/cypress_test/Makefile.am
index 1908215b0..9d30d655d 100644
--- a/cypress_test/Makefile.am
+++ b/cypress_test/Makefile.am
@@ -64,6 +64,7 @@ DEKSTOP_TEST_FILES=$(subst 
$(DESKTOP_TEST_FOLDER)/,,$(wildcard $(DESKTOP_TEST_FO
 
 MULTIUSER_TESTS= \
paragraph_prop \
+   sidebar_visibility \
simultaneous_typing
 
 MOBILE_TEST_FILES_DONE= \
diff --git 
a/cypress_test/integration_tests/multiuser/sidebar_visibility_user2_spec.js 
b/cypress_test/integration_tests/multiuser/sidebar_visibility_user2_spec.js
index 4d28c0aa6..d98608769 100644
--- a/cypress_test/integration_tests/multiuser/sidebar_visibility_user2_spec.js
+++ b/cypress_test/integration_tests/multiuser/sidebar_visibility_user2_spec.js
@@ -1,7 +1,6 @@
 /* global describe it cy beforeEach require afterEach */
 
 var helper = require('../common/helper');
-var desktopHelper = require('../common/desktop_helper');
 
 describe('Sidebar visibility: user-2.', function() {
var testFileName = 'sidebar_visibility.odt';
@@ -38,9 +37,6 @@ describe('Sidebar visibility: user-2.', function() {
cy.get('#sidebar-panel')
.should('be.visible');
 
-   // Hide sidebar
-   desktopHelper.hideSidebar();
-
// Change paragraph alignment to trigger user-1 actions
cy.get('#tb_editbar_item_rightpara .w2ui-button')
.click();
@@ -49,12 +45,9 @@ describe('Sidebar visibility: user-2.', function() {
cy.get('#tb_editbar_item_justifypara .w2ui-button')
.should('have.class', 'checked');
 
-   // sidebar should be still invisible (user-1 showed his own 
sidebar)
+   // sidebar should be still visible
cy.get('#sidebar-panel')
-   .should('not.be.visible');
-
-   // Show sidebar again
-   desktopHelper.showSidebar();
+   .should('be.visible');
 
// Change paragraph alignment to trigger user-1 actions
cy.get('#tb_editbar_item_leftpara .w2ui-button')
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-07-26 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/multiuser/userlist_user1_spec.js |   17 
+++---
 cypress_test/integration_tests/multiuser/userlist_user2_spec.js |6 +--
 2 files changed, 9 insertions(+), 14 deletions(-)

New commits:
commit 735a5a7f8b9e459cbd1f35b2b39a146d5378e8e5
Author: Tamás Zolnai 
AuthorDate: Fri Jul 24 15:31:50 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Sun Jul 26 15:09:17 2020 +0200

cypress: make multi-user test case more stable.

Adding a comment was not stable. Let's just change
some paragraph properties to check multi-user interaction.

Change-Id: If923312de2c85b8897bc7a0af1f8e3f560576cc0
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/99376
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/multiuser/userlist_user1_spec.js 
b/cypress_test/integration_tests/multiuser/userlist_user1_spec.js
index c40f4af9b..93f323b96 100644
--- a/cypress_test/integration_tests/multiuser/userlist_user1_spec.js
+++ b/cypress_test/integration_tests/multiuser/userlist_user1_spec.js
@@ -22,20 +22,15 @@ describe('Check user list with user-1.', function() {
cy.get('#tb_actionbar_item_userlist .w2ui-tb-caption')
.should('have.text', '2 users');
 
-   // Leave a comment for user-2, that we finished
-   cy.get('#menu-insert')
-   .click();
+   // Change the paragraph alignment
+   cy.get('#tb_editbar_item_leftpara .w2ui-button')
+   .should('have.class', 'checked');
 
-   cy.get('#menu-insertcomment')
+   cy.get('#tb_editbar_item_centerpara .w2ui-button')
.click();
 
-   cy.get('.loleaflet-annotation-edit:nth-of-type(2) 
.loleaflet-annotation-textarea')
-   .type('Done');
-
-   helper.waitUntilIdle('#annotation-save');
-
-   cy.get('#annotation-save')
-   .click({force: true});
+   cy.get('#tb_editbar_item_centerpara .w2ui-button')
+   .should('have.class', 'checked');
});
 
 });
diff --git a/cypress_test/integration_tests/multiuser/userlist_user2_spec.js 
b/cypress_test/integration_tests/multiuser/userlist_user2_spec.js
index 9a8de655e..7b7b9fa5e 100644
--- a/cypress_test/integration_tests/multiuser/userlist_user2_spec.js
+++ b/cypress_test/integration_tests/multiuser/userlist_user2_spec.js
@@ -25,8 +25,8 @@ describe('Check user list with user-2.', function() {
cy.get('#tb_actionbar_item_userlist .w2ui-tb-caption')
.should('have.text', '2 users');
 
-   // user-1 adds a comment, so we can close this view
-   cy.get('.loleaflet-annotation-content-wrapper')
-   .should('exist');
+   // user-1 changes the paragraph alignment
+   cy.get('#tb_editbar_item_centerpara .w2ui-button')
+   .should('have.class', 'checked');
});
 });
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: cypress_test/integration_tests cypress_test/Makefile.am cypress_test/plugins

2020-07-24 Thread Tamás Zolnai (via logerrit)
 cypress_test/Makefile.am|6 --
 cypress_test/integration_tests/common/helper.js |4 ++--
 cypress_test/plugins/index.js   |4 ++--
 3 files changed, 8 insertions(+), 6 deletions(-)

New commits:
commit 5b70bcd4d32444b0635f013a962d5723b4121965
Author: Tamás Zolnai 
AuthorDate: Fri Jul 24 14:56:55 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Fri Jul 24 15:30:29 2020 +0200

cypress: avoid spaces in core version string.

It causes issues when passing this string as a
command line argument.

Change-Id: I9af569c8ab941f392800c3c678085c384bec2908
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/99374
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/Makefile.am b/cypress_test/Makefile.am
index 39145115b..c0dab338b 100644
--- a/cypress_test/Makefile.am
+++ b/cypress_test/Makefile.am
@@ -39,9 +39,11 @@ DISPLAY_NUMBER = 100
 HEADLESS_BUILD := $(findstring Command failed,$(shell xhost > /dev/null 2>&1 
|| echo "Command failed, so we are in a headless environment."))
 export DISPLAY=$(if $(HEADLESS_BUILD),:$(DISPLAY_NUMBER),$(shell echo 
$$DISPLAY))
 
-CORE_VERSION := $(shell "@LO_PATH@"/program/soffice.bin --version 2> /dev/null)
-
 COMMA :=,
+EMPTY :=
+SPACE :=$(EMPTY) $(EMPTY)
+
+CORE_VERSION := $(subst $(SPACE),_,$(shell "@LO_PATH@"/program/soffice.bin 
--version 2> /dev/null))
 
 if ENABLE_DEBUG
 FILTER_DEBUG=cypress:electron,cypress:launcher
diff --git a/cypress_test/integration_tests/common/helper.js 
b/cypress_test/integration_tests/common/helper.js
index 2452e5956..d206d63a8 100644
--- a/cypress_test/integration_tests/common/helper.js
+++ b/cypress_test/integration_tests/common/helper.js
@@ -260,9 +260,9 @@ function typeText(selector, text, delayMs=0) {
 function getLOVersion() {
var versionString = Cypress.env('LO_CORE_VERSION');
if (versionString.includes('Collabora')) {
-   if (versionString.includes(' 6.2.')) {
+   if (versionString.includes('_6.2.')) {
return 'cp-6-2';
-   } else if (versionString.includes(' 6.4.')) {
+   } else if (versionString.includes('_6.4.')) {
return 'cp-6-4';
}
}
diff --git a/cypress_test/plugins/index.js b/cypress_test/plugins/index.js
index a6b1771cb..b15e876c6 100644
--- a/cypress_test/plugins/index.js
+++ b/cypress_test/plugins/index.js
@@ -41,9 +41,9 @@ function plugin(on, config) {
 function getLOVersion(config) {
var versionString = config.env.LO_CORE_VERSION;
if (versionString.includes('Collabora')) {
-   if (versionString.includes(' 6.2.')) {
+   if (versionString.includes('_6.2.')) {
return 'cp-6-2';
-   } else if (versionString.includes(' 6.4.')) {
+   } else if (versionString.includes('_6.4.')) {
return 'cp-6-4';
}
}
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-07-16 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js |4 
++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 28ec6eda334d0d263ddbca130e57637f024ddf49
Author: Tamás Zolnai 
AuthorDate: Thu Jul 16 14:02:35 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Thu Jul 16 14:15:33 2020 +0200

cypress: fix date field insertion tests in impress.

Change-Id: I9fd03b2b1a4027640750bdeecab45101ce3ece4f
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98903
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai 

diff --git 
a/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js 
b/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js
index 2627c4642..ae3a928d9 100644
--- a/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js
+++ b/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js
@@ -221,7 +221,7 @@ describe('Impress insertion wizard.', function() {
.click();
 
// Check that the shape is there
-   selectionShouldBeTextShape();
+   selectionShouldBeTextShape(false);
 
// Check the text
impressMobileHelper.selectTextOfShape();
@@ -241,7 +241,7 @@ describe('Impress insertion wizard.', function() {
.click();
 
// Check that the shape is there
-   selectionShouldBeTextShape();
+   selectionShouldBeTextShape(false);
 
// Check the text
impressMobileHelper.selectTextOfShape();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-07-15 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/common/helper.js |   31 +---
 1 file changed, 17 insertions(+), 14 deletions(-)

New commits:
commit 3cefcd26654ccf7a24b5d5983ee842faa9b79b26
Author: Tamás Zolnai 
AuthorDate: Tue Jul 14 15:25:19 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Wed Jul 15 15:48:26 2020 +0200

cypress: improve waitUntilIdle() method.

Use smaller time intervals to check how long the item is
idle. Use a smaller (e.g. 1000) time for making a decision
about the item's idle state to make tests faster.
We can increase this time for those use cases where this
time is not enough.

Change-Id: Ibf03197c7bccc3cd718b67b73d52d9b9b54e875e
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98733
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/common/helper.js 
b/cypress_test/integration_tests/common/helper.js
index 1578b70d6..c31ebd64a 100644
--- a/cypress_test/integration_tests/common/helper.js
+++ b/cypress_test/integration_tests/common/helper.js
@@ -298,11 +298,12 @@ function imageShouldBeFullWhiteOrNot(selector, fullWhite 
= true) {
});
 }
 
-function waitUntilIdle(selector, content) {
+function waitUntilIdle(selector, content, waitingTime = 1000) {
cy.log('Waiting item to be idle - start.');
 
var item;
-   var waitingTime = 2000;
+   var waitOnce = 250;
+   var idleSince = 0;
if (content) {
cy.contains(selector, content, { log: false })
.then(function(itemToIdle) {
@@ -310,17 +311,18 @@ function waitUntilIdle(selector, content) {
});
 
cy.waitUntil(function() {
-   cy.wait(waitingTime);
+   cy.wait(waitOnce, { log: false });
 
return cy.contains(selector, content, { log: false })
.then(function(itemToIdle) {
if (Cypress.dom.isDetached(item[0])) {
-   cy.log('Item is detached.');
+   cy.log('Item is detached after 
' + (idleSince + waitOnce).toString() + ' ms.');
item = itemToIdle;
-   return false;
+   idleSince = 0;
} else {
-   return true;
+   idleSince += waitOnce;
}
+   return idleSince > waitingTime;
});
});
} else {
@@ -330,17 +332,18 @@ function waitUntilIdle(selector, content) {
});
 
cy.waitUntil(function() {
-   cy.wait(waitingTime);
+   cy.wait(waitOnce, { log: false });
 
return cy.get(selector, { log: false })
.then(function(itemToIdle) {
if (Cypress.dom.isDetached(item[0])) {
-   cy.log('Item is detached.');
+   cy.log('Item is detached after 
' + (idleSince + waitOnce).toString() + ' ms.');
item = itemToIdle;
-   return false;
+   idleSince = 0;
} else {
-   return true;
+   idleSince += waitOnce;
}
+   return idleSince > waitingTime;
});
});
}
@@ -357,10 +360,10 @@ function waitUntilIdle(selector, content) {
 // IMPORTANT: don't use this if there is no
 // flickering. Use simple click() instead. This method
 // is much slower.
-function clickOnIdle(selector, content) {
+function clickOnIdle(selector, content, waitingTime = 1000) {
cy.log('Clicking on item when idle - start.');
 
-   waitUntilIdle(selector, content);
+   waitUntilIdle(selector, content, waitingTime);
if (content) {
cy.contains(selector, content)
.click();
@@ -373,10 +376,10 @@ function clickOnIdle(selector, content) {
 }
 
 // See comments at clickOnIdle() method.
-function inputOnIdle(selector, input) {
+function inputOnIdle(selector, input, waitingTime = 1000) {
cy.log('Type into an input item when idle - start.');
 
-   waitUntilIdle(selector);
+   waitUntilIdle(selector, undefined, 

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

2020-07-14 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/writer/shape_properties_spec.js |   50 
--
 1 file changed, 22 insertions(+), 28 deletions(-)

New commits:
commit af091dbb1add066d21485b6f134721a90716dfb5
Author: Tamás Zolnai 
AuthorDate: Tue Jul 14 15:16:18 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Tue Jul 14 15:46:44 2020 +0200

Revert "cypress: update writer shape related tests."

This reverts commit f3572dc98828b1c5d617f3b503e76c7448fa5439.

Change-Id: I2b12aaa4c4ace0119be98e6d46ce95fdd1ac0f73
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98732
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git 
a/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js 
b/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js
index e9c2aeede..01dcd3c71 100644
--- a/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js
@@ -43,32 +43,15 @@ describe('Change shape properties via mobile wizard.', 
function() {
function triggerNewSVG() {
mobileHelper.closeMobileWizard();
 
-   // Remove selection first with clicking next to handler
-   cy.get('.leaflet-drag-transform-marker.drag-marker--0')
-   .then(function(items) {
-   var XPos = 
items[0].getBoundingClientRect().left;
-   var YPos = items[0].getBoundingClientRect().top;
-   // Sometimes selection is persistent, so click 
more times
-   // to achive actual deselection.
-   cy.get('body')
-   .click(XPos - 10, YPos);
-
-   cy.get('body')
-   .dblclick(XPos - 10, YPos);
-
-   cy.get('.leaflet-drag-transform-marker')
-   .should('not.exist');
-
-   // Reselect the shape
-   cy.get('body')
-   .click(XPos + 20, YPos);
-
-   cy.get('body')
-   .click(XPos + 20, YPos);
-
-   cy.get('.leaflet-drag-transform-marker')
-   .should('exist');
-   });
+   // Change width
+   openPosSizePanel();
+
+   cy.get('#selectwidth .plus')
+   .should('be.visible');
+
+   helper.clickOnIdle('#selectwidth .plus');
+
+   mobileHelper.closeMobileWizard();
}
 
function openPosSizePanel() {
@@ -99,6 +82,7 @@ describe('Change shape properties via mobile wizard.', 
function() {
});
 
it('Change shape width.', function() {
+
openPosSizePanel();
 
cy.get('#selectwidth .spinfield')
@@ -114,6 +98,7 @@ describe('Change shape properties via mobile wizard.', 
function() {
});
 
it('Change shape height.', function() {
+
openPosSizePanel();
 
cy.get('#selectheight .spinfield')
@@ -170,7 +155,7 @@ describe('Change shape properties via mobile wizard.', 
function() {
.should('not.have.attr', 'd', defaultGeometry);
 
cy.get('.leaflet-pane.leaflet-overlay-pane svg g svg g g g 
path')
-   .should('have.attr', 'd', 'M 7955,4863 L 1963,10855 
7955,10855 7955,4863 7955,4863 Z');
+   .should('have.attr', 'd', 'M 8010,4863 L 1963,10855 
8010,10855 8010,4863 8010,4863 Z');
});
 
it('Trigger moving backward / forward', function() {
@@ -217,7 +202,7 @@ describe('Change shape properties via mobile wizard.', 
function() {
.should('have.length.greaterThan', 12);
});
 
-   it('Change line width', function() {
+   it.skip('Change line width', function() {
openLinePropertyPanel();
 
cy.get('#linewidth .spinfield')
@@ -229,6 +214,15 @@ describe('Change shape properties via mobile wizard.', 
function() {
 
cy.get('.leaflet-pane.leaflet-overlay-pane svg g svg g g g 
path[fill="none"]')
.should('have.attr', 'stroke-width', '141');
+
+   openLinePropertyPanel();
+
+   helper.clickOnIdle('#linewidth .minus');
+
+   triggerNewSVG();
+
+   cy.get('.leaflet-pane.leaflet-overlay-pane svg g svg g g g 
path[fill="none"]')
+   .should('have.attr', 'stroke-width', '88');
});
 
it('Change line transparency', function() {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org

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

2020-07-13 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/writer/shape_properties_spec.js |   50 
+-
 1 file changed, 28 insertions(+), 22 deletions(-)

New commits:
commit f3572dc98828b1c5d617f3b503e76c7448fa5439
Author: Tamás Zolnai 
AuthorDate: Mon Jul 13 13:32:04 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Mon Jul 13 21:18:56 2020 +0200

cypress: update writer shape related tests.

Change-Id: I9be13d65d054320e473a9060ab4353bd08b476fb
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98671
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git 
a/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js 
b/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js
index 01dcd3c71..e9c2aeede 100644
--- a/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js
@@ -43,15 +43,32 @@ describe('Change shape properties via mobile wizard.', 
function() {
function triggerNewSVG() {
mobileHelper.closeMobileWizard();
 
-   // Change width
-   openPosSizePanel();
-
-   cy.get('#selectwidth .plus')
-   .should('be.visible');
-
-   helper.clickOnIdle('#selectwidth .plus');
-
-   mobileHelper.closeMobileWizard();
+   // Remove selection first with clicking next to handler
+   cy.get('.leaflet-drag-transform-marker.drag-marker--0')
+   .then(function(items) {
+   var XPos = 
items[0].getBoundingClientRect().left;
+   var YPos = items[0].getBoundingClientRect().top;
+   // Sometimes selection is persistent, so click 
more times
+   // to achive actual deselection.
+   cy.get('body')
+   .click(XPos - 10, YPos);
+
+   cy.get('body')
+   .dblclick(XPos - 10, YPos);
+
+   cy.get('.leaflet-drag-transform-marker')
+   .should('not.exist');
+
+   // Reselect the shape
+   cy.get('body')
+   .click(XPos + 20, YPos);
+
+   cy.get('body')
+   .click(XPos + 20, YPos);
+
+   cy.get('.leaflet-drag-transform-marker')
+   .should('exist');
+   });
}
 
function openPosSizePanel() {
@@ -82,7 +99,6 @@ describe('Change shape properties via mobile wizard.', 
function() {
});
 
it('Change shape width.', function() {
-
openPosSizePanel();
 
cy.get('#selectwidth .spinfield')
@@ -98,7 +114,6 @@ describe('Change shape properties via mobile wizard.', 
function() {
});
 
it('Change shape height.', function() {
-
openPosSizePanel();
 
cy.get('#selectheight .spinfield')
@@ -155,7 +170,7 @@ describe('Change shape properties via mobile wizard.', 
function() {
.should('not.have.attr', 'd', defaultGeometry);
 
cy.get('.leaflet-pane.leaflet-overlay-pane svg g svg g g g 
path')
-   .should('have.attr', 'd', 'M 8010,4863 L 1963,10855 
8010,10855 8010,4863 8010,4863 Z');
+   .should('have.attr', 'd', 'M 7955,4863 L 1963,10855 
7955,10855 7955,4863 7955,4863 Z');
});
 
it('Trigger moving backward / forward', function() {
@@ -202,7 +217,7 @@ describe('Change shape properties via mobile wizard.', 
function() {
.should('have.length.greaterThan', 12);
});
 
-   it.skip('Change line width', function() {
+   it('Change line width', function() {
openLinePropertyPanel();
 
cy.get('#linewidth .spinfield')
@@ -214,15 +229,6 @@ describe('Change shape properties via mobile wizard.', 
function() {
 
cy.get('.leaflet-pane.leaflet-overlay-pane svg g svg g g g 
path[fill="none"]')
.should('have.attr', 'stroke-width', '141');
-
-   openLinePropertyPanel();
-
-   helper.clickOnIdle('#linewidth .minus');
-
-   triggerNewSVG();
-
-   cy.get('.leaflet-pane.leaflet-overlay-pane svg g svg g g g 
path[fill="none"]')
-   .should('have.attr', 'stroke-width', '88');
});
 
it('Change line transparency', function() {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-07-11 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/impress/hamburger_menu_spec.js |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0749bc439840020f5d1ecb4fd078fd7b8560ba2d
Author: Tamás Zolnai 
AuthorDate: Sat Jul 11 13:29:17 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Sat Jul 11 15:06:59 2020 +0200

cypress: disable this unstable test.

Change-Id: I7d1ae4aef00c09ad6b02e34922520b48c2cd4641
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98557
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git 
a/cypress_test/integration_tests/mobile/impress/hamburger_menu_spec.js 
b/cypress_test/integration_tests/mobile/impress/hamburger_menu_spec.js
index e176fd901..3b7a31086 100644
--- a/cypress_test/integration_tests/mobile/impress/hamburger_menu_spec.js
+++ b/cypress_test/integration_tests/mobile/impress/hamburger_menu_spec.js
@@ -441,7 +441,7 @@ describe('Trigger hamburger menu options.', function() {
cy.wait(500);
});
 
-   it('Automatic spell checking.', function() {
+   it.skip('Automatic spell checking.', function() {
before('hamburger_menu.odp');
 
// Add a spelling error to the shape
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-07-10 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/writer/shape_properties_spec.js |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 58521f42c413e82907fbcf71f9df604340ea7707
Author: Tamás Zolnai 
AuthorDate: Fri Jul 10 17:08:46 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Fri Jul 10 19:26:10 2020 +0200

cypress: disable this unstable test.

Change-Id: I4682f00e7592f6aba5ef5a1e9bdd99339416c1e0
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98536
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git 
a/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js 
b/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js
index cda9b8119..01dcd3c71 100644
--- a/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js
@@ -202,7 +202,7 @@ describe('Change shape properties via mobile wizard.', 
function() {
.should('have.length.greaterThan', 12);
});
 
-   it('Change line width', function() {
+   it.skip('Change line width', function() {
openLinePropertyPanel();
 
cy.get('#linewidth .spinfield')
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-07-10 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/common/helper.js |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e88e72ead9019a07e6f7d72a198ea4f249ddec36
Author: Tamás Zolnai 
AuthorDate: Fri Jul 10 11:53:04 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Fri Jul 10 13:00:59 2020 +0200

cypress: use bigger wait time to decide whether an item is idle.

Change-Id: I7d31c83b2438615b6fca9a9d8fb0f62a99728ddf
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98483
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/common/helper.js 
b/cypress_test/integration_tests/common/helper.js
index e23a9b40f..1578b70d6 100644
--- a/cypress_test/integration_tests/common/helper.js
+++ b/cypress_test/integration_tests/common/helper.js
@@ -302,7 +302,7 @@ function waitUntilIdle(selector, content) {
cy.log('Waiting item to be idle - start.');
 
var item;
-   var waitingTime = 1000;
+   var waitingTime = 2000;
if (content) {
cy.contains(selector, content, { log: false })
.then(function(itemToIdle) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-07-10 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/calc/hamburger_menu_spec.js   |8 
++--
 cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js |8 
++--
 2 files changed, 4 insertions(+), 12 deletions(-)

New commits:
commit dea7f6cd057a6707ef85d8c154329e52c53572fa
Author: Tamás Zolnai 
AuthorDate: Thu Jul 9 12:15:18 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Fri Jul 10 12:50:38 2020 +0200

cypress: use OnIdle methods in search dialog related tests.

Change-Id: I94af320ea9fbcf17e765518f33995032ac90a892
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98428
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/mobile/calc/hamburger_menu_spec.js 
b/cypress_test/integration_tests/mobile/calc/hamburger_menu_spec.js
index 20f5fd986..f71983264 100644
--- a/cypress_test/integration_tests/mobile/calc/hamburger_menu_spec.js
+++ b/cypress_test/integration_tests/mobile/calc/hamburger_menu_spec.js
@@ -329,17 +329,13 @@ describe('Trigger hamburger menu options.', function() {
cy.get('#mobile-wizard-content')
.should('not.be.empty');
 
-   cy.wait(1500);
-
// Search for some word
-   cy.get('#searchterm')
-   .type('a{enter}');
+   helper.inputOnIdle('#searchterm', 'a');
 
cy.get('#search')
.should('not.have.attr', 'disabled');
 
-   cy.get('#search')
-   .click();
+   helper.clickOnIdle('#search');
 
// First cell should be selected
cy.get('input#addressInput')
diff --git 
a/cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js 
b/cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js
index 41dabed7d..34201de9f 100644
--- a/cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js
@@ -658,17 +658,13 @@ describe('Trigger hamburger menu options.', function() {
cy.get('#mobile-wizard-content')
.should('not.be.empty');
 
-   cy.wait(1500);
-
// Search for some word
-   cy.get('#searchterm')
-   .type('a{enter}');
+   helper.inputOnIdle('#searchterm', 'a');
 
cy.get('#search')
.should('not.have.attr', 'disabled');
 
-   cy.get('#search')
-   .click();
+   helper.clickOnIdle('#search');
 
// Part of the text should be selected
cy.get('.leaflet-marker-icon')
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-07-09 Thread Szymon Kłos (via logerrit)
 cypress_test/integration_tests/common/calc_helper.js |2 -
 loleaflet/css/spreadsheet.css|2 -
 loleaflet/src/layer/tile/TileLayer.js|   28 ++-
 3 files changed, 22 insertions(+), 10 deletions(-)

New commits:
commit d12cc35045c480311f019afec3a3a1771eb65aa0
Author: Szymon Kłos 
AuthorDate: Thu Jul 9 11:25:25 2020 +0200
Commit: Szymon Kłos 
CommitDate: Thu Jul 9 13:15:29 2020 +0200

Make cell markers less heavy on desktop

* Don't show selection resize markers for single cell
  selection on desktop
* Use smaller autofill marker on desktop, for single cell
  show it in the corner like in the core

Change-Id: Ic36c16213532ec8b615ee808f836b939f35245fd
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98420
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/cypress_test/integration_tests/common/calc_helper.js 
b/cypress_test/integration_tests/common/calc_helper.js
index 3fc8a996f..8542f7c3a 100644
--- a/cypress_test/integration_tests/common/calc_helper.js
+++ b/cypress_test/integration_tests/common/calc_helper.js
@@ -44,7 +44,7 @@ function clickOnFirstCell(firstClick = true, dblClick = 
false) {
});
 
if (firstClick && !dblClick)
-   cy.get('.spreadsheet-cell-resize-marker')
+   cy.get('.spreadsheet-cell-autofill-marker')
.should('be.visible');
else
cy.get('.leaflet-cursor.blinking-cursor')
diff --git a/loleaflet/css/spreadsheet.css b/loleaflet/css/spreadsheet.css
index a24792192..651dfb97b 100644
--- a/loleaflet/css/spreadsheet.css
+++ b/loleaflet/css/spreadsheet.css
@@ -217,8 +217,6 @@
 .spreadsheet-cell-autofill-marker {
margin-left: 0px;
margin-top: 0px;
-   width: 16px;
-   height: 16px;
background-image: url('images/cell-autofill-marker.svg');
background-size: 100% 100%;
background-repeat: no-repeat;
diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index 438476c26..92257f195 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -178,7 +178,7 @@ L.TileLayer = L.GridLayer.extend({
this._cellAutofillMarker = L.marker(new L.LatLng(0, 0), {
icon: L.divIcon({
className: 'spreadsheet-cell-autofill-marker',
-   iconSize: null
+   iconSize: window.mode.isDesktop() ? [8, 8] : 
[16, 16]
}),
draggable: true
});
@@ -3079,7 +3079,12 @@ L.TileLayer = L.GridLayer.extend({
},
 
_onUpdateCellResizeMarkers: function () {
-   if (this._selections.getLayers().length !== 0 || 
(this._cellCursor && !this._isEmptyRectangle(this._cellCursor))) {
+   var singleCellOnDesktop = window.mode.isDesktop()
+   && 
!this._cellSelectionArea
+   && 
(this._cellCursor && !this._isEmptyRectangle(this._cellCursor));
+
+   if (!singleCellOnDesktop &&
+   (this._selections.getLayers().length !== 0 || 
(this._cellCursor && !this._isEmptyRectangle(this._cellCursor {
if (this._isEmptyRectangle(this._cellSelectionArea) && 
this._isEmptyRectangle(this._cellCursor)) {
return;
}
@@ -3107,10 +3112,6 @@ L.TileLayer = L.GridLayer.extend({

this._map.addLayer(this._cellAutofillMarker);
var cellAutoFillMarkerPoisition = 
cellRectangle.getCenter();
cellAutoFillMarkerPoisition.lat = 
cellRectangle.getSouth();
-   cellAutoFillMarkerPoisition = 
this._map.project(cellAutoFillMarkerPoisition);
-   var sizeAutoFill = 
this._cellAutofillMarker._icon.getBoundingClientRect();
-   cellAutoFillMarkerPoisition = 
cellAutoFillMarkerPoisition.subtract(new L.Point(sizeAutoFill.width / 2, 
sizeAutoFill.height / 2));
-   cellAutoFillMarkerPoisition = 
this._map.unproject(cellAutoFillMarkerPoisition);

this._cellAutofillMarker.setLatLng(cellAutoFillMarkerPoisition);
}
else if (this._cellAutofillMarker) {
@@ -3118,7 +3119,20 @@ L.TileLayer = L.GridLayer.extend({
}
}
}
-   else {
+   else if (singleCellOnDesktop) {
+   cellRectangle = 

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

2020-07-09 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js |   11 
+-
 1 file changed, 6 insertions(+), 5 deletions(-)

New commits:
commit dc5c44f712dfbaa42a8a0fe171638ca241799a93
Author: Tamás Zolnai 
AuthorDate: Thu Jul 9 07:54:24 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Thu Jul 9 09:09:13 2020 +0200

cypress: avoid failure of time field insertion (impress, mobile).

Change-Id: I0330ae701a8d6a84f2cb57bc5ccef88f9fe56ecf
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98394
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git 
a/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js 
b/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js
index 6c65caf8f..2627c4642 100644
--- a/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js
+++ b/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js
@@ -19,7 +19,7 @@ describe('Impress insertion wizard.', function() {
helper.afterAll(testFileName);
});
 
-   function selectionShouldBeTextShape() {
+   function selectionShouldBeTextShape(checkTextShape = true) {
// Check that the shape is there
cy.get('.leaflet-pane.leaflet-overlay-pane svg')
.should(function(svg) {
@@ -27,8 +27,9 @@ describe('Impress insertion wizard.', function() {

expect(svg[0].getBBox().height).to.be.greaterThan(0);
});
 
-   cy.get('.leaflet-pane.leaflet-overlay-pane svg 
g.com\\.sun\\.star\\.drawing\\.TextShape')
-   .should('exist');
+   if (checkTextShape)
+   cy.get('.leaflet-pane.leaflet-overlay-pane svg 
g.com\\.sun\\.star\\.drawing\\.TextShape')
+   .should('exist');
 
// Check also that the shape is fully visible
// TODO: shapes are hungs out of the slide after insertion
@@ -260,7 +261,7 @@ describe('Impress insertion wizard.', function() {
.click();
 
// Check that the shape is there
-   selectionShouldBeTextShape();
+   selectionShouldBeTextShape(false);
 
// Check the text
impressMobileHelper.selectTextOfShape();
@@ -280,7 +281,7 @@ describe('Impress insertion wizard.', function() {
.click();
 
// Check that the shape is there
-   selectionShouldBeTextShape();
+   selectionShouldBeTextShape(false);
 
// Check the text
impressMobileHelper.selectTextOfShape();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-07-08 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/writer/shape_properties_spec.js |   14 
++
 1 file changed, 4 insertions(+), 10 deletions(-)

New commits:
commit 4a9ae824975948b6c4f582db1a02306e8fbd3675
Author: Tamás Zolnai 
AuthorDate: Wed Jul 8 16:29:41 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Wed Jul 8 18:27:10 2020 +0200

cypress: reenable some shape related tests.

Change-Id: Ic21b812cf8c0370dcab9e8474f30206a2b88f70a
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98381
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git 
a/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js 
b/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js
index e8c442cee..6f5b43321 100644
--- a/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js
@@ -113,7 +113,7 @@ describe('Change shape properties via mobile wizard.', 
function() {
.should('have.attr', 'd', 'M 1965,4863 L 7957,18073 
1965,18073 1965,4863 1965,4863 Z');
});
 
-   it.skip('Change size with keep ratio enabled.', function() {
+   it('Change size with keep ratio enabled.', function() {
openPosSizePanel();
 
// Enable keep ratio
@@ -122,14 +122,8 @@ describe('Change shape properties via mobile wizard.', 
function() {
cy.get('#ratio #ratio')
.should('have.prop', 'checked', true);
 
-   // TODO: flickering here?
-   cy.wait(300);
-
// Change height
-   cy.get('#selectheight .spinfield')
-   .clear()
-   .type('5.2')
-   .type('{enter}');
+   helper.inputOnIdle('#selectheight .spinfield', '5.2');
 
cy.get('.leaflet-pane.leaflet-overlay-pane svg g svg g g g 
path')
.should('not.have.attr', 'd', defaultGeometry);
@@ -195,7 +189,7 @@ describe('Change shape properties via mobile wizard.', 
function() {
.should('have.attr', 'stroke', 'rgb(152,0,0)');
});
 
-   it.skip('Change line style', function() {
+   it('Change line style', function() {
openLinePropertyPanel();
 
helper.clickOnIdle('#linestyle');
@@ -208,7 +202,7 @@ describe('Change shape properties via mobile wizard.', 
function() {
.should('have.length.greaterThan', 12);
});
 
-   it.skip('Change line width', function() {
+   it('Change line width', function() {
openLinePropertyPanel();
 
cy.get('#linewidth .spinfield')
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-07-06 Thread Szymon Kłos (via logerrit)
 cypress_test/integration_tests/mobile/calc/hamburger_menu_spec.js   |   46 
+
 cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js |   51 
++
 loleaflet/src/control/Control.Menubar.js|   12 +-
 3 files changed, 28 insertions(+), 81 deletions(-)

New commits:
commit 304d26af19f31050df6f02d9737a60f98551745b
Author: Szymon Kłos 
AuthorDate: Wed May 6 10:12:52 2020 +0200
Commit: Szymon Kłos 
CommitDate: Mon Jul 6 14:13:47 2020 +0200

Add find & replace dialog in menu

Change-Id: I4cf7f773e46d39fac521f607df4db6922a3c70bf
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97702
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/cypress_test/integration_tests/mobile/calc/hamburger_menu_spec.js 
b/cypress_test/integration_tests/mobile/calc/hamburger_menu_spec.js
index 2f25a8072..7d631cc11 100644
--- a/cypress_test/integration_tests/mobile/calc/hamburger_menu_spec.js
+++ b/cypress_test/integration_tests/mobile/calc/hamburger_menu_spec.js
@@ -326,52 +326,24 @@ describe('Trigger hamburger menu options.', function() {
.click();
 
// Search bar become visible
-   cy.get('#toolbar-search')
-   .should('be.visible');
+   cy.get('#mobile-wizard-content')
+   .should('not.be.empty');
 
-   // Search for some word
-   cy.get('#search-input')
-   .type('a');
+   cy.wait(1500);
 
-   cy.get('.w2ui-tb-image.w2ui-icon.next')
-   .click();
+   // Search for some word
+   cy.get('#searchterm')
+   .type('a{enter}');
 
-   // First cell should be selected
-   cy.get('input#addressInput')
-   .should('have.prop', 'value', 'A1');
+   cy.get('#search')
+   .should('not.have.attr', 'disabled');
 
-   // Go for the second match
-   cy.get('.w2ui-tb-image.w2ui-icon.next')
-   .click();
-
-   //Second cell should be selected
-   cy.get('input#addressInput')
-   .should('have.prop', 'value', 'B1');
-
-   // Go back to the first match
-   cy.get('.w2ui-tb-image.w2ui-icon.prev')
+   cy.get('#search')
.click();
 
// First cell should be selected
cy.get('input#addressInput')
.should('have.prop', 'value', 'A1');
-
-   // Remove search word
-   cy.get('#search-input')
-   .should('have.prop', 'value', 'a');
-
-   cy.get('#tb_searchbar_item_cancelsearch')
-   .click();
-
-   cy.get('#search-input')
-   .should('have.prop', 'value', '');
-
-   // Close search toolbar
-   cy.get('.w2ui-tb-image.w2ui-icon.unfold')
-   .click();
-
-   cy.get('#toolbar-search')
-   .should('not.be.visible');
});
 
it('Sheet: insert row before.', function() {
diff --git 
a/cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js 
b/cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js
index ba569caa6..c0e921e8d 100644
--- a/cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js
@@ -656,59 +656,30 @@ describe('Trigger hamburger menu options.', function() {
.click();
 
// Search bar become visible
-   cy.get('#toolbar-search')
-   .should('be.visible');
-
-   // Search for some word
-   cy.get('#search-input')
-   .type('a');
+   cy.get('#mobile-wizard-content')
+   .should('not.be.empty');
 
-   // Part of the text should be selected
-   cy.get('.leaflet-marker-icon')
-   .should('exist');
+   cy.wait(1500);
 
-   cy.get('#copy-paste-container p')
-   .should('have.text', '\na');
+   // Search for some word
+   cy.get('#searchterm')
+   .type('a{enter}');
 
-   cy.get('#copy-paste-container p b')
-   .should('not.exist');
+   cy.get('#search')
+   .should('not.have.attr', 'disabled');
 
-   // Go for the second match
-   cy.get('.w2ui-tb-image.w2ui-icon.next')
+   cy.get('#search')
.click();
 
-   cy.get('#copy-paste-container p b')
+   // Part of the text should be selected
+   

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

2020-07-04 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/writer/shape_properties_spec.js |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit dbe763ff76af71707f3732104f9d86c199d069d5
Author: Tamás Zolnai 
AuthorDate: Sat Jul 4 09:27:57 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Sat Jul 4 09:51:34 2020 +0200

cypress: disable unstable test.

Change-Id: I4132e5133e209504f19877cf24a9f11bf25bedf8
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97934
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git 
a/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js 
b/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js
index 33ee95f7f..29ee9c069 100644
--- a/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js
@@ -219,7 +219,7 @@ describe('Change shape properties via mobile wizard.', 
function() {
.should('have.length.greaterThan', 12);
});
 
-   it('Change line width', function() {
+   it.skip('Change line width', function() {
openLinePropertyPanel();
 
cy.get('#linewidth .spinfield')
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-07-03 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/common/mobile_helper.js |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 51a8dd5354f19e0abdff4af196b9794ebdefa31e
Author: Tamás Zolnai 
AuthorDate: Thu Jul 2 16:00:04 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Fri Jul 3 14:17:56 2020 +0200

cypress: wait more for mobile wizard to stop flickering.

Change-Id: Ice1b495180377a5a8d62980532241fddd2774406
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97843
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/common/mobile_helper.js 
b/cypress_test/integration_tests/common/mobile_helper.js
index 56c790b94..054a87d41 100644
--- a/cypress_test/integration_tests/common/mobile_helper.js
+++ b/cypress_test/integration_tests/common/mobile_helper.js
@@ -118,7 +118,7 @@ function openMobileWizard() {
// 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.wait(1500);
 
cy.log('Opening mobile wizard - end.');
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-06-29 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/writer/mobile_wizard_state_spec.js |   
43 --
 1 file changed, 19 insertions(+), 24 deletions(-)

New commits:
commit c776c0f953e10fc593ca5762b175c3797484f224
Author: Tamás Zolnai 
AuthorDate: Mon Jun 29 11:50:39 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Mon Jun 29 11:51:43 2020 +0200

Revert "cypress: fix 'Check level visibility in hamburger menu.' test."

This reverts commit 4a805093bab0848c5d98e011e1d8dbf766c1a020.

Change-Id: I59bcb1eb0e8f4eedbfc6a6683e319bd89197137e
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97376
Tested-by: Tamás Zolnai 
Reviewed-by: Tamás Zolnai 

diff --git 
a/cypress_test/integration_tests/mobile/writer/mobile_wizard_state_spec.js 
b/cypress_test/integration_tests/mobile/writer/mobile_wizard_state_spec.js
index d08413460..cb39c453a 100644
--- a/cypress_test/integration_tests/mobile/writer/mobile_wizard_state_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/mobile_wizard_state_spec.js
@@ -1,4 +1,4 @@
-/* global describe it cy beforeEach require afterEach */
+/* global describe it cy beforeEach require afterEach expect */
 
 var helper = require('../../common/helper');
 var mobileHelper = require('../../common/mobile_helper');
@@ -73,49 +73,44 @@ describe('Mobile wizard state tests', function() {
//  .should('have.class', 'checked');
});
 
-   it('Check level visibility in hamburger menu.', function() {
+   it.skip('Check level visibility in hamburger menu.', function() {
+   helper.initAliasToNegative('originalHeight');
+
// Click on edit button
mobileHelper.enableEditingMobile();
 
mobileHelper.openHamburgerMenu();
 
// Get mobile wizard last item vertical pos.
-   cy.contains('.ui-header.level-0.mobile-wizard', 'File')
-   .should('be.visible');
+   cy.contains('.ui-header.level-0.mobile-wizard', 'About')
+   .invoke('offset')
+   .its('top')
+   .as('originalTop');
 
-   cy.contains('.menu-entry-with-icon', 'Save')
-   .should('not.be.visible');
-
-   cy.contains('.menu-entry-with-icon', 'PDF Document (.pdf)')
-   .should('not.be.visible');
+   cy.get('@originalTop')
+   .should('be.greaterThan', 0);
 
// Step in and step out the File submenu.
cy.contains('.menu-entry-with-icon', 'File')
.click();
 
-   cy.contains('.ui-header.level-0.mobile-wizard', 'File')
-   .should('not.be.visible');
-
-   cy.contains('.menu-entry-with-icon', 'Save')
+   cy.contains('.menu-entry-with-icon', 'Print')
.should('be.visible');
 
-   cy.contains('.menu-entry-with-icon', 'PDF Document (.pdf)')
-   .should('not.be.visible');
-
cy.get('#mobile-wizard-back')
.click();
 
cy.contains('.menu-entry-with-icon', 'File')
.should('be.visible');
 
-   // Here the menu items was merged after a short delay.
-   cy.wait(1000);
-
-   cy.contains('.menu-entry-with-icon', 'Save')
-   .should('not.be.visible');
-
-   cy.contains('.menu-entry-with-icon', 'PDF Document (.pdf)')
-   .should('not.be.visible');
+   cy.get('@originalTop')
+   .then(function(originalTop) {
+   cy.contains('.ui-header.level-0.mobile-wizard', 
'About')
+   .should(function(content) {
+   
expect(content.offset().top).to.be.lessThan(originalTop + 0.0001);
+   
expect(content.offset().top).to.be.greaterThan(originalTop - 0.0001);
+   });
+   });
});
 });
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-06-26 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/common/calc_helper.js  |3 ++
 cypress_test/integration_tests/mobile/calc/hamburger_menu_spec.js |   11 
+-
 2 files changed, 13 insertions(+), 1 deletion(-)

New commits:
commit 472c2c732533a207c95e0cc85f3782421fc98267
Author: Tamás Zolnai 
AuthorDate: Fri Jun 26 13:38:00 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Fri Jun 26 14:25:28 2020 +0200

cypress: fix 'Undo/redo.' test.

Change-Id: Ica2c0a544094c04c1f46756db8bf3f35eff69b13
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97216
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/common/calc_helper.js 
b/cypress_test/integration_tests/common/calc_helper.js
index 3c9c86d1e..3fc8a996f 100644
--- a/cypress_test/integration_tests/common/calc_helper.js
+++ b/cypress_test/integration_tests/common/calc_helper.js
@@ -50,6 +50,9 @@ function clickOnFirstCell(firstClick = true, dblClick = 
false) {
cy.get('.leaflet-cursor.blinking-cursor')
.should('be.visible');
 
+   cy.get('input#addressInput')
+   .should('have.prop', 'value', 'A1');
+
cy.log('Clicking on first cell - end.');
 }
 
diff --git a/cypress_test/integration_tests/mobile/calc/hamburger_menu_spec.js 
b/cypress_test/integration_tests/mobile/calc/hamburger_menu_spec.js
index 1d2e64876..3c6c9a69e 100644
--- a/cypress_test/integration_tests/mobile/calc/hamburger_menu_spec.js
+++ b/cypress_test/integration_tests/mobile/calc/hamburger_menu_spec.js
@@ -107,7 +107,7 @@ describe('Trigger hamburger menu options.', function() {
.should('contain', 'document.xlsx');
});
 
-   it.skip('Undo/redo.', function() {
+   it('Undo/redo.', function() {
// Type a new character
calcHelper.clickOnFirstCell(true, true);
 
@@ -128,6 +128,9 @@ describe('Trigger hamburger menu options.', function() {
cy.contains('.menu-entry-with-icon', 'Undo')
.click();
 
+   cy.get('input#addressInput')
+   .should('have.prop', 'value', 'A1');
+
calcMobileHelper.selectAllMobile();
 
cy.get('#copy-paste-container table td')
@@ -142,6 +145,9 @@ describe('Trigger hamburger menu options.', function() {
cy.contains('.menu-entry-with-icon', 'Redo')
.click();
 
+   cy.get('input#addressInput')
+   .should('have.prop', 'value', 'A1');
+
calcMobileHelper.selectAllMobile();
 
cy.get('#copy-paste-container table td')
@@ -180,6 +186,9 @@ describe('Trigger hamburger menu options.', function() {
cy.get('.leaflet-popup-content input[value=\'Jump to state\']')
.click();
 
+   cy.get('input#addressInput')
+   .should('have.prop', 'value', 'A1');
+
calcMobileHelper.selectAllMobile();
 
cy.get('#copy-paste-container table td')
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-06-25 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/writer/mobile_wizard_state_spec.js |   
43 +-
 1 file changed, 24 insertions(+), 19 deletions(-)

New commits:
commit 4a805093bab0848c5d98e011e1d8dbf766c1a020
Author: Tamás Zolnai 
AuthorDate: Wed Jun 24 11:56:08 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Thu Jun 25 13:34:49 2020 +0200

cypress: fix 'Check level visibility in hamburger menu.' test.

Change-Id: I5a1dbc6d1f4ffa4455682e7d2f2e6931469c4a02
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97034
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git 
a/cypress_test/integration_tests/mobile/writer/mobile_wizard_state_spec.js 
b/cypress_test/integration_tests/mobile/writer/mobile_wizard_state_spec.js
index cb39c453a..d08413460 100644
--- a/cypress_test/integration_tests/mobile/writer/mobile_wizard_state_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/mobile_wizard_state_spec.js
@@ -1,4 +1,4 @@
-/* global describe it cy beforeEach require afterEach expect */
+/* global describe it cy beforeEach require afterEach */
 
 var helper = require('../../common/helper');
 var mobileHelper = require('../../common/mobile_helper');
@@ -73,44 +73,49 @@ describe('Mobile wizard state tests', function() {
//  .should('have.class', 'checked');
});
 
-   it.skip('Check level visibility in hamburger menu.', function() {
-   helper.initAliasToNegative('originalHeight');
-
+   it('Check level visibility in hamburger menu.', function() {
// Click on edit button
mobileHelper.enableEditingMobile();
 
mobileHelper.openHamburgerMenu();
 
// Get mobile wizard last item vertical pos.
-   cy.contains('.ui-header.level-0.mobile-wizard', 'About')
-   .invoke('offset')
-   .its('top')
-   .as('originalTop');
+   cy.contains('.ui-header.level-0.mobile-wizard', 'File')
+   .should('be.visible');
 
-   cy.get('@originalTop')
-   .should('be.greaterThan', 0);
+   cy.contains('.menu-entry-with-icon', 'Save')
+   .should('not.be.visible');
+
+   cy.contains('.menu-entry-with-icon', 'PDF Document (.pdf)')
+   .should('not.be.visible');
 
// Step in and step out the File submenu.
cy.contains('.menu-entry-with-icon', 'File')
.click();
 
-   cy.contains('.menu-entry-with-icon', 'Print')
+   cy.contains('.ui-header.level-0.mobile-wizard', 'File')
+   .should('not.be.visible');
+
+   cy.contains('.menu-entry-with-icon', 'Save')
.should('be.visible');
 
+   cy.contains('.menu-entry-with-icon', 'PDF Document (.pdf)')
+   .should('not.be.visible');
+
cy.get('#mobile-wizard-back')
.click();
 
cy.contains('.menu-entry-with-icon', 'File')
.should('be.visible');
 
-   cy.get('@originalTop')
-   .then(function(originalTop) {
-   cy.contains('.ui-header.level-0.mobile-wizard', 
'About')
-   .should(function(content) {
-   
expect(content.offset().top).to.be.lessThan(originalTop + 0.0001);
-   
expect(content.offset().top).to.be.greaterThan(originalTop - 0.0001);
-   });
-   });
+   // Here the menu items was merged after a short delay.
+   cy.wait(1000);
+
+   cy.contains('.menu-entry-with-icon', 'Save')
+   .should('not.be.visible');
+
+   cy.contains('.menu-entry-with-icon', 'PDF Document (.pdf)')
+   .should('not.be.visible');
});
 });
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-06-24 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/writer/mobile_wizard_state_spec.js |
2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 823e77530a85b516beb75ed16e6db756bf1128f9
Author: Tamás Zolnai 
AuthorDate: Wed Jun 24 19:00:02 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Wed Jun 24 19:29:39 2020 +0200

cypress: this test is unstable.

Change-Id: Ic9f970b8f2abd8e355e09ff70ae17c5bea23
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97073
Tested-by: Tamás Zolnai 
Reviewed-by: Tamás Zolnai 

diff --git 
a/cypress_test/integration_tests/mobile/writer/mobile_wizard_state_spec.js 
b/cypress_test/integration_tests/mobile/writer/mobile_wizard_state_spec.js
index bba0af268..cb39c453a 100644
--- a/cypress_test/integration_tests/mobile/writer/mobile_wizard_state_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/mobile_wizard_state_spec.js
@@ -73,7 +73,7 @@ describe('Mobile wizard state tests', function() {
//  .should('have.class', 'checked');
});
 
-   it('Check level visibility in hamburger menu.', function() {
+   it.skip('Check level visibility in hamburger menu.', function() {
helper.initAliasToNegative('originalHeight');
 
// Click on edit button
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-06-24 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js |8 

 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit a672219c9736a3e2c24dfee402b837bb352371d0
Author: Tamás Zolnai 
AuthorDate: Thu Jun 18 14:43:57 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Wed Jun 24 18:58:41 2020 +0200

cypress: fix date field insertion tests.

Change-Id: Iff55cd552c02954df104ac9b37b3eea9b630b257
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96986
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git 
a/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js 
b/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js
index e41d6f826..6c65caf8f 100644
--- a/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js
+++ b/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js
@@ -27,8 +27,8 @@ describe('Impress insertion wizard.', function() {

expect(svg[0].getBBox().height).to.be.greaterThan(0);
});
 
-   cy.get('.leaflet-pane.leaflet-overlay-pane g.Page g')
-   .should('have.class', 'com.sun.star.drawing.TextShape');
+   cy.get('.leaflet-pane.leaflet-overlay-pane svg 
g.com\\.sun\\.star\\.drawing\\.TextShape')
+   .should('exist');
 
// Check also that the shape is fully visible
// TODO: shapes are hungs out of the slide after insertion
@@ -210,7 +210,7 @@ describe('Impress insertion wizard.', function() {
helper.expectTextForClipboard('Tap to edit text');
});
 
-   it.skip('Insert date field (fixed).', function() {
+   it('Insert date field (fixed).', function() {
mobileHelper.openInsertionWizard();
 
cy.contains('.menu-entry-with-icon', 'More Fields...')
@@ -230,7 +230,7 @@ describe('Impress insertion wizard.', function() {
helper.matchClipboardText(regex);
});
 
-   it.skip('Insert date field (variable).', function() {
+   it('Insert date field (variable).', function() {
mobileHelper.openInsertionWizard();
 
cy.contains('.menu-entry-with-icon', 'More Fields...')
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-06-24 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/writer/mobile_wizard_state_spec.js |   
42 +-
 1 file changed, 41 insertions(+), 1 deletion(-)

New commits:
commit 612f18ce0e695f884301a6a92853b90ebb6b3979
Author: Tamás Zolnai 
AuthorDate: Wed Jun 24 11:03:23 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Wed Jun 24 13:37:42 2020 +0200

cypress: test mobile wizard level handling in hamburger menu.

Catches 'merged levels' issue fixed by this commit:
801386effc84dd6e2d7c706c36a1c8bd6131d496

Change-Id: I2c56368e64afc08bc0e1aa3195c29ee91bf758e3
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97017
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git 
a/cypress_test/integration_tests/mobile/writer/mobile_wizard_state_spec.js 
b/cypress_test/integration_tests/mobile/writer/mobile_wizard_state_spec.js
index 0e86911db..bba0af268 100644
--- a/cypress_test/integration_tests/mobile/writer/mobile_wizard_state_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/mobile_wizard_state_spec.js
@@ -1,4 +1,4 @@
-/* global describe it cy beforeEach require afterEach*/
+/* global describe it cy beforeEach require afterEach expect */
 
 var helper = require('../../common/helper');
 var mobileHelper = require('../../common/mobile_helper');
@@ -72,5 +72,45 @@ describe('Mobile wizard state tests', function() {
//cy.get('#tb_actionbar_item_mobile_wizard table')
//  .should('have.class', 'checked');
});
+
+   it('Check level visibility in hamburger menu.', function() {
+   helper.initAliasToNegative('originalHeight');
+
+   // Click on edit button
+   mobileHelper.enableEditingMobile();
+
+   mobileHelper.openHamburgerMenu();
+
+   // Get mobile wizard last item vertical pos.
+   cy.contains('.ui-header.level-0.mobile-wizard', 'About')
+   .invoke('offset')
+   .its('top')
+   .as('originalTop');
+
+   cy.get('@originalTop')
+   .should('be.greaterThan', 0);
+
+   // Step in and step out the File submenu.
+   cy.contains('.menu-entry-with-icon', 'File')
+   .click();
+
+   cy.contains('.menu-entry-with-icon', 'Print')
+   .should('be.visible');
+
+   cy.get('#mobile-wizard-back')
+   .click();
+
+   cy.contains('.menu-entry-with-icon', 'File')
+   .should('be.visible');
+
+   cy.get('@originalTop')
+   .then(function(originalTop) {
+   cy.contains('.ui-header.level-0.mobile-wizard', 
'About')
+   .should(function(content) {
+   
expect(content.offset().top).to.be.lessThan(originalTop + 0.0001);
+   
expect(content.offset().top).to.be.greaterThan(originalTop - 0.0001);
+   });
+   });
+   });
 });
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-06-22 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/impress/spellchecking_spec.js |   34 
++
 1 file changed, 10 insertions(+), 24 deletions(-)

New commits:
commit dd20af0f9c68c78cca77e19918e3e1a495666b87
Author: Tamás Zolnai 
AuthorDate: Mon Jun 22 13:25:48 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Mon Jun 22 16:04:43 2020 +0200

cypress: stabilize impress/spellchecking_spec.js test.

Change-Id: I56af585641cf9c19d1546ec4df999a68f119301c
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96857
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git 
a/cypress_test/integration_tests/mobile/impress/spellchecking_spec.js 
b/cypress_test/integration_tests/mobile/impress/spellchecking_spec.js
index 2a16ef837..808f0a879 100644
--- a/cypress_test/integration_tests/mobile/impress/spellchecking_spec.js
+++ b/cypress_test/integration_tests/mobile/impress/spellchecking_spec.js
@@ -28,31 +28,18 @@ describe('Spell checking menu.', function() {
.dblclick(XPos, YPos);
});
 
-   cy.get('.leaflet-cursor.blinking-cursor')
-   .should('exist');
+   cy.get('textarea.clipboard')
+   .type('{leftArrow}');
 
-   helper.selectAllText(false);
+   cy.get('.leaflet-marker-icon')
+   .should('not.exist');
 
// Open context menu
-   cy.get('.leaflet-marker-icon')
-   .then(function(markers) {
-   expect(markers.length).to.have.greaterThan(1);
-   for (var i = 0; i < markers.length; i++) {
-   if 
(markers[i].classList.contains('leaflet-selection-marker-start')) {
-   var XPos = 
markers[i].getBoundingClientRect().right + 10;
-   } else if 
(markers[i].classList.contains('leaflet-selection-marker-end')) {
-   var YPos = 
markers[i].getBoundingClientRect().top - 10;
-   }
-   }
-
-   cy.get('.leaflet-cursor.blinking-cursor')
-   .should('exist');
-
-   // Remove selection
-   cy.get('body')
-   .type('{leftarrow}');
-   cy.get('.leaflet-marker-icon')
-   .should('not.exist');
+   cy.get('g path.leaflet-interactive')
+   .then(function(shape) {
+   expect(shape.length).to.be.equal(1);
+   var XPos = 
(shape[0].getBoundingClientRect().left + 
shape[0].getBoundingClientRect().right) / 2;
+   var YPos = 
(shape[0].getBoundingClientRect().top + 
shape[0].getBoundingClientRect().bottom) / 2;
 
mobileHelper.longPressOnDocument(XPos, YPos);
});
@@ -69,8 +56,7 @@ describe('Spell checking menu.', function() {
 
helper.selectAllText(false);
 
-   cy.get('#copy-paste-container pre')
-   .should('contain.text', 'hello');
+   helper.expectTextForClipboard('hello');
});
 
it('Ignore all.', function() {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-06-22 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/calc/calc_mobile_helper.js |8 +---
 cypress_test/integration_tests/mobile/calc/spellchecking_spec.js |   18 
++
 2 files changed, 6 insertions(+), 20 deletions(-)

New commits:
commit 14be173ccd74766177a9d27cfdb87ad20c572f8e
Author: Tamás Zolnai 
AuthorDate: Mon Jun 22 13:10:49 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Mon Jun 22 15:30:46 2020 +0200

cypress: stabilize calc/spellchecking_spec.js test.

Change-Id: I8f49e305c32cf24f167890e8e9d8088440bb788e
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96856
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/mobile/calc/calc_mobile_helper.js 
b/cypress_test/integration_tests/mobile/calc/calc_mobile_helper.js
index c34af53cd..8e3298901 100644
--- a/cypress_test/integration_tests/mobile/calc/calc_mobile_helper.js
+++ b/cypress_test/integration_tests/mobile/calc/calc_mobile_helper.js
@@ -37,12 +37,8 @@ function selectAllMobile(removeSelection = true) {
cy.get('#spreadsheet-header-corner')
.click();
 
-   cy.get('.spreadsheet-cell-resize-marker:nth-of-type(2)')
-   .should('not.be.visible');
-
-   cy.get('.spreadsheet-cell-resize-marker:nth-of-type(1)')
-   .invoke('attr', 'style')
-   .should('contain', '(-9px, -8px,');
+   cy.get('.spreadsheet-cell-resize-marker')
+   .should('be.visible');
 
cy.get('input#addressInput')
.should('have.prop', 'value', 'A1:AMJ1048576');
diff --git a/cypress_test/integration_tests/mobile/calc/spellchecking_spec.js 
b/cypress_test/integration_tests/mobile/calc/spellchecking_spec.js
index e19e9a07e..79ed12d33 100644
--- a/cypress_test/integration_tests/mobile/calc/spellchecking_spec.js
+++ b/cypress_test/integration_tests/mobile/calc/spellchecking_spec.js
@@ -60,16 +60,6 @@ describe('Calc spell checking menu.', function() {
cy.contains('.context-menu-link', 'hello')
.click();
 
-   // Click outside of the cell
-   cy.get('.leaflet-marker-icon')
-   .then(function(items) {
-   expect(items).to.have.length(2);
-   var XPos = 
items[0].getBoundingClientRect().right;
-   var YPos = 
items[0].getBoundingClientRect().bottom + 10;
-   cy.get('body')
-   .click(XPos, YPos);
-   });
-
calcMobileHelper.selectAllMobile();
 
cy.get('#copy-paste-container table td')
@@ -106,9 +96,9 @@ describe('Calc spell checking menu.', function() {
.click();
 
// Click outside of the cell
-   cy.get('.leaflet-marker-icon')
+   cy.get('.leaflet-selection-marker-end')
.then(function(items) {
-   expect(items).to.have.length(2);
+   expect(items).to.have.length(1);
var XPos = 
items[0].getBoundingClientRect().right;
var YPos = 
items[0].getBoundingClientRect().bottom + 10;
cy.get('body')
@@ -129,9 +119,9 @@ describe('Calc spell checking menu.', function() {
.click();
 
// Click outside of the cell
-   cy.get('.leaflet-marker-icon')
+   cy.get('.leaflet-selection-marker-end')
.then(function(items) {
-   expect(items).to.have.length(2);
+   expect(items).to.have.length(1);
var XPos = 
items[0].getBoundingClientRect().right;
var YPos = 
items[0].getBoundingClientRect().bottom + 10;
cy.get('body')
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-06-22 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/common/helper.js|   55 -
 cypress_test/integration_tests/common/mobile_helper.js |   11 +--
 2 files changed, 44 insertions(+), 22 deletions(-)

New commits:
commit cfb803961cb6944b4919181c59028c2072a17986
Author: Tamás Zolnai 
AuthorDate: Mon Jun 22 12:34:06 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Mon Jun 22 13:26:29 2020 +0200

cypress: better way of adding conditional code based on doc type.

Change-Id: I8001eec9732a445830db81502446e675acc20304
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96841
Tested-by: Jenkins CollaboraOffice 
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/common/helper.js 
b/cypress_test/integration_tests/common/helper.js
index 00490c9bd..baafe49fb 100644
--- a/cypress_test/integration_tests/common/helper.js
+++ b/cypress_test/integration_tests/common/helper.js
@@ -124,25 +124,35 @@ function clearAllText() {
 
 // Check that the clipboard text matches with the specified text.
 function expectTextForClipboard(expectedPlainText) {
-   if (isWriter()) {
+   doIfInWriter(function() {
cy.get('#copy-paste-container p font')
.should('have.text', expectedPlainText);
-   } else {
+   });
+   doIfInCalc(function() {
cy.get('#copy-paste-container pre')
.should('have.text', expectedPlainText);
-   }
+   });
+   doIfInImpress(function() {
+   cy.get('#copy-paste-container pre')
+   .should('have.text', expectedPlainText);
+   });
 }
 
 // Check that the clipboard text matches with the
 // passed regular expression.
 function matchClipboardText(regexp) {
-   if (isWriter()) {
+   doIfInWriter(function() {
cy.contains('#copy-paste-container p font', regexp)
.should('exist');
-   } else {
+   });
+   doIfInCalc(function() {
cy.contains('#copy-paste-container pre', regexp)
.should('exist');
-   }
+   });
+   doIfInImpress(function() {
+   cy.contains('#copy-paste-container pre', regexp)
+   .should('exist');
+   });
 }
 
 function beforeAllDesktop(fileName, subFolder) {
@@ -206,16 +216,31 @@ function initAliasToEmptyString(aliasName) {
cy.log('Initializing alias to empty string - end.');
 }
 
-function isCalc() {
-   return Cypress.$('.spreadsheet-header-columns').length != 0;
+function doIfInCalc(callback) {
+   cy.get('#document-container')
+   .then(function(doc) {
+   if (doc.hasClass('spreadsheet-doctype')) {
+   callback();
+   }
+   });
 }
 
-function isImpress() {
-   return Cypress.$('#slide-sorter').length != 0;
+function doIfInImpress(callback) {
+   cy.get('#document-container')
+   .then(function(doc) {
+   if (doc.hasClass('presentation-doctype')) {
+   callback();
+   }
+   });
 }
 
-function isWriter() {
-   return !isCalc() && !isImpress();
+function doIfInWriter(callback) {
+   cy.get('#document-container')
+   .then(function(doc) {
+   if (doc.hasClass('text-doctype')) {
+   callback();
+   }
+   });
 }
 
 // Types text into elem with a delay in between characters.
@@ -282,9 +307,9 @@ module.exports.matchClipboardText = matchClipboardText;
 module.exports.afterAll = afterAll;
 module.exports.initAliasToNegative = initAliasToNegative;
 module.exports.initAliasToEmptyString = initAliasToEmptyString;
-module.exports.isCalc = isCalc;
-module.exports.isImpress = isImpress;
-module.exports.isWriter = isWriter;
+module.exports.doIfInCalc = doIfInCalc;
+module.exports.doIfInImpress = doIfInImpress;
+module.exports.doIfInWriter = doIfInWriter;
 module.exports.beforeAllDesktop = beforeAllDesktop;
 module.exports.typeText = typeText;
 module.exports.getLOVersion = getLOVersion;
diff --git a/cypress_test/integration_tests/common/mobile_helper.js 
b/cypress_test/integration_tests/common/mobile_helper.js
index ca8ec398f..56c790b94 100644
--- a/cypress_test/integration_tests/common/mobile_helper.js
+++ b/cypress_test/integration_tests/common/mobile_helper.js
@@ -21,13 +21,10 @@ function enableEditingMobile() {
cy.get('#toolbar-down')
.should('be.visible');
 
-   cy.get('#document-container')
-   .then(function(doc) {
-   if (doc.hasClass('spreadsheet-document')) {
-   cy.get('#formulabar')
-   .should('be.visible');
-   }
-   });
+   helper.doIfInCalc(function() {
+   

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

2020-06-19 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/calc/calc_mobile_helper.js |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 008d4ea32f475a669668394f6b886d255a586090
Author: Tamás Zolnai 
AuthorDate: Fri Jun 19 16:24:23 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Fri Jun 19 17:11:22 2020 +0200

cypress: stabilize calc/cell_appearance_spec.js test.

Change-Id: I3695e3e5608dee9b6f1f7f1dfc43dad76d9844f1
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96740
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/mobile/calc/calc_mobile_helper.js 
b/cypress_test/integration_tests/mobile/calc/calc_mobile_helper.js
index e4edc648d..c34af53cd 100644
--- a/cypress_test/integration_tests/mobile/calc/calc_mobile_helper.js
+++ b/cypress_test/integration_tests/mobile/calc/calc_mobile_helper.js
@@ -20,6 +20,9 @@ function removeTextSelection() {
cy.get('.spreadsheet-cell-resize-marker')
.invoke('attr', 'style')
.should('contain', '-8px,');
+
+   cy.get('input#addressInput')
+   .should('have.prop', 'value', 'B1:B1048576');
}
 
cy.log('Removing text selection - end.');
@@ -41,6 +44,9 @@ function selectAllMobile(removeSelection = true) {
.invoke('attr', 'style')
.should('contain', '(-9px, -8px,');
 
+   cy.get('input#addressInput')
+   .should('have.prop', 'value', 'A1:AMJ1048576');
+
cy.log('Selecting all text - end.');
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-06-19 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/calc/alignment_options_spec.js |   25 
+++---
 cypress_test/integration_tests/mobile/calc/bottom_toolbar_spec.js|3 +
 cypress_test/integration_tests/mobile/calc/calc_mobile_helper.js |3 +
 3 files changed, 15 insertions(+), 16 deletions(-)

New commits:
commit 08428824cbd4ea74c68682fe36043c4e5fa6048d
Author: Tamás Zolnai 
AuthorDate: Fri Jun 19 14:51:15 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Fri Jun 19 16:19:00 2020 +0200

cypress: stabilize 'Merge cells' test case.

Change-Id: I9661c00c26ea47cd1dd5f8121801b2e0ff083b53
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96733
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git 
a/cypress_test/integration_tests/mobile/calc/alignment_options_spec.js 
b/cypress_test/integration_tests/mobile/calc/alignment_options_spec.js
index 93ac85162..4ed008fe4 100644
--- a/cypress_test/integration_tests/mobile/calc/alignment_options_spec.js
+++ b/cypress_test/integration_tests/mobile/calc/alignment_options_spec.js
@@ -328,26 +328,19 @@ describe('Change alignment settings.', function() {
// Select the full row
calcMobileHelper.selectFirstRow();
 
-   // Even after we get the cell row selection the merge cell 
options is still disabled
-   // So we open mobile wizard again and again until merge cells 
get the right state
+   // Despite the selection is there, merge cells needs more time 
here.
+   cy.wait(1000);
+
mobileHelper.openMobileWizard();
-   cy.get('body')
-   .should(function() {
-   mobileHelper.closeMobileWizard();
-   mobileHelper.openMobileWizard();
 
-   cy.get('#ScAlignmentPropertyPanel')
-   .click();
+   cy.get('#ScAlignmentPropertyPanel')
+   .click();
 
-   cy.get('#AlignLeft')
-   .should('be.visible');
+   cy.get('#AlignLeft')
+   .should('be.visible');
 
-   cy.get('input#mergecells')
-   .then(function(items) {
-   
expect(items).to.have.lengthOf(1);
-   
expect(items[0]).to.not.have.attr('disabled');
-   });
-   });
+   cy.get('input#mergecells')
+   .should('not.have.attr', 'disabled');
 
// Click merge cells
cy.get('input#mergecells')
diff --git a/cypress_test/integration_tests/mobile/calc/bottom_toolbar_spec.js 
b/cypress_test/integration_tests/mobile/calc/bottom_toolbar_spec.js
index d1c2a02a6..e62a05501 100644
--- a/cypress_test/integration_tests/mobile/calc/bottom_toolbar_spec.js
+++ b/cypress_test/integration_tests/mobile/calc/bottom_toolbar_spec.js
@@ -124,6 +124,9 @@ describe('Interact with bottom toolbar.', function() {
// Select the full row
calcMobileHelper.selectFirstRow();
 
+   // Despite the selection is there, merge cells needs more time 
here.
+   cy.wait(1000);
+
cy.get('.w2ui-tb-image.w2ui-icon.togglemergecells')
.click();
 
diff --git a/cypress_test/integration_tests/mobile/calc/calc_mobile_helper.js 
b/cypress_test/integration_tests/mobile/calc/calc_mobile_helper.js
index e0f95f287..e4edc648d 100644
--- a/cypress_test/integration_tests/mobile/calc/calc_mobile_helper.js
+++ b/cypress_test/integration_tests/mobile/calc/calc_mobile_helper.js
@@ -60,6 +60,9 @@ function selectFirstRow() {
 
cy.get('.spreadsheet-cell-resize-marker:nth-of-type(2)')
.should('not.be.visible');
+
+   cy.get('input#addressInput')
+   .should('have.prop', 'value', 'A1:AMJ1');
 }
 
 module.exports.removeTextSelection = removeTextSelection;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-06-19 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/calc/insertion_wizard_spec.js|2 
++
 cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js |2 
++
 cypress_test/integration_tests/mobile/writer/insert_object_spec.js |2 
++
 cypress_test/support/index.js  |1 -
 4 files changed, 6 insertions(+), 1 deletion(-)

New commits:
commit da6f94a3eda08de57a64d00aa14f8fb58eb29f55
Author: Tamás Zolnai 
AuthorDate: Fri Jun 19 13:26:20 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Fri Jun 19 16:10:42 2020 +0200

cypress: fix attachFile is not a function error.

Include the related package directly in the test files,
where we use it. Somtimes supportfile is not handled correctly
in parallel build, which lead to missing function error.

Change-Id: Id4740a9384f0fe170a26b76ecd393a5beda1f5c5
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96723
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git 
a/cypress_test/integration_tests/mobile/calc/insertion_wizard_spec.js 
b/cypress_test/integration_tests/mobile/calc/insertion_wizard_spec.js
index e4dfbb142..04ec7cf6a 100644
--- a/cypress_test/integration_tests/mobile/calc/insertion_wizard_spec.js
+++ b/cypress_test/integration_tests/mobile/calc/insertion_wizard_spec.js
@@ -1,5 +1,7 @@
 /* global describe it cy beforeEach require afterEach expect*/
 
+require('cypress-file-upload');
+
 var helper = require('../../common/helper');
 var calcHelper = require('../../common/calc_helper');
 var mobileHelper = require('../../common/mobile_helper');
diff --git 
a/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js 
b/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js
index 16d2703e8..e41d6f826 100644
--- a/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js
+++ b/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js
@@ -1,5 +1,7 @@
 /* global describe it cy beforeEach require expect afterEach*/
 
+require('cypress-file-upload');
+
 var helper = require('../../common/helper');
 var mobileHelper = require('../../common/mobile_helper');
 var impressMobileHelper = require('./impress_mobile_helper');
diff --git a/cypress_test/integration_tests/mobile/writer/insert_object_spec.js 
b/cypress_test/integration_tests/mobile/writer/insert_object_spec.js
index df72aef3f..e9daa39ee 100644
--- a/cypress_test/integration_tests/mobile/writer/insert_object_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/insert_object_spec.js
@@ -1,5 +1,7 @@
 /* global describe it cy beforeEach require expect afterEach */
 
+require('cypress-file-upload');
+
 var helper = require('../../common/helper');
 var mobileHelper = require('../../common/mobile_helper');
 var writerMobileHelper = require('./writer_mobile_helper');
diff --git a/cypress_test/support/index.js b/cypress_test/support/index.js
index 453ced414..8f683db34 100644
--- a/cypress_test/support/index.js
+++ b/cypress_test/support/index.js
@@ -1,4 +1,3 @@
 /* global require */
 
 require('cypress-failed-log');
-require('cypress-file-upload');
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-06-18 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/common/mobile_helper.js |   12 
 1 file changed, 12 insertions(+)

New commits:
commit f99b6ae5dbf93a03e11755e0344642e1aedad300
Author: Tamás Zolnai 
AuthorDate: Thu Jun 18 20:17:30 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Thu Jun 18 20:52:34 2020 +0200

cypress: make calc/bottom_toolbar_spec.js test more stable.

Let's wait until all UI updating is finished, after editing
is enabled.

Change-Id: I57befdf0a873a189ba4555f384fa4dbee396f0b3
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96625
Tested-by: Jenkins CollaboraOffice 
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/common/mobile_helper.js 
b/cypress_test/integration_tests/common/mobile_helper.js
index 8627cbd55..ca8ec398f 100644
--- a/cypress_test/integration_tests/common/mobile_helper.js
+++ b/cypress_test/integration_tests/common/mobile_helper.js
@@ -17,6 +17,18 @@ function enableEditingMobile() {
cy.get('#tb_actionbar_item_mobile_wizard')
.should('not.have.class', 'disabled');
 
+   // Wait until all UI update is finished.
+   cy.get('#toolbar-down')
+   .should('be.visible');
+
+   cy.get('#document-container')
+   .then(function(doc) {
+   if (doc.hasClass('spreadsheet-document')) {
+   cy.get('#formulabar')
+   .should('be.visible');
+   }
+   });
+
cy.log('Enabling editing mode - end.');
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-06-18 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js |  143 
++
 cypress_test/plugins/blacklists.js  |9 
 2 files changed, 152 insertions(+)

New commits:
commit 1949cad47351187d4a9b3d2fc8845fb843ad76e1
Author: Tamás Zolnai 
AuthorDate: Wed Jun 17 18:03:00 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Thu Jun 18 15:16:06 2020 +0200

cypress: tests for page setup (writer, mobile)

Change-Id: I8c3db014daa00608351156c1de8d615b30314701
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96605
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git 
a/cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js 
b/cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js
index c9fd4f69e..ba569caa6 100644
--- a/cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js
@@ -39,6 +39,24 @@ describe('Trigger hamburger menu options.', function() {
.click();
}
 
+   function openPageWizard() {
+   mobileHelper.openHamburgerMenu();
+
+   cy.contains('.menu-entry-with-icon', 'Page Setup')
+   .click();
+
+   cy.get('#mobile-wizard-content')
+   .should('not.be.empty');
+   }
+
+   function closePageWizard() {
+   cy.get('#mobile-wizard-back')
+   .click();
+
+   cy.get('#mobile-wizard')
+   .should('not.be.visible');
+   }
+
it('Save', function() {
mobileHelper.openHamburgerMenu();
 
@@ -728,6 +746,131 @@ describe('Trigger hamburger menu options.', function() {
.should('have.text', '0');
});
 
+   it('Page setup: change paper size.', function() {
+   var centerTile = '.leaflet-tile-loaded[style=\'width: 256px; 
height: 256px; left: 255px; top: 517px;\']';
+   helper.imageShouldBeFullWhiteOrNot(centerTile, true);
+
+   openPageWizard();
+
+   cy.get('#papersize')
+   .click();
+
+   cy.contains('.ui-combobox-text', 'C6 Envelope')
+   .click();
+
+   // Smaller paper size makes center tile to contain text too.
+   helper.imageShouldBeFullWhiteOrNot(centerTile, false);
+
+   // Check that the page wizard shows the right value after 
reopen.
+   closePageWizard();
+
+   openPageWizard();
+
+   cy.get('#papersize .ui-header-left')
+   .should('have.text', 'C6 Envelope');
+   });
+
+   it('Page setup: change paper width.', function() {
+   var centerTile = '.leaflet-tile-loaded[style=\'width: 256px; 
height: 256px; left: 255px; top: 517px;\']';
+   helper.imageShouldBeFullWhiteOrNot(centerTile, true);
+
+   openPageWizard();
+
+   cy.get('#paperwidth .spinfield')
+   .clear()
+   .type('5')
+   .type('{enter}');
+
+   // Smaller paper size makes center tile to contain text too.
+   helper.imageShouldBeFullWhiteOrNot(centerTile, false);
+
+   // Check that the page wizard shows the right value after 
reopen.
+   closePageWizard();
+
+   openPageWizard();
+
+   cy.get('#papersize .ui-header-left')
+   .should('have.text', 'User');
+
+   cy.get('#paperwidth .spinfield')
+   .should('have.attr', 'value', '5');
+   });
+
+   it('Page setup: change paper height.', function() {
+   var centerTile = '.leaflet-tile-loaded[style=\'width: 256px; 
height: 256px; left: 255px; top: 517px;\']';
+   helper.imageShouldBeFullWhiteOrNot(centerTile, true);
+
+   openPageWizard();
+
+   cy.get('#paperheight .spinfield')
+   .clear()
+   .type('3.0')
+   .type('{enter}');
+
+   // Smaller paper size makes center tile to contain the end of 
the page.
+   helper.imageShouldBeFullWhiteOrNot(centerTile, false);
+
+   // Check that the page wizard shows the right value after 
reopen.
+   closePageWizard();
+
+   openPageWizard();
+
+   cy.get('#papersize .ui-header-left')
+   .should('have.text', 'User');
+
+   cy.get('#paperheight .spinfield')
+   .should('have.attr', 'value', '3');
+   });
+
+   it('Page setup: change orientation.', function() {
+   cy.get('.leaflet-tile-loaded[style=\'width: 256px; height: 
256px; left: 1023px; top: 5px;\']')
+   .should('not.exist');
+
+

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

2020-06-17 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js |   59 
++
 1 file changed, 59 insertions(+)

New commits:
commit fde2a23de7a1f132005486c2f4ef360aec9c31b0
Author: Tamás Zolnai 
AuthorDate: Wed Jun 17 14:40:39 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Wed Jun 17 17:02:46 2020 +0200

cypress: test for resolved comments menu option (writer, mobile).

Change-Id: I9e1ec7ec1a6e0732353d79bf3319e0b128ceec78
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96531
Tested-by: Jenkins CollaboraOffice 
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai 

diff --git 
a/cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js 
b/cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js
index 249624174..c9fd4f69e 100644
--- a/cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js
@@ -788,6 +788,65 @@ describe('Trigger hamburger menu options.', function() {
helper.imageShouldBeFullWhiteOrNot(centerTile, true);
});
 
+   it('Resolved comments.', function() {
+   // Insert comment first
+   mobileHelper.openInsertionWizard();
+
+   cy.contains('.menu-entry-with-icon', 'Comment')
+   .click();
+
+   cy.get('.loleaflet-annotation-table')
+   .should('exist');
+
+   cy.get('.loleaflet-annotation-textarea')
+   .type('some text');
+
+   cy.get('.vex-dialog-button-primary')
+   .click();
+
+   cy.get('.loleaflet-annotation:nth-of-type(2)')
+   .should('have.attr', 'style')
+   .should('not.contain', 'visibility: hidden');
+
+   // Resolve comment
+   cy.get('.loleaflet-annotation-menu')
+   .click({force: true});
+
+   cy.contains('.context-menu-link', 'Resolve')
+   .click();
+
+   cy.get('.loleaflet-annotation:nth-of-type(2)')
+   .should('have.attr', 'style')
+   .should('contain', 'visibility: hidden');
+
+   // Show resolved comments
+   mobileHelper.openHamburgerMenu();
+
+   cy.contains('.menu-entry-with-icon', 'View')
+   .click();
+
+   cy.contains('.menu-entry-with-icon', 'Resolved Comments')
+   .click();
+
+   cy.get('.loleaflet-annotation:nth-of-type(2)')
+   .should('have.attr', 'style')
+   .should('not.contain', 'visibility: hidden');
+
+   // Hide resolved comments
+   mobileHelper.openHamburgerMenu();
+
+   cy.contains('.menu-entry-with-icon', 'View')
+   .click();
+
+   cy.contains('.menu-entry-with-icon', 'Resolved Comments')
+   .click();
+
+   // TODO: can't hide resolved comments again.
+   //cy.get('.loleaflet-annotation:nth-of-type(2)')
+   //  .should('have.attr', 'style')
+   //  .should('contain', 'visibility: hidden');
+   });
+
it('Check version information.', function() {
mobileHelper.openHamburgerMenu();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-06-17 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js |   32 
++
 loleaflet/src/layer/tile/TileLayer.js   |2 
 2 files changed, 33 insertions(+), 1 deletion(-)

New commits:
commit 5ae113c7bf7335633e8a0151d2a5d1c8d5f2b1b9
Author: Tamás Zolnai 
AuthorDate: Wed Jun 17 15:34:20 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Wed Jun 17 16:56:10 2020 +0200

cypress: test save / print menu options (writer, mobile).

Change-Id: If954192df8ff9eafde44b8e1a5a714f40ecbe42c
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96539
Tested-by: Jenkins CollaboraOffice 
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai 

diff --git 
a/cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js 
b/cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js
index d70e11c60..249624174 100644
--- a/cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js
@@ -39,6 +39,38 @@ describe('Trigger hamburger menu options.', function() {
.click();
}
 
+   it('Save', function() {
+   mobileHelper.openHamburgerMenu();
+
+   cy.contains('.menu-entry-with-icon', 'File')
+   .click();
+
+   cy.contains('.menu-entry-with-icon', 'Save')
+   .click();
+
+   // TODO: we have no visual indicator of save was done
+   // So just trigger saving to catch any exception / console error
+   cy.wait(500);
+   });
+
+   it('Print', function() {
+   // A new window should be opened with the PDF.
+   cy.window()
+   .then(function(win) {
+   cy.stub(win, 'open');
+   });
+
+   mobileHelper.openHamburgerMenu();
+
+   cy.contains('.menu-entry-with-icon', 'File')
+   .click();
+
+   cy.contains('.menu-entry-with-icon', 'Print')
+   .click();
+
+   cy.window().its('open').should('be.called');
+   });
+
it('Download as PDF', function() {
mobileHelper.openHamburgerMenu();
 
diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index 2275206a5..eb0a7b14a 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -917,7 +917,7 @@ L.TileLayer = L.GridLayer.extend({
this._map.fire('postMessage', {msgId: 'Download_As', 
args: {Type: command.id, URL: url}});
}
else if (command.id === 'print') {
-   if (L.Browser.gecko || L.Browser.edge || L.Browser.ie 
|| this._map.options.print === false) {
+   if (L.Browser.gecko || L.Browser.edge || L.Browser.ie 
|| this._map.options.print === false || L.Browser.cypressTest) {
// the print dialog doesn't work well on firefox
// due to a pdf.js issue - 
https://github.com/mozilla/pdf.js/issues/5397
// open the pdf file in a new tab so that that 
user can print it directly in the browser's
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-06-17 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/common/helper.js|   32 
+-
 cypress_test/integration_tests/mobile/impress/slide_properties_spec.js |   28 

 2 files changed, 33 insertions(+), 27 deletions(-)

New commits:
commit 0994b2f1be060700bcd7b79392ab5f413bc5a925
Author: Tamás Zolnai 
AuthorDate: Mon Jun 15 16:35:09 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Wed Jun 17 16:50:41 2020 +0200

cypress: extract imageShouldBeFullWhiteOrNot() method.

Change-Id: I7d60eadb3a343c5c270cfd4ab90a7681d7c95ffa
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96522
Tested-by: Jenkins CollaboraOffice 
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/common/helper.js 
b/cypress_test/integration_tests/common/helper.js
index f8bdd7209..00490c9bd 100644
--- a/cypress_test/integration_tests/common/helper.js
+++ b/cypress_test/integration_tests/common/helper.js
@@ -1,4 +1,4 @@
-/* global cy Cypress*/
+/* global cy Cypress expect */
 
 function loadTestDoc(fileName, subFolder, mobile) {
cy.log('Loading test document - start.');
@@ -242,6 +242,35 @@ function getLOVersion() {
return 'master';
 }
 
+function imageShouldBeFullWhiteOrNot(selector, fullWhite = true) {
+   cy.get(selector)
+   .should(function(images) {
+   var img = images[0];
+
+   // Create an offscreen canvas to check the image's 
pixels
+   var canvas = document.createElement('canvas');
+   canvas.width = img.width;
+   canvas.height = img.height;
+   canvas.getContext('2d').drawImage(img, 0, 0, img.width, 
img.height);
+   var context = canvas.getContext('2d');
+
+   // Ignore a small zone on the edges, to ignore border.
+   var ignoredPixels = 2;
+   var pixelData = context.getImageData(ignoredPixels, 
ignoredPixels,
+   img.width - 2 * ignoredPixels,
+   img.height - 2 * ignoredPixels).data;
+
+   var allIsWhite = true;
+   for (var i = 0; i < pixelData.length; ++i) {
+   allIsWhite = allIsWhite && pixelData[i] == 255;
+   }
+   if (fullWhite)
+   expect(allIsWhite).to.be.true;
+   else
+   expect(allIsWhite).to.be.false;
+   });
+}
+
 module.exports.loadTestDoc = loadTestDoc;
 module.exports.assertCursorAndFocus = assertCursorAndFocus;
 module.exports.assertNoKeyboardInput = assertNoKeyboardInput;
@@ -259,3 +288,4 @@ module.exports.isWriter = isWriter;
 module.exports.beforeAllDesktop = beforeAllDesktop;
 module.exports.typeText = typeText;
 module.exports.getLOVersion = getLOVersion;
+module.exports.imageShouldBeFullWhiteOrNot = imageShouldBeFullWhiteOrNot;
diff --git 
a/cypress_test/integration_tests/mobile/impress/slide_properties_spec.js 
b/cypress_test/integration_tests/mobile/impress/slide_properties_spec.js
index 5a869a821..fb18d99bf 100644
--- a/cypress_test/integration_tests/mobile/impress/slide_properties_spec.js
+++ b/cypress_test/integration_tests/mobile/impress/slide_properties_spec.js
@@ -21,32 +21,8 @@ describe('Changing slide properties.', function() {
});
 
function previewShouldBeFullWhite(fullWhite = true, slideNumber = 1) {
-   cy.get('.preview-frame:nth-of-type(' + (slideNumber + 
1).toString() + ') img')
-   .should(function(preview) {
-   var img = preview[0];
-
-   // Create an offscreen canvas to check the 
preview's pixels
-   var canvas = document.createElement('canvas');
-   canvas.width = img.width;
-   canvas.height = img.height;
-   canvas.getContext('2d').drawImage(img, 0, 0, 
img.width, img.height);
-   var context = canvas.getContext('2d');
-
-   // There is a border around the preview, ignore 
that
-   var ignoredPixels = 2;
-   var pixelData = 
context.getImageData(ignoredPixels, ignoredPixels,
-   img.width - 2 * ignoredPixels,
-   img.height - 2 * ignoredPixels).data;
-
-   var allIsWhite = true;
-   for (var i = 0; i < pixelData.length; ++i) {
-   allIsWhite = allIsWhite && pixelData[i] 
== 255;
-   }
-   if (fullWhite)
-   expect(allIsWhite).to.be.true;
- 

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

2020-06-17 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js |4 
++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 4145a216ecfb45145e0d4df832f0dfd5169e5d70
Author: Tamás Zolnai 
AuthorDate: Wed Jun 17 14:45:48 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Wed Jun 17 16:02:04 2020 +0200

cypress: these test are failing recently.

Change-Id: Ifd947fb8135352816dd6aaf525cf2a384904e54e
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96530
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git 
a/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js 
b/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js
index 2b3ae2e85..16d2703e8 100644
--- a/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js
+++ b/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js
@@ -208,7 +208,7 @@ describe('Impress insertion wizard.', function() {
helper.expectTextForClipboard('Tap to edit text');
});
 
-   it('Insert date field (fixed).', function() {
+   it.skip('Insert date field (fixed).', function() {
mobileHelper.openInsertionWizard();
 
cy.contains('.menu-entry-with-icon', 'More Fields...')
@@ -228,7 +228,7 @@ describe('Impress insertion wizard.', function() {
helper.matchClipboardText(regex);
});
 
-   it('Insert date field (variable).', function() {
+   it.skip('Insert date field (variable).', function() {
mobileHelper.openInsertionWizard();
 
cy.contains('.menu-entry-with-icon', 'More Fields...')
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-06-15 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js |   84 
++
 loleaflet/src/layer/tile/TileLayer.js   |6 
 2 files changed, 89 insertions(+), 1 deletion(-)

New commits:
commit 9102a8aaf51f49110a8c555fe4ab658873f47b03
Author: Tamás Zolnai 
AuthorDate: Mon Jun 15 14:43:14 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Mon Jun 15 15:33:32 2020 +0200

cypress: test download as options (writer, mobile).

We can't test the actual download:
https://github.com/cypress-io/cypress/issues/949

What we test is that we get a proper URL, after triggered
the download as menu item. This src attribute is set after
the core exported the file and sent back the URL for it.

We avoid download for test, because we can't control the
download folder. It's better not to save files without
clean up. Downloading is not working in headless mode
anyway.

Change-Id: I93664be7f55e4df863448adc734fa9cfc7b3638f
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96352
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git 
a/cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js 
b/cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js
index c024c286b..7ad042a2c 100644
--- a/cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js
@@ -18,6 +18,90 @@ describe('Trigger hamburger menu options.', function() {
helper.afterAll(testFileName);
});
 
+   it('Download as PDF', function() {
+   mobileHelper.openHamburgerMenu();
+
+   cy.contains('.menu-entry-with-icon', 'Download as')
+   .click();
+
+   cy.contains('.menu-entry-with-icon', 'PDF Document (.pdf)')
+   .click();
+
+   cy.get('iframe')
+   .should('have.attr', 'data-src')
+   .should('contain', 'document.pdf');
+   });
+
+   it('Download as ODT', function() {
+   mobileHelper.openHamburgerMenu();
+
+   cy.contains('.menu-entry-with-icon', 'Download as')
+   .click();
+
+   cy.contains('.menu-entry-with-icon', 'ODF text document (.odt)')
+   .click();
+
+   cy.get('iframe')
+   .should('have.attr', 'data-src')
+   .should('contain', 'document.odt');
+   });
+
+   it('Download as DOC', function() {
+   mobileHelper.openHamburgerMenu();
+
+   cy.contains('.menu-entry-with-icon', 'Download as')
+   .click();
+
+   cy.contains('.menu-entry-with-icon', 'Word 2003 Document 
(.doc)')
+   .click();
+
+   cy.get('iframe')
+   .should('have.attr', 'data-src')
+   .should('contain', 'document.doc');
+   });
+
+   it('Download as DOCX', function() {
+   mobileHelper.openHamburgerMenu();
+
+   cy.contains('.menu-entry-with-icon', 'Download as')
+   .click();
+
+   cy.contains('.menu-entry-with-icon', 'Word Document (.docx)')
+   .click();
+
+   cy.get('iframe')
+   .should('have.attr', 'data-src')
+   .should('contain', 'document.docx');
+   });
+
+   it('Download as RTF', function() {
+   mobileHelper.openHamburgerMenu();
+
+   cy.contains('.menu-entry-with-icon', 'Download as')
+   .click();
+
+   cy.contains('.menu-entry-with-icon', 'Rich Text (.rtf)')
+   .click();
+
+   cy.get('iframe')
+   .should('have.attr', 'data-src')
+   .should('contain', 'document.rtf');
+   });
+
+   it('Download as EPUB', function() {
+   mobileHelper.openHamburgerMenu();
+
+   cy.contains('.menu-entry-with-icon', 'Download as')
+   .click();
+
+   cy.contains('.menu-entry-with-icon', 'EPUB (.epub)')
+   .click();
+
+   cy.get('iframe')
+   .should('have.attr', 'data-src')
+   .should('contain', 'document.epub');
+   });
+
it('Undo/redo.', function() {
// Type a new character
cy.get('textarea.clipboard')
diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index 7df2df248..2275206a5 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -934,7 +934,11 @@ L.TileLayer = L.GridLayer.extend({
this._map.fire('slidedownloadready', {url: url});
}
else if 

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

2020-06-15 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js |  226 
++
 1 file changed, 226 insertions(+)

New commits:
commit f16e27c0490aee59bb1e67af3561e9fbaad8d1ff
Author: Tamás Zolnai 
AuthorDate: Mon Jun 15 13:21:33 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Mon Jun 15 14:44:19 2020 +0200

cypress: add tests for Edit menu items (writer, mobile).

Change-Id: Iec7c244f34f1c7c7bbf55c22db71d72278553cef
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96329
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git 
a/cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js 
b/cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js
index e42512c3d..c024c286b 100644
--- a/cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js
@@ -18,6 +18,232 @@ describe('Trigger hamburger menu options.', function() {
helper.afterAll(testFileName);
});
 
+   it('Undo/redo.', function() {
+   // Type a new character
+   cy.get('textarea.clipboard')
+   .type('{q}');
+
+   writerMobileHelper.selectAllMobile();
+
+   cy.get('#copy-paste-container p')
+   .should('contain.text', 'q');
+
+   // Undo
+   mobileHelper.openHamburgerMenu();
+
+   cy.contains('.menu-entry-with-icon', 'Edit')
+   .click();
+
+   cy.contains('.menu-entry-with-icon', 'Undo')
+   .click();
+
+   writerMobileHelper.selectAllMobile();
+
+   cy.get('#copy-paste-container p')
+   .should('not.contain.text', 'q');
+
+   // Redo
+   mobileHelper.openHamburgerMenu();
+
+   cy.contains('.menu-entry-with-icon', 'Edit')
+   .click();
+
+   cy.contains('.menu-entry-with-icon', 'Redo')
+   .click();
+
+   writerMobileHelper.selectAllMobile();
+
+   cy.get('#copy-paste-container p')
+   .should('contain.text', 'q');
+   });
+
+   it('Repair.', function() {
+   // First change
+   cy.get('textarea.clipboard')
+   .type('{q}');
+
+   // Second change
+   cy.get('textarea.clipboard')
+   .type('{w}');
+
+   writerMobileHelper.selectAllMobile();
+
+   cy.get('#copy-paste-container p')
+   .should('contain.text', 'qw');
+
+   // Undo
+   mobileHelper.openHamburgerMenu();
+
+   cy.contains('.menu-entry-with-icon', 'Edit')
+   .click();
+
+   cy.contains('.menu-entry-with-icon', 'Undo')
+   .click();
+
+   writerMobileHelper.selectAllMobile();
+
+   cy.get('#copy-paste-container p')
+   .should('not.contain.text', 'w');
+
+   // Revert one undo step via Repair
+   mobileHelper.openHamburgerMenu();
+
+   cy.contains('.menu-entry-with-icon', 'Edit')
+   .click();
+
+   cy.contains('.menu-entry-with-icon', 'Repair')
+   .click();
+
+   cy.get('.leaflet-popup-content')
+   .should('be.visible');
+
+   cy.get('.leaflet-popup-content table tr:nth-of-type(2)')
+   .should('contain.text', 'Redo');
+
+   cy.get('.leaflet-popup-content table tr:nth-of-type(3)')
+   .should('contain.text', 'Undo');
+
+   cy.get('.leaflet-popup-content table tr:nth-of-type(2)')
+   .click();
+
+   cy.get('.leaflet-popup-content input[value=\'Jump to state\']')
+   .click();
+
+   writerMobileHelper.selectAllMobile();
+
+   cy.get('#copy-paste-container p')
+   .should('contain.text', 'qw');
+
+   // Revert to the initial state via Repair
+   mobileHelper.openHamburgerMenu();
+
+   cy.contains('.menu-entry-with-icon', 'Edit')
+   .click();
+
+   cy.contains('.menu-entry-with-icon', 'Repair')
+   .click();
+
+   cy.get('.leaflet-popup-content')
+   .should('be.visible');
+
+   cy.get('.leaflet-popup-content table tr:nth-of-type(2)')
+   .should('contain.text', 'Undo');
+
+   cy.get('.leaflet-popup-content table tr:nth-of-type(3)')
+   .should('contain.text', 'Undo');
+
+   cy.get('.leaflet-popup-content table tr:nth-of-type(3)')
+   .click();
+
+   

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

2020-06-11 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/desktop/calc/focus_spec.js |6 ++
 cypress_test/plugins/blacklists.js|3 ---
 2 files changed, 6 insertions(+), 3 deletions(-)

New commits:
commit c0e7b862da688d1f99dd88dc0e6229de9967008b
Author: Tamás Zolnai 
AuthorDate: Thu Jun 11 20:55:21 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Thu Jun 11 21:24:36 2020 +0200

cypress: update desktop/calc/focus_spec.js

Clicking on the formulabar is not a reliable way to move
the cursor to a specific text position.

Change-Id: I9ea48f4591707531a3dfdfb02b18d6fcb08921a6
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96163
Tested-by: Jenkins CollaboraOffice 
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/desktop/calc/focus_spec.js 
b/cypress_test/integration_tests/desktop/calc/focus_spec.js
index 0c1da24c5..7e27890b7 100644
--- a/cypress_test/integration_tests/desktop/calc/focus_spec.js
+++ b/cypress_test/integration_tests/desktop/calc/focus_spec.js
@@ -60,6 +60,12 @@ describe('Calc focus tests', function() {
calcHelper.clickOnFirstCell();
calcHelper.clickFormulaBar();
helper.assertCursorAndFocus();
+
+   // Move cursor before text2
+   cy.get('textarea.clipboard').type('{end}');
+   for (var i = 0; i < 6; i++)
+   cy.get('textarea.clipboard').type('{leftarrow}');
+
var text3 = ' BAZINGA';
helper.typeText('textarea.clipboard', text3);
// Validate.
diff --git a/cypress_test/plugins/blacklists.js 
b/cypress_test/plugins/blacklists.js
index 00f8175f5..afbda2c26 100644
--- a/cypress_test/plugins/blacklists.js
+++ b/cypress_test/plugins/blacklists.js
@@ -44,9 +44,6 @@ var testBlackLists = {
],
 
'cp-6-4': [
-   ['desktop/calc/focus_spec.js',
-   []
-   ],
['mobile/calc/apply_font_spec.js',
[
'Apply font size.'
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-06-10 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/impress/apply_paragraph_props_spec.js |  
 49 +-
 cypress_test/plugins/blacklists.js  |  
  3 
 2 files changed, 26 insertions(+), 26 deletions(-)

New commits:
commit 08c20c5620fda7c2d7cfaca97c56118fa2be2924
Author: Tamás Zolnai 
AuthorDate: Wed Jun 10 16:31:12 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Wed Jun 10 17:50:15 2020 +0200

cypress: update impress/apply_paragraph_props_spec.js test.

Change-Id: I8a404f7704fbe2a010b017f48128b1135f6ff8e3
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96050
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git 
a/cypress_test/integration_tests/mobile/impress/apply_paragraph_props_spec.js 
b/cypress_test/integration_tests/mobile/impress/apply_paragraph_props_spec.js
index 408ce035e..43d15d99d 100644
--- 
a/cypress_test/integration_tests/mobile/impress/apply_paragraph_props_spec.js
+++ 
b/cypress_test/integration_tests/mobile/impress/apply_paragraph_props_spec.js
@@ -33,11 +33,14 @@ describe('Apply paragraph properties.', function() {
.should('be.visible');
}
 
-   function openParagraphPropertiesPanel2() {
+   function openListsPropertiesPanel() {
mobileHelper.openMobileWizard();
 
-   cy.get('#Paragraph')
+   cy.get('#ListsPropertyPanel')
.click();
+
+   cy.get('.ui-content.level-0.mobile-wizard')
+   .should('be.visible');
}
 
it('Apply left/right alignment on text shape.', function() {
@@ -156,7 +159,7 @@ describe('Apply paragraph properties.', function() {
cy.get('.leaflet-pane.leaflet-overlay-pane g.Page .BulletChars')
.should('not.exist');
 
-   openParagraphPropertiesPanel();
+   openListsPropertiesPanel();
 
cy.get('#DefaultBullet')
.click();
@@ -172,7 +175,7 @@ describe('Apply paragraph properties.', function() {
cy.get('.leaflet-pane.leaflet-overlay-pane g.Page .TextShape 
tspan')
.should('not.have.attr', 'ooo:numbering-type');
 
-   openParagraphPropertiesPanel();
+   openListsPropertiesPanel();
 
cy.get('#DefaultNumbering')
.click();
@@ -228,7 +231,7 @@ describe('Apply paragraph properties.', function() {
impressMobileHelper.selectTextOfShape();
 
// Set right alignment first
-   openParagraphPropertiesPanel2();
+   openParagraphPropertiesPanel();
 
cy.get('#RightPara')
.click();
@@ -241,7 +244,7 @@ describe('Apply paragraph properties.', function() {
// Set left alignment
impressMobileHelper.selectTextOfShape();
 
-   openParagraphPropertiesPanel2();
+   openParagraphPropertiesPanel();
 
cy.get('#LeftPara')
.click();
@@ -258,7 +261,7 @@ describe('Apply paragraph properties.', function() {
 
impressMobileHelper.selectTextOfShape();
 
-   openParagraphPropertiesPanel2();
+   openParagraphPropertiesPanel();
 
cy.get('#CenterPara')
.click();
@@ -276,7 +279,7 @@ describe('Apply paragraph properties.', function() {
impressMobileHelper.selectTextOfShape();
 
// Set right alignment first
-   openParagraphPropertiesPanel2();
+   openParagraphPropertiesPanel();
 
cy.get('#RightPara')
.click();
@@ -289,7 +292,7 @@ describe('Apply paragraph properties.', function() {
impressMobileHelper.selectTextOfShape();
 
// Then set justified alignment
-   openParagraphPropertiesPanel2();
+   openParagraphPropertiesPanel();
 
cy.get('#JustifyPara')
.click();
@@ -307,7 +310,7 @@ describe('Apply paragraph properties.', function() {
impressMobileHelper.selectTextOfShape();
 
// Set bottom alignment first
-   openParagraphPropertiesPanel2();
+   openParagraphPropertiesPanel();
 
cy.get('#CellVertBottom')
.click();
@@ -320,7 +323,7 @@ describe('Apply paragraph properties.', function() {
impressMobileHelper.selectTextOfShape();
 
// Then set top alignment
-   openParagraphPropertiesPanel2();
+   openParagraphPropertiesPanel();
 
cy.get('#CellVertTop')
.click();
@@ -337,7 +340,7 @@ describe('Apply paragraph properties.', function() {
 
impressMobileHelper.selectTextOfShape();
 
-   

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

2020-06-10 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/impress/apply_font_spec.js |   28 
+-
 cypress_test/plugins/blacklists.js   |   15 -
 2 files changed, 26 insertions(+), 17 deletions(-)

New commits:
commit 0e38bc60174a33903e110ea79b036bd4c02b16c6
Author: Tamás Zolnai 
AuthorDate: Wed Jun 10 15:41:18 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Wed Jun 10 17:21:38 2020 +0200

cypress: update impress/apply_font_spec.js test.

Change-Id: Ie305e3f29115ab88c019445e61a9961b7a952904
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96029
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

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 bc407e0e6..8412faef7 100644
--- a/cypress_test/integration_tests/mobile/impress/apply_font_spec.js
+++ b/cypress_test/integration_tests/mobile/impress/apply_font_spec.js
@@ -280,7 +280,7 @@ describe('Apply font on text and on text shape.', 
function() {
it('Apply bold on selected text.', function() {
impressMobileHelper.selectTextOfShape();
 
-   mobileHelper.openMobileWizard();
+   openTextPropertiesPanel();
 
cy.get('#Bold')
.click();
@@ -294,7 +294,7 @@ describe('Apply font on text and on text shape.', 
function() {
it('Apply italic on selected text.', function() {
impressMobileHelper.selectTextOfShape();
 
-   mobileHelper.openMobileWizard();
+   openTextPropertiesPanel();
 
cy.get('#Italic')
.click();
@@ -308,7 +308,7 @@ describe('Apply font on text and on text shape.', 
function() {
it('Apply underline on selected text.', function() {
impressMobileHelper.selectTextOfShape();
 
-   mobileHelper.openMobileWizard();
+   openTextPropertiesPanel();
 
cy.get('#Underline')
.click();
@@ -322,7 +322,7 @@ describe('Apply font on text and on text shape.', 
function() {
it('Apply strikeout on selected text.', function() {
impressMobileHelper.selectTextOfShape();
 
-   mobileHelper.openMobileWizard();
+   openTextPropertiesPanel();
 
cy.get('#Strikeout')
.click();
@@ -336,7 +336,7 @@ describe('Apply font on text and on text shape.', 
function() {
it('Apply shadowed on selected text.', function() {
impressMobileHelper.selectTextOfShape();
 
-   mobileHelper.openMobileWizard();
+   openTextPropertiesPanel();
 
cy.get('#Shadowed')
.click();
@@ -350,7 +350,7 @@ describe('Apply font on text and on text shape.', 
function() {
it('Change font name of selected text.', function() {
impressMobileHelper.selectTextOfShape();
 
-   mobileHelper.openMobileWizard();
+   openTextPropertiesPanel();
 
cy.get('#fontnamecombobox')
.click();
@@ -373,7 +373,7 @@ describe('Apply font on text and on text shape.', 
function() {
it('Change font size of selected text.', function() {
impressMobileHelper.selectTextOfShape();
 
-   mobileHelper.openMobileWizard();
+   openTextPropertiesPanel();
 
cy.get('.leaflet-pane.leaflet-overlay-pane g.Page 
.TextParagraph')
.should('have.attr', 'font-size', '635px');
@@ -399,7 +399,7 @@ describe('Apply font on text and on text shape.', 
function() {
it('Grow font size of selected text.', function() {
impressMobileHelper.selectTextOfShape();
 
-   mobileHelper.openMobileWizard();
+   openTextPropertiesPanel();
 
cy.get('.leaflet-pane.leaflet-overlay-pane g.Page 
.TextParagraph')
.should('have.attr', 'font-size', '635px');
@@ -416,7 +416,7 @@ describe('Apply font on text and on text shape.', 
function() {
it('Shrink font size of selected text.', function() {
impressMobileHelper.selectTextOfShape();
 
-   mobileHelper.openMobileWizard();
+   openTextPropertiesPanel();
 
cy.get('.leaflet-pane.leaflet-overlay-pane g.Page 
.TextParagraph')
.should('have.attr', 'font-size', '635px');
@@ -436,7 +436,7 @@ describe('Apply font on text and on text shape.', 
function() {
 
impressMobileHelper.selectTextOfShape();
 
-   mobileHelper.openMobileWizard();
+   openTextPropertiesPanel();
 
cy.get('.leaflet-pane.leaflet-overlay-pane g.Page 
.TextParagraph')
.should('not.have.attr', 'font-color');
@@ -455,7 +455,7 @@ describe('Apply font 

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

2020-06-08 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/desktop/writer/form_field_spec.js |8 

 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit b289a2d3c589e3ddf5f49fef60439f56f46ca804
Author: Tamás Zolnai 
AuthorDate: Mon Jun 8 21:38:30 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Tue Jun 9 00:05:08 2020 +0200

cypress: allow equality here.

Change-Id: I4c08590c9ea062467d0112e0877bf1a018623269
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95858
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/desktop/writer/form_field_spec.js 
b/cypress_test/integration_tests/desktop/writer/form_field_spec.js
index 2b17e3049..4c37068f9 100644
--- a/cypress_test/integration_tests/desktop/writer/form_field_spec.js
+++ b/cypress_test/integration_tests/desktop/writer/form_field_spec.js
@@ -49,10 +49,10 @@ describe('Form field button tests.', function() {
.should(function(frames) {

expect(frames).to.have.lengthOf(1);
var frameRect = 
frames[0].getBoundingClientRect();
-   
expect(frameRect.top).to.be.lessThan(cursorRect.top);
-   
expect(frameRect.bottom).to.be.greaterThan(cursorRect.bottom);
-   
expect(frameRect.left).to.be.lessThan(cursorRect.left);
-   
expect(frameRect.right).to.be.greaterThan(cursorRect.right);
+   
expect(frameRect.top).to.at.most(cursorRect.top);
+   
expect(frameRect.bottom).to.be.at.least(cursorRect.bottom);
+   
expect(frameRect.left).to.at.most(cursorRect.left);
+   
expect(frameRect.right).to.be.at.least(cursorRect.right);
});
});
}
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: cypress_test/integration_tests cypress_test/package.json cypress_test/plugins

2020-06-06 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/calc/number_format_spec.js   
 |   29 ---
 
cypress_test/integration_tests/mobile/writer/apply_paragraph_properties_spec.js 
|   15 -
 cypress_test/integration_tests/mobile/writer/insert_object_spec.js 
 |8 -
 cypress_test/integration_tests/mobile/writer/shape_properties_spec.js  
 |   24 ---
 cypress_test/integration_tests/mobile/writer/table_properties_spec.js  
 |   80 --
 cypress_test/package.json  
 |1 
 cypress_test/plugins/blacklists.js 
 |   47 +
 cypress_test/plugins/index.js  
 |   34 
 8 files changed, 86 insertions(+), 152 deletions(-)

New commits:
commit 5149305dbaae3b3b0178439f74e57718cdb1edaf
Author: Tamás Zolnai 
AuthorDate: Fri Jun 5 16:42:23 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Sat Jun 6 17:53:37 2020 +0200

cypress: better way of filter out tests based on core version.

We use cypress-select-tests to filter out tests before
the tests are started. One advantage is that these tests
are showed as skipped in the log and also beforeAll() is
not called for these test cases which can speed things up.

Also we can avoid to add too much noise to the test code.
When we are working with more branches, we can just add
blacklists separately for all branches.

Change-Id: Ie7808614e42a19a0820f372720cc391511e165f5
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95585
Tested-by: Jenkins CollaboraOffice 
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/mobile/calc/number_format_spec.js 
b/cypress_test/integration_tests/mobile/calc/number_format_spec.js
index bda3bd847..1b2336068 100644
--- a/cypress_test/integration_tests/mobile/calc/number_format_spec.js
+++ b/cypress_test/integration_tests/mobile/calc/number_format_spec.js
@@ -49,11 +49,8 @@ describe('Apply number formatting.', function() {
it('Select percent format from list.', function() {
selectFormatting('Percent');
 
-   // TODO: Why this item is missing with core/master
-   // In desktop LO, sidebar contains this item.
-   if (helper.getLOVersion() !== 'master')
-   cy.get('#NumberFormatPercentimg')
-   .should('have.class', 'selected');
+   cy.get('#NumberFormatPercentimg')
+   .should('have.class', 'selected');
 
// Decimal and leading zeros are changed.
cy.get('#decimalplaces input')
@@ -72,11 +69,6 @@ describe('Apply number formatting.', function() {
});
 
it('Push percent button.', function() {
-   // TODO: Why this item is missing with core/master
-   // In desktop LO, sidebar contains this item.
-   if (helper.getLOVersion() === 'master')
-   return;
-
// Change to percent
cy.get('#NumberFormatPercent')
.click();
@@ -106,11 +98,8 @@ describe('Apply number formatting.', function() {
it('Select currency format from list.', function() {
selectFormatting('Currency');
 
-   // TODO: Why this item is missing with core/master
-   // In desktop LO, sidebar contains this item.
-   if (helper.getLOVersion() !== 'master')
-   cy.get('#NumberFormatCurrencyimg')
-   .should('have.class', 'selected');
+   cy.get('#NumberFormatCurrencyimg')
+   .should('have.class', 'selected');
 
// Decimal and leading zeros are changed.
cy.get('#decimalplaces input')
@@ -129,11 +118,6 @@ describe('Apply number formatting.', function() {
});
 
it('Push currency button.', function() {
-   // TODO: Why this item is missing with core/master
-   // In desktop LO, sidebar contains this item.
-   if (helper.getLOVersion() === 'master')
-   return;
-
// Change to currency
cy.get('#NumberFormatCurrency')
.click();
@@ -161,11 +145,6 @@ describe('Apply number formatting.', function() {
});
 
it('Push number button.', function() {
-   // TODO: Why this item is missing with core/master
-   // In desktop LO, sidebar contains this item.
-   if (helper.getLOVersion() === 'master')
-   return;
-
// Change to currency first
cy.get('#NumberFormatCurrency')
.click();
diff --git 
a/cypress_test/integration_tests/mobile/writer/apply_paragraph_properties_spec.js
 

[Libreoffice-commits] online.git: cypress_test/integration_tests cypress_test/Makefile.am

2020-06-05 Thread Tamás Zolnai (via logerrit)
 cypress_test/Makefile.am   
 |6 -
 cypress_test/integration_tests/common/helper.js
 |   15 +++
 cypress_test/integration_tests/common/mobile_helper.js 
 |   41 --
 cypress_test/integration_tests/mobile/calc/apply_font_spec.js  
 |4 
 cypress_test/integration_tests/mobile/calc/calc_mobile_helper.js   
 |6 -
 cypress_test/integration_tests/mobile/calc/number_format_spec.js   
 |   12 +-
 cypress_test/integration_tests/mobile/writer/apply_font_spec.js
 |4 
 
cypress_test/integration_tests/mobile/writer/apply_paragraph_properties_spec.js 
|8 -
 cypress_test/integration_tests/mobile/writer/insert_object_spec.js 
 |6 -
 cypress_test/integration_tests/mobile/writer/shape_properties_spec.js  
 |   14 +--
 cypress_test/integration_tests/mobile/writer/table_properties_spec.js  
 |   34 
 11 files changed, 63 insertions(+), 87 deletions(-)

New commits:
commit 3543df543041f19d5a8d6cac5254aa9b37ebe3cc
Author: Tamás Zolnai 
AuthorDate: Fri Jun 5 05:09:21 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Fri Jun 5 16:33:26 2020 +0200

cypress: better way of detecting core version.

We need this information earlier before we load the
test document. We can use call LO binary to get
the version string.

Change-Id: I72927df1fd79ff12906b55376c3474aa973dce07
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95584
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/Makefile.am b/cypress_test/Makefile.am
index ba75d9a15..77b270325 100644
--- a/cypress_test/Makefile.am
+++ b/cypress_test/Makefile.am
@@ -33,6 +33,8 @@ DISPLAY_NUMBER = 100
 HEADLESS_BUILD := $(findstring Command failed,$(shell xhost > /dev/null 2>&1 
|| echo "Command failed, so we are in a headless environment."))
 export DISPLAY=$(if $(HEADLESS_BUILD),:$(DISPLAY_NUMBER),$(shell echo 
$$DISPLAY))
 
+CORE_VERSION := $(shell "@LO_PATH@"/program/soffice.bin --version 2> /dev/null)
+
 if ENABLE_DEBUG
 FILTER_DEBUG=cypress:electron,cypress:launcher
 export DEBUG=$(if $(ENABLE_LOGGING),$(FILTER_DEBUG),)
@@ -157,11 +159,11 @@ endef
 
 DESKTOP_CONFIG = \
--config 
integrationFolder=$(DESKTOP_TEST_FOLDER),supportFile=$(SUPPORT_FILE),userAgent=$(DESKTOP_USER_AGENT)
 \
-   --env 
DATA_FOLDER=$(DESKTOP_DATA_FOLDER),WORKDIR=$(DESKTOP_WORKDIR),WSD_VERSION_HASH=$(WSD_VERSION_HASH),SERVER_PORT=$(FREE_PORT)
+   --env 
DATA_FOLDER=$(DESKTOP_DATA_FOLDER),WORKDIR=$(DESKTOP_WORKDIR),WSD_VERSION_HASH=$(WSD_VERSION_HASH),SERVER_PORT=$(FREE_PORT),LO_CORE_VERSION="$(CORE_VERSION)"
 
 MOBILE_CONFIG = \
--config 
integrationFolder=$(MOBILE_TEST_FOLDER),supportFile=$(SUPPORT_FILE),userAgent=$(MOBILE_USER_AGENT)
 \
-   --env 
DATA_FOLDER=$(MOBILE_DATA_FOLDER),WORKDIR=$(MOBILE_WORKDIR),WSD_VERSION_HASH=$(WSD_VERSION_HASH),SERVER_PORT=$(FREE_PORT)
+   --env 
DATA_FOLDER=$(MOBILE_DATA_FOLDER),WORKDIR=$(MOBILE_WORKDIR),WSD_VERSION_HASH=$(WSD_VERSION_HASH),SERVER_PORT=$(FREE_PORT),LO_CORE_VERSION="$(CORE_VERSION)"
 
 define run_interactive_test
$(if $(2),\
diff --git a/cypress_test/integration_tests/common/helper.js 
b/cypress_test/integration_tests/common/helper.js
index fc20af278..f8bdd7209 100644
--- a/cypress_test/integration_tests/common/helper.js
+++ b/cypress_test/integration_tests/common/helper.js
@@ -148,8 +148,6 @@ function matchClipboardText(regexp) {
 function beforeAllDesktop(fileName, subFolder) {
var mobile = false;
loadTestDoc(fileName, subFolder, mobile);
-
-   // detectLOCoreVersion(); //TODO: implement Core version check.
 }
 
 function afterAll(fileName) {
@@ -232,6 +230,18 @@ function typeText(selector, text, delayMs=0) {
}
 }
 
+function getLOVersion() {
+   var versionString = Cypress.env('LO_CORE_VERSION');
+   if (versionString.includes('Collabora')) {
+   if (versionString.includes(' 6.2.')) {
+   return 'cp-6-2';
+   } else if (versionString.includes(' 6.4.')) {
+   return 'cp-6-4';
+   }
+   }
+   return 'master';
+}
+
 module.exports.loadTestDoc = loadTestDoc;
 module.exports.assertCursorAndFocus = assertCursorAndFocus;
 module.exports.assertNoKeyboardInput = assertNoKeyboardInput;
@@ -248,3 +258,4 @@ module.exports.isImpress = isImpress;
 module.exports.isWriter = isWriter;
 module.exports.beforeAllDesktop = beforeAllDesktop;
 module.exports.typeText = typeText;
+module.exports.getLOVersion = getLOVersion;
diff --git a/cypress_test/integration_tests/common/mobile_helper.js 
b/cypress_test/integration_tests/common/mobile_helper.js
index 779c7fb29..8627cbd55 100644
--- a/cypress_test/integration_tests/common/mobile_helper.js
+++ 

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

2020-06-04 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/impress/apply_font_spec.js |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 2063d2bec668ebe5d908429be0481a2b43e28aaf
Author: Tamás Zolnai 
AuthorDate: Thu Jun 4 19:47:23 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Thu Jun 4 20:14:51 2020 +0200

cypress: fix unstable test.

Change-Id: Ibfc0f1d6f4e69ea17555ca259c57b3304115711d
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95532
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

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 04a390887..bc407e0e6 100644
--- a/cypress_test/integration_tests/mobile/impress/apply_font_spec.js
+++ b/cypress_test/integration_tests/mobile/impress/apply_font_spec.js
@@ -469,6 +469,7 @@ describe('Apply font on text and on text shape.', 
function() {
 
// TODO: highlight color is not in the SVG
// At least check the mobile wizard's state
+   cy.wait(400);
impressMobileHelper.selectTextOfShape();
 
mobileHelper.openMobileWizard();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-06-04 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/impress/apply_font_spec.js|  
 92 +
 cypress_test/integration_tests/mobile/impress/apply_paragraph_props_spec.js |  
102 ++
 cypress_test/integration_tests/mobile/impress/impress_mobile_helper.js  |  
 73 +++
 cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js  |  
 50 +---
 4 files changed, 131 insertions(+), 186 deletions(-)

New commits:
commit 8e9627a033f9e53a4e1b382678d634a926d88cf8
Author: Tamás Zolnai 
AuthorDate: Thu Jun 4 11:18:40 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Thu Jun 4 12:05:17 2020 +0200

cypress: extract some shared code in impress tests.

Change-Id: I2683e894bccd46cdd847f95f8298595c733486a9
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95494
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

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 5540067ad..04a390887 100644
--- a/cypress_test/integration_tests/mobile/impress/apply_font_spec.js
+++ b/cypress_test/integration_tests/mobile/impress/apply_font_spec.js
@@ -1,7 +1,8 @@
-/* global describe it cy beforeEach require expect afterEach*/
+/* global describe it cy beforeEach require afterEach*/
 
 var helper = require('../../common/helper');
 var mobileHelper = require('../../common/mobile_helper');
+var impressMobileHelper = require('./impress_mobile_helper');
 
 describe('Apply font on text and on text shape.', function() {
var testFileName = 'apply_font.odp';
@@ -11,72 +12,15 @@ describe('Apply font on text and on text shape.', 
function() {
 
mobileHelper.enableEditingMobile();
 
-   selectTextShape();
+   impressMobileHelper.selectTextShapeInTheCenter();
});
 
afterEach(function() {
helper.afterAll(testFileName);
});
 
-   function selectTextShape() {
-   // Click on the center of the slide to select the text shape 
there
-   cy.get('#document-container')
-   .then(function(items) {
-   expect(items).to.have.length(1);
-   var XPos = 
(items[0].getBoundingClientRect().left + 
items[0].getBoundingClientRect().right) / 2;
-   var YPos = 
(items[0].getBoundingClientRect().top + 
items[0].getBoundingClientRect().bottom) / 2;
-   cy.get('body')
-   .click(XPos, YPos);
-   });
-
-   cy.get('.leaflet-drag-transform-marker')
-   .should('be.visible');
-
-   cy.get('.leaflet-pane.leaflet-overlay-pane g.Page g')
-   .should('have.class', 'com.sun.star.drawing.TextShape');
-   }
-
-   function selectTextOfShape() {
-   // Double click onto the selected shape
-   cy.get('svg g .leaflet-interactive')
-   .then(function(items) {
-   expect(items).to.have.length(1);
-   var XPos = 
(items[0].getBoundingClientRect().left + 
items[0].getBoundingClientRect().right) / 2;
-   var YPos = 
(items[0].getBoundingClientRect().top + 
items[0].getBoundingClientRect().bottom) / 2;
-   cy.get('body')
-   .dblclick(XPos, YPos);
-   });
-
-   cy.get('.leaflet-cursor.blinking-cursor')
-   .should('exist');
-
-   helper.selectAllText(false);
-   }
-
function triggerNewSVG() {
-   mobileHelper.closeMobileWizard();
-
-   // Remove selection first with clicking next to the rotate 
handler
-   cy.get('.transform-handler--rotate')
-   .then(function(items) {
-   var XPos = 
items[0].getBoundingClientRect().left - 10;
-   var YPos = items[0].getBoundingClientRect().top;
-   cy.get('body')
-   .click(XPos, YPos);
-
-   cy.get('body')
-   .dblclick(XPos, YPos);
-   });
-
-   cy.get('.leaflet-drag-transform-marker')
-   .should('not.exist');
-
-   // If we click two fast on shape again
-   // then it steps into edit mode
-   cy.wait(200);
-
-   // Select text shape again which will retrigger a new SVG from 
core
-   selectTextShape();
+   impressMobileHelper.triggerNewSVGForShapeInTheCenter();
}
 
function openTextPropertiesPanel() {
@@ -334,7 +278,7 @@ describe('Apply font on text and on text shape.', 

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

2020-06-04 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/impress/apply_font_spec.js |   25 
--
 1 file changed, 20 insertions(+), 5 deletions(-)

New commits:
commit 7705ece999c0be69448a12cd21d23bb8442bfd2e
Author: Tamás Zolnai 
AuthorDate: Thu Jun 4 10:56:01 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Thu Jun 4 11:29:25 2020 +0200

cypress: finish test for changing highlight color in Impress (mobile)

Unfortunately, the core generated SVG does not
have the text highlighting, so we can only check
the state of the mobile wizard.

Change-Id: I49a916113a986568c552917a5fe953165282de30
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95489
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

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 d24b48e75..5540067ad 100644
--- a/cypress_test/integration_tests/mobile/impress/apply_font_spec.js
+++ b/cypress_test/integration_tests/mobile/impress/apply_font_spec.js
@@ -244,7 +244,7 @@ describe('Apply font on text and on text shape.', 
function() {
.should('have.attr', 'fill', 'rgb(106,168,79)');
});
 
-   it.skip('Apply highlight on text shape.', function() {
+   it('Apply highlight on text shape.', function() {
openTextPropertiesPanel();
 
cy.get('.leaflet-pane.leaflet-overlay-pane g.Page 
.TextParagraph')
@@ -255,9 +255,17 @@ describe('Apply font on text and on text shape.', 
function() {
 
mobileHelper.selectFromColorPalette(1, 2, 2);
 
+   cy.get('#CharBackColor .color-sample-selected')
+   .should('have.attr', 'style', 'background-color: 
rgb(204, 0, 0);');
+
triggerNewSVG();
 
-   // TODO: highlight color is not applied on the shape
+   // TODO: highlight color is not in the SVG
+   // At least check the mobile wizard's state
+   openTextPropertiesPanel();
+
+   cy.get('#CharBackColor .color-sample-selected')
+   .should('have.attr', 'style', 'background-color: 
rgb(204, 0, 0);');
});
 
it('Apply superscript on text shape.', function() {
@@ -505,17 +513,24 @@ describe('Apply font on text and on text shape.', 
function() {
 
mobileHelper.openMobileWizard();
 
-   cy.get('.leaflet-pane.leaflet-overlay-pane g.Page 
.TextParagraph')
-   .should('not.have.attr', 'font-color');
-
cy.get('#CharBackColor')
.click();
 
mobileHelper.selectFromColorPalette(1, 2, 2);
 
+   cy.get('#CharBackColor .color-sample-selected')
+   .should('have.attr', 'style', 'background-color: 
rgb(204, 0, 0);');
+
triggerNewSVG();
 
// TODO: highlight color is not in the SVG
+   // At least check the mobile wizard's state
+   selectTextOfShape();
+
+   mobileHelper.openMobileWizard();
+
+   cy.get('#CharBackColor .color-sample-selected')
+   .should('have.attr', 'style', 'background-color: 
rgb(204, 0, 0);');
});
 
it('Apply superscript on selected text.', function() {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-06-04 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/impress/apply_font_spec.js |   14 
+++---
 1 file changed, 11 insertions(+), 3 deletions(-)

New commits:
commit eba17c5f9c198748a8dc1dc07ead301a66b0b43a
Author: Tamás Zolnai 
AuthorDate: Thu Jun 4 10:49:45 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Thu Jun 4 11:29:10 2020 +0200

cypress: finish test for changing text color in Impress (mobile)

Now this feature is fixed.

Change-Id: I274e63f328e626a0e7c9ed262ad7baf651860b90
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95488
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

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 b95eb0ed1..d24b48e75 100644
--- a/cypress_test/integration_tests/mobile/impress/apply_font_spec.js
+++ b/cypress_test/integration_tests/mobile/impress/apply_font_spec.js
@@ -224,7 +224,10 @@ describe('Apply font on text and on text shape.', 
function() {
.should('have.attr', 'font-size', '564px');
});
 
-   it.skip('Apply text color on text shape.', function() {
+   it('Apply text color on text shape.', function() {
+   cy.get('.leaflet-pane.leaflet-overlay-pane g.Page .TextPosition 
tspan')
+   .should('have.attr', 'fill', 'rgb(0,0,0)');
+
openTextPropertiesPanel();
 
cy.get('.leaflet-pane.leaflet-overlay-pane g.Page 
.TextParagraph')
@@ -237,7 +240,8 @@ describe('Apply font on text and on text shape.', 
function() {
 
triggerNewSVG();
 
-   // TODO: text color is not applied on the shape
+   cy.get('.leaflet-pane.leaflet-overlay-pane g.Page .TextPosition 
tspan')
+   .should('have.attr', 'fill', 'rgb(106,168,79)');
});
 
it.skip('Apply highlight on text shape.', function() {
@@ -475,6 +479,9 @@ describe('Apply font on text and on text shape.', 
function() {
});
 
it('Apply text color on selected text.', function() {
+   cy.get('.leaflet-pane.leaflet-overlay-pane g.Page .TextPosition 
tspan')
+   .should('have.attr', 'fill', 'rgb(0,0,0)');
+
selectTextOfShape();
 
mobileHelper.openMobileWizard();
@@ -489,7 +496,8 @@ describe('Apply font on text and on text shape.', 
function() {
 
triggerNewSVG();
 
-   // TODO: text color is not in the SVG
+   cy.get('.leaflet-pane.leaflet-overlay-pane g.Page .TextPosition 
tspan')
+   .should('have.attr', 'fill', 'rgb(106,168,79)');
});
 
it('Apply highlight on selected text.', function() {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-06-04 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/impress/apply_paragraph_props_spec.js |  
354 +-
 1 file changed, 345 insertions(+), 9 deletions(-)

New commits:
commit 8fc6a5762c1136ce1567cb5d4dec9f86424e
Author: Tamás Zolnai 
AuthorDate: Thu Jun 4 10:35:34 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Thu Jun 4 11:01:38 2020 +0200

cypress: more paragraph properties test in impress (mobile)

Change-Id: I439ec6a26a3d5aa3324db7add72ea9003025c753
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95486
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git 
a/cypress_test/integration_tests/mobile/impress/apply_paragraph_props_spec.js 
b/cypress_test/integration_tests/mobile/impress/apply_paragraph_props_spec.js
index 39171c90d..9547122e5 100644
--- 
a/cypress_test/integration_tests/mobile/impress/apply_paragraph_props_spec.js
+++ 
b/cypress_test/integration_tests/mobile/impress/apply_paragraph_props_spec.js
@@ -62,6 +62,23 @@ describe('Apply paragraph properties.', function() {
selectTextShape();
}
 
+   function selectTextOfShape() {
+   // Double click onto the selected shape
+   cy.get('svg g .leaflet-interactive')
+   .then(function(items) {
+   expect(items).to.have.length(1);
+   var XPos = 
(items[0].getBoundingClientRect().left + 
items[0].getBoundingClientRect().right) / 2;
+   var YPos = 
(items[0].getBoundingClientRect().top + 
items[0].getBoundingClientRect().bottom) / 2;
+   cy.get('body')
+   .dblclick(XPos, YPos);
+   });
+
+   cy.get('.leaflet-cursor.blinking-cursor')
+   .should('exist');
+
+   helper.selectAllText(false);
+   }
+
function openParagraphPropertiesPanel() {
mobileHelper.openMobileWizard();
 
@@ -72,7 +89,14 @@ describe('Apply paragraph properties.', function() {
.should('be.visible');
}
 
-   it('Apply left/right alignment.', function() {
+   function openParagraphPropertiesPanel2() {
+   mobileHelper.openMobileWizard();
+
+   cy.get('#Paragraph')
+   .click();
+   }
+
+   it('Apply left/right alignment on text shape.', function() {
cy.get('.leaflet-pane.leaflet-overlay-pane g.Page 
.TextParagraph .TextPosition')
.should('have.attr', 'x', '1400');
 
@@ -99,7 +123,7 @@ describe('Apply paragraph properties.', function() {
.should('have.attr', 'x', '1400');
});
 
-   it('Apply center alignment.', function() {
+   it('Apply center alignment on text shape.', function() {
cy.get('.leaflet-pane.leaflet-overlay-pane g.Page 
.TextParagraph .TextPosition')
.should('have.attr', 'x', '1400');
 
@@ -114,7 +138,7 @@ describe('Apply paragraph properties.', function() {
.should('have.attr', 'x', '12493');
});
 
-   it('Apply justified alignment.', function() {
+   it('Apply justified alignment on text shape.', function() {
cy.get('.leaflet-pane.leaflet-overlay-pane g.Page 
.TextParagraph .TextPosition')
.should('have.attr', 'x', '1400');
 
@@ -141,7 +165,7 @@ describe('Apply paragraph properties.', function() {
.should('have.attr', 'x', '1400');
});
 
-   it('Set top/bottom alignment.', function() {
+   it('Set top/bottom alignment on text shape.', function() {
cy.get('.leaflet-pane.leaflet-overlay-pane g.Page 
.TextParagraph .TextPosition')
.should('have.attr', 'y', '4834');
 
@@ -168,7 +192,7 @@ describe('Apply paragraph properties.', function() {
.should('have.attr', 'y', '4834');
});
 
-   it('Apply center vertical alignment.', function() {
+   it('Apply center vertical alignment on text shape.', function() {
cy.get('.leaflet-pane.leaflet-overlay-pane g.Page 
.TextParagraph .TextPosition')
.should('have.attr', 'y', '4834');
 
@@ -183,7 +207,7 @@ describe('Apply paragraph properties.', function() {
.should('have.attr', 'y', '7823');
});
 
-   it('Apply default bulleting.', function() {
+   it('Apply default bulleting on text shape.', function() {
// We have no bulleting by default
cy.get('.leaflet-pane.leaflet-overlay-pane g.Page .BulletChars')
.should('not.exist');
@@ -199,7 +223,7 @@ describe('Apply paragraph properties.', function() {
.should('exist');
});
 
-   it('Apply default numbering.', function() {
+   it('Apply 

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

2020-06-01 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/desktop/calc/focus_spec.js  
 |   18 ++--
 cypress_test/integration_tests/mobile/calc/alignment_options_spec.js   
 |   34 +++
 cypress_test/integration_tests/mobile/calc/apply_font_spec.js  
 |   26 ++---
 cypress_test/integration_tests/mobile/calc/bottom_toolbar_spec.js  
 |   42 -
 cypress_test/integration_tests/mobile/calc/cell_appearance_spec.js 
 |   38 
 cypress_test/integration_tests/mobile/calc/focus_spec.js   
 |   24 ++---
 cypress_test/integration_tests/mobile/calc/insertion_wizard_spec.js
 |   12 +-
 cypress_test/integration_tests/mobile/calc/number_format_spec.js   
 |   40 -
 cypress_test/integration_tests/mobile/calc/spellchecking_spec.js   
 |   12 +-
 cypress_test/integration_tests/mobile/impress/impress_focus_spec.js
 |   26 ++---
 cypress_test/integration_tests/mobile/writer/apply_font_spec.js
 |   36 
 
cypress_test/integration_tests/mobile/writer/apply_paragraph_properties_spec.js 
|   44 +-
 cypress_test/integration_tests/mobile/writer/bottom_toolbar_spec.js
 |   32 +++
 cypress_test/integration_tests/mobile/writer/insert_field_spec.js  
 |   16 +--
 cypress_test/integration_tests/mobile/writer/insert_formatting_mark_spec.js
 |   16 +--
 cypress_test/integration_tests/mobile/writer/insert_object_spec.js 
 |8 -
 cypress_test/integration_tests/mobile/writer/shape_properties_spec.js  
 |4 
 cypress_test/integration_tests/mobile/writer/spellchecking_spec.js 
 |6 -
 cypress_test/integration_tests/mobile/writer/table_properties_spec.js  
 |   36 
 19 files changed, 235 insertions(+), 235 deletions(-)

New commits:
commit 76e45490a4a71d63d639c63f5bdddee271a6d9bd
Author: Tamás Zolnai 
AuthorDate: Mon Jun 1 14:24:14 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Mon Jun 1 20:43:06 2020 +0200

cypress: consistent naming of helper files.

Change-Id: I245dc0ee49684751f9042ff25e190dd883bca536
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95284
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/common/calc.js 
b/cypress_test/integration_tests/common/calc_helper.js
similarity index 100%
rename from cypress_test/integration_tests/common/calc.js
rename to cypress_test/integration_tests/common/calc_helper.js
diff --git a/cypress_test/integration_tests/common/impress.js 
b/cypress_test/integration_tests/common/impress_helper.js
similarity index 100%
rename from cypress_test/integration_tests/common/impress.js
rename to cypress_test/integration_tests/common/impress_helper.js
diff --git a/cypress_test/integration_tests/desktop/calc/focus_spec.js 
b/cypress_test/integration_tests/desktop/calc/focus_spec.js
index 649d2ceb9..0c1da24c5 100644
--- a/cypress_test/integration_tests/desktop/calc/focus_spec.js
+++ b/cypress_test/integration_tests/desktop/calc/focus_spec.js
@@ -1,7 +1,7 @@
 /* global describe it cy beforeEach require afterEach */
 
 var helper = require('../../common/helper');
-var calc = require('../../common/calc');
+var calcHelper = require('../../common/calc_helper');
 
 describe('Calc focus tests', function() {
var testFileName = 'focus.ods';
@@ -21,10 +21,10 @@ describe('Calc focus tests', function() {
 
// Select the first cell to edit the same one.
// Use the tile's edge to find the first cell's position
-   calc.clickOnFirstCell();
+   calcHelper.clickOnFirstCell();
 
// Click in the formula-bar.
-   calc.clickFormulaBar();
+   calcHelper.clickFormulaBar();
helper.assertCursorAndFocus();
 
// Type some text.
@@ -33,8 +33,8 @@ describe('Calc focus tests', function() {
cy.get('textarea.clipboard').type('{enter}');
 
// Select the first cell to edit the same one.
-   calc.clickOnFirstCell();
-   calc.clickFormulaBar();
+   calcHelper.clickOnFirstCell();
+   calcHelper.clickFormulaBar();
helper.assertCursorAndFocus();
// Validate.
cy.get('textarea.clipboard').type('{ctrl}a');
@@ -44,8 +44,8 @@ describe('Calc focus tests', function() {
 
// Type some more text, at the end.
cy.log('Appending text at the end.');
-   calc.clickOnFirstCell();
-   calc.clickFormulaBar();
+   calcHelper.clickOnFirstCell();
+   calcHelper.clickFormulaBar();
helper.assertCursorAndFocus();
var text2 = ', this is a test.';
helper.typeText('textarea.clipboard', text2);
@@ -57,8 +57,8 @@ describe('Calc 

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

2020-06-01 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/common/mobile_helper.js 
 |   18 ++
 cypress_test/integration_tests/mobile/calc/apply_font_spec.js  
 |6 ---
 cypress_test/integration_tests/mobile/calc/bottom_toolbar_spec.js  
 |   12 +-
 cypress_test/integration_tests/mobile/calc/cell_appearance_spec.js 
 |   12 +-
 cypress_test/integration_tests/mobile/impress/apply_font_spec.js   
 |   18 +-
 cypress_test/integration_tests/mobile/impress/slide_properties_spec.js 
 |   18 +-
 cypress_test/integration_tests/mobile/writer/apply_font_spec.js
 |   18 +-
 
cypress_test/integration_tests/mobile/writer/apply_paragraph_properties_spec.js 
|9 -
 cypress_test/integration_tests/mobile/writer/bottom_toolbar_spec.js
 |6 +--
 9 files changed, 33 insertions(+), 84 deletions(-)

New commits:
commit d261a52fa2c3e1c08aea391b5819452da8e18f93
Author: Tamás Zolnai 
AuthorDate: Mon Jun 1 12:20:25 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Mon Jun 1 14:09:00 2020 +0200

cypress: extract selectFromColorPalette() method.

Change-Id: I9b9eb135bbd9f9720d01a2ae4f703f374d5660ed
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95272
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/common/mobile_helper.js 
b/cypress_test/integration_tests/common/mobile_helper.js
index d60400d83..779c7fb29 100644
--- a/cypress_test/integration_tests/common/mobile_helper.js
+++ b/cypress_test/integration_tests/common/mobile_helper.js
@@ -226,6 +226,23 @@ function closeInsertionWizard() {
cy.log('Closing insertion wizard - end.');
 }
 
+function selectFromColorPalette(paletteNum, groupNum, colorNum) {
+   cy.log('Selecting a color from the color palette - start.');
+
+   cy.get('#color-picker-' + paletteNum.toString() + '-basic-color-' + 
groupNum.toString())
+   .click();
+
+   if (colorNum !== undefined) {
+   cy.get('#color-picker-' + paletteNum.toString() + '-tint-' + 
colorNum.toString())
+   .click();
+   }
+
+   cy.get('#mobile-wizard-back')
+   .click();
+
+   cy.log('Selecting a color from the color palette - end.');
+}
+
 module.exports.enableEditingMobile = enableEditingMobile;
 module.exports.beforeAllMobile = beforeAllMobile;
 module.exports.longPressOnDocument = longPressOnDocument;
@@ -236,3 +253,4 @@ module.exports.closeMobileWizard = closeMobileWizard;
 module.exports.executeCopyFromContextMenu = executeCopyFromContextMenu;
 module.exports.openInsertionWizard = openInsertionWizard;
 module.exports.closeInsertionWizard = closeInsertionWizard;
+module.exports.selectFromColorPalette = selectFromColorPalette;
diff --git a/cypress_test/integration_tests/mobile/calc/apply_font_spec.js 
b/cypress_test/integration_tests/mobile/calc/apply_font_spec.js
index 4d1294ada..ac5f30545 100644
--- a/cypress_test/integration_tests/mobile/calc/apply_font_spec.js
+++ b/cypress_test/integration_tests/mobile/calc/apply_font_spec.js
@@ -162,11 +162,7 @@ describe('Apply font changes.', function() {
cy.get('#Color')
.click();
 
-   cy.get('#color-picker-0-basic-color-5')
-   .click();
-
-   cy.get('#mobile-wizard-back')
-   .click();
+   mobileHelper.selectFromColorPalette(0, 5);
 
calcHelper.selectAllMobile();
 
diff --git a/cypress_test/integration_tests/mobile/calc/bottom_toolbar_spec.js 
b/cypress_test/integration_tests/mobile/calc/bottom_toolbar_spec.js
index 16f980097..7005e18d5 100644
--- a/cypress_test/integration_tests/mobile/calc/bottom_toolbar_spec.js
+++ b/cypress_test/integration_tests/mobile/calc/bottom_toolbar_spec.js
@@ -96,11 +96,7 @@ describe('Interact with bottom toolbar.', function() {
cy.get('.w2ui-tb-image.w2ui-icon.textcolor')
.click();
 
-   cy.get('#color-picker-0-basic-color-5')
-   .click();
-
-   cy.get('#mobile-wizard-back')
-   .click();
+   mobileHelper.selectFromColorPalette(0, 5);
 
calcHelper.selectAllMobile();
 
@@ -114,11 +110,7 @@ describe('Interact with bottom toolbar.', function() {
cy.get('.w2ui-tb-image.w2ui-icon.backcolor')
.click();
 
-   cy.get('#color-picker-0-basic-color-5')
-   .click();
-
-   cy.get('#mobile-wizard-back')
-   .click();
+   mobileHelper.selectFromColorPalette(0, 5);
 
calcHelper.selectAllMobile();
 
diff --git a/cypress_test/integration_tests/mobile/calc/cell_appearance_spec.js 
b/cypress_test/integration_tests/mobile/calc/cell_appearance_spec.js
index 

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

2020-06-01 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/common/helper.js|   16 
+-
 cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js |   24 
+++---
 2 files changed, 22 insertions(+), 18 deletions(-)

New commits:
commit e362a86764ab13e4d5594f1fa15cd7ea11d87fba
Author: Tamás Zolnai 
AuthorDate: Mon Jun 1 12:04:15 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Mon Jun 1 13:04:30 2020 +0200

cypress: extract matchClipboardText() method.

Change-Id: I15a5121a69b1295508c2ad96e414d5f804e5c397
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95271
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/common/helper.js 
b/cypress_test/integration_tests/common/helper.js
index 39fc09875..fc20af278 100644
--- a/cypress_test/integration_tests/common/helper.js
+++ b/cypress_test/integration_tests/common/helper.js
@@ -122,8 +122,7 @@ function clearAllText() {
.should('not.exist');
 }
 
-// Expects getTextForClipboard return the given
-// plain-text, and asserts equality.
+// Check that the clipboard text matches with the specified text.
 function expectTextForClipboard(expectedPlainText) {
if (isWriter()) {
cy.get('#copy-paste-container p font')
@@ -134,6 +133,18 @@ function expectTextForClipboard(expectedPlainText) {
}
 }
 
+// Check that the clipboard text matches with the
+// passed regular expression.
+function matchClipboardText(regexp) {
+   if (isWriter()) {
+   cy.contains('#copy-paste-container p font', regexp)
+   .should('exist');
+   } else {
+   cy.contains('#copy-paste-container pre', regexp)
+   .should('exist');
+   }
+}
+
 function beforeAllDesktop(fileName, subFolder) {
var mobile = false;
loadTestDoc(fileName, subFolder, mobile);
@@ -228,6 +239,7 @@ module.exports.assertHaveKeyboardInput = 
assertHaveKeyboardInput;
 module.exports.selectAllText = selectAllText;
 module.exports.clearAllText = clearAllText;
 module.exports.expectTextForClipboard = expectTextForClipboard;
+module.exports.matchClipboardText = matchClipboardText;
 module.exports.afterAll = afterAll;
 module.exports.initAliasToNegative = initAliasToNegative;
 module.exports.initAliasToEmptyString = initAliasToEmptyString;
diff --git 
a/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js 
b/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js
index 01cb938fe..1f32f2a33 100644
--- a/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js
+++ b/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js
@@ -237,8 +237,7 @@ describe('Impress insertion wizard.', function() {
 
// Check that we have a date in MM/DD/YY format
var regex = /\d{1,2}[/]\d{1,2}[/]\d{1,2}/;
-   cy.contains('#copy-paste-container pre', regex)
-   .should('exist');
+   helper.matchClipboardText(regex);
});
 
it('Insert date field (variable).', function() {
@@ -258,8 +257,7 @@ describe('Impress insertion wizard.', function() {
 
// Check that we have a date in MM/DD/YY format
var regex = /\d{1,2}[/]\d{1,2}[/]\d{1,2}/;
-   cy.contains('#copy-paste-container pre', regex)
-   .should('exist');
+   helper.matchClipboardText(regex);
});
 
it('Insert time field (fixed).', function() {
@@ -279,8 +277,7 @@ describe('Impress insertion wizard.', function() {
 
// Check that we have a time in HH/MM/SS format
var regex = /\d{1,2}[:]\d{1,2}[:]\d{1,2}/;
-   cy.contains('#copy-paste-container pre', regex)
-   .should('exist');
+   helper.matchClipboardText(regex);
});
 
it('Insert time field (variable).', function() {
@@ -300,8 +297,7 @@ describe('Impress insertion wizard.', function() {
 
// Check that we have a time in HH/MM/SS format
var regex = /\d{1,2}[:]\d{1,2}[:]\d{1,2}/;
-   cy.contains('#copy-paste-container pre', regex)
-   .should('exist');
+   helper.matchClipboardText(regex);
});
 
it('Insert slide number.', function() {
@@ -406,8 +402,7 @@ describe('Impress insertion wizard.', function() {
 
// Check that we have a date in MM/DD/YY format
var regex = /\d{1,2}[/]\d{1,2}[/]\d{1,2}/;
-   cy.contains('#copy-paste-container pre', regex)
-   .should('exist');
+   helper.matchClipboardText(regex);
});
 
it('Insert date field (variable) inside existing text shape.', 
function() {
@@ -426,8 +421,7 @@ describe('Impress insertion wizard.', function() {
 
// Check that we have a 

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

2020-06-01 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/desktop/writer/form_field_spec.js |   73 
--
 1 file changed, 31 insertions(+), 42 deletions(-)

New commits:
commit bfbb08681a45c3ec6a9319bb678cbd677da40b4f
Author: Tamás Zolnai 
AuthorDate: Mon Jun 1 11:20:46 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Mon Jun 1 11:36:06 2020 +0200

cypress: fix false failure of form field tests.

The cypress test framework checks if an item is covered
by an other item while we try to interact with it and
fails with an error in this case.
Since the form field button is above the document layer,
cypress correctly identifies that the document layer is
covered (partly) with this button frame. To avoid this
failure we can use force : true option.

Change-Id: I5d9f665e3afe1ae1ff3744a563dd32de52b76bb3
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95266
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/desktop/writer/form_field_spec.js 
b/cypress_test/integration_tests/desktop/writer/form_field_spec.js
index 2bf7df7f3..2b17e3049 100644
--- a/cypress_test/integration_tests/desktop/writer/form_field_spec.js
+++ b/cypress_test/integration_tests/desktop/writer/form_field_spec.js
@@ -57,6 +57,16 @@ describe('Form field button tests.', function() {
});
}
 
+   function moveCursor(direction = 'left') {
+   if (direction == 'left') {
+   cy.get('textarea.clipboard')
+   .type('{leftArrow}', {force : true});
+   } else {
+   cy.get('textarea.clipboard')
+   .type('{rightArrow}', {force : true});
+   }
+   }
+
function doZoom(zoomIn) {
helper.initAliasToEmptyString('prevZoom');
 
@@ -91,26 +101,22 @@ describe('Form field button tests.', function() {
buttonShouldNotExist();
 
// Move the cursor next to the form field
-   cy.get('textarea.clipboard')
-   .type('{rightArrow}');
+   moveCursor('right');
 
buttonShouldExist();
 
// Move the cursor again to the other side of the field
-   cy.get('textarea.clipboard')
-   .type('{rightArrow}');
+   moveCursor('right');
 
buttonShouldExist();
 
// Move the cursor away
-   cy.get('textarea.clipboard')
-   .type('{rightArrow}');
+   moveCursor('right');
 
buttonShouldNotExist();
 
// Move the cursor back next to the field
-   cy.get('textarea.clipboard')
-   .type('{leftArrow}');
+   moveCursor('left');
 
buttonShouldExist();
});
@@ -119,8 +125,7 @@ describe('Form field button tests.', function() {
before('form_field.odt');
 
// Move the cursor next to the form field
-   cy.get('textarea.clipboard')
-   .type('{rightArrow}');
+   moveCursor('right');
 
buttonShouldExist();
 
@@ -162,8 +167,7 @@ describe('Form field button tests.', function() {
before('form_field.odt');
 
// Move the cursor next to the form field
-   cy.get('textarea.clipboard')
-   .type('{rightArrow}');
+   moveCursor('right');
 
// Select a new item
cy.get('.form-field-button')
@@ -177,13 +181,12 @@ describe('Form field button tests.', function() {
 
// Move the cursor away and back
cy.get('textarea.clipboard')
-   .type('{leftArrow}');
+   .type('{home}', {force : true});
 
buttonShouldNotExist();
 
// Move the cursor back next to the field
-   cy.get('textarea.clipboard')
-   .type('{rightArrow}');
+   moveCursor('right');
 
buttonShouldExist();
 
@@ -191,8 +194,7 @@ describe('Form field button tests.', function() {
.should('have.text', 'January');
 
// Do the same from the right side of the field.
-   cy.get('textarea.clipboard')
-   .type('{rightArrow}');
+   moveCursor('right');
 
buttonShouldExist();
 
@@ -206,14 +208,12 @@ describe('Form field button tests.', function() {
cy.contains('.drop-down-field-list-item', 'December')
.click();
 
-   cy.get('textarea.clipboard')
-   .type('{rightArrow}');
+   moveCursor('right');
 
buttonShouldNotExist();
 
// Move the cursor back next to the field
-

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

2020-05-29 Thread Tamás Zolnai (via logerrit)
 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 
AuthorDate: Sat May 30 05:58:43 2020 +0200
Commit: Tamás Zolnai 
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 
Reviewed-by: Tamás Zolnai 

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();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-05-29 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/impress/apply_font_spec.js |   25 
++
 1 file changed, 17 insertions(+), 8 deletions(-)

New commits:
commit 3b22b819659c2aaf38cbaecd48ab57335e21f3fe
Author: Tamás Zolnai 
AuthorDate: Fri May 29 11:43:49 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Fri May 29 13:27:45 2020 +0200

cypress: fix unstable clear formatting test.

Change-Id: Id218dca4d7499e17b4b50c1b4422b12eaf96ac95
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95102
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

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 74d0f1611..18cfa750c 100644
--- a/cypress_test/integration_tests/mobile/impress/apply_font_spec.js
+++ b/cypress_test/integration_tests/mobile/impress/apply_font_spec.js
@@ -13,10 +13,7 @@ describe('Apply font on text shape.', function() {
 
selectTextShape();
 
-   mobileHelper.openMobileWizard();
-
-   cy.get('#TextPropertyPanel')
-   .click();
+   openTextPropertiesPanel();
});
 
afterEach(function() {
@@ -64,6 +61,16 @@ describe('Apply font on text shape.', function() {
selectTextShape();
}
 
+   function openTextPropertiesPanel() {
+   mobileHelper.openMobileWizard();
+
+   cy.get('#TextPropertyPanel')
+   .click();
+
+   cy.get('.ui-content.level-0.mobile-wizard')
+   .should('be.visible');
+   }
+
it('Apply bold.', function() {
cy.get('#Bold')
.click();
@@ -261,7 +268,7 @@ describe('Apply font on text shape.', function() {
.should('have.attr', 'font-size', '368px');
});
 
-   it.skip('Clear direct formatting.', function() {
+   it('Clear direct formatting.', function() {
// Change the font size first
cy.get('.leaflet-pane.leaflet-overlay-pane g.Page 
.TextParagraph')
.should('have.attr', 'font-size', '635px');
@@ -275,10 +282,12 @@ describe('Apply font on text shape.', function() {
.should('have.attr', 'font-size', '705px');
 
// Remove direct formatting
-   mobileHelper.openMobileWizard();
+   openTextPropertiesPanel();
 
-   cy.get('#TextPropertyPanel')
-   .click();
+   // 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();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-05-29 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/impress/apply_font_spec.js |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 34131da9de15a944d8189345a476a2c8e6a221ed
Author: Tamás Zolnai 
AuthorDate: Fri May 29 11:38:59 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Fri May 29 11:41:18 2020 +0200

cypress: this is unstable.

Change-Id: Ifd749692844e06e33e264fe5ffe60298dca7832d

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 e534bd107..74d0f1611 100644
--- a/cypress_test/integration_tests/mobile/impress/apply_font_spec.js
+++ b/cypress_test/integration_tests/mobile/impress/apply_font_spec.js
@@ -261,7 +261,7 @@ describe('Apply font on text shape.', function() {
.should('have.attr', 'font-size', '368px');
});
 
-   it('Clear direct formatting.', function() {
+   it.skip('Clear direct formatting.', function() {
// Change the font size first
cy.get('.leaflet-pane.leaflet-overlay-pane g.Page 
.TextParagraph')
.should('have.attr', 'font-size', '635px');
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-05-27 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js |  228 
+-
 1 file changed, 214 insertions(+), 14 deletions(-)

New commits:
commit c8d25479613500ad78ef1f63a68ae6fb0bf052a9
Author: Tamás Zolnai 
AuthorDate: Wed May 27 14:12:48 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Wed May 27 14:29:00 2020 +0200

cypress: add tests for inserting text fields into existing text shape.

Change-Id: I39524f563544c212b7caf7848ca70ea497babed6
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/94949
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git 
a/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js 
b/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js
index ea9ea3f62..01cb938fe 100644
--- a/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js
+++ b/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js
@@ -10,8 +10,6 @@ describe('Impress insertion wizard.', function() {
mobileHelper.beforeAllMobile(testFileName, 'impress');
 
mobileHelper.enableEditingMobile();
-
-   mobileHelper.openInsertionWizard();
});
 
afterEach(function() {
@@ -55,7 +53,24 @@ describe('Impress insertion wizard.', function() {
});*/
}
 
+   function stepIntoTextShapeEditing() {
+   // Click on the center of the slide to step into text edit mode
+   cy.get('#document-container')
+   .then(function(items) {
+   expect(items).to.have.length(1);
+   var XPos = 
(items[0].getBoundingClientRect().left + 
items[0].getBoundingClientRect().right) / 2;
+   var YPos = 
(items[0].getBoundingClientRect().top + 
items[0].getBoundingClientRect().bottom) / 2;
+   cy.get('body')
+   .dblclick(XPos, YPos);
+   });
+
+   cy.get('.leaflet-cursor.blinking-cursor')
+   .should('exist');
+   }
+
it('Check existence of image insertion items.', function() {
+   mobileHelper.openInsertionWizard();
+
cy.contains('.menu-entry-with-icon', 'Local Image...')
.should('be.visible');
 
@@ -64,6 +79,8 @@ describe('Impress insertion wizard.', function() {
});
 
it('Insert comment.', function() {
+   mobileHelper.openInsertionWizard();
+
cy.contains('.menu-entry-with-icon', 'Comment')
.click();
 
@@ -86,6 +103,8 @@ describe('Impress insertion wizard.', function() {
});
 
it('Insert default table.', function() {
+   mobileHelper.openInsertionWizard();
+
// Open Table submenu
cy.contains('.ui-header.level-0.mobile-wizard.ui-widget', 
'Table')
.click();
@@ -108,6 +127,8 @@ describe('Impress insertion wizard.', function() {
});
 
it('Insert custom table.', function() {
+   mobileHelper.openInsertionWizard();
+
// Open Table submenu
cy.contains('.ui-header.level-0.mobile-wizard.ui-widget', 
'Table')
.click();
@@ -139,6 +160,8 @@ describe('Impress insertion wizard.', function() {
});
 
it('Insert hyperlink.', function() {
+   mobileHelper.openInsertionWizard();
+
// Open hyperlink dialog
cy.contains('.menu-entry-with-icon', 'Hyperlink...')
.click();
@@ -163,6 +186,8 @@ describe('Impress insertion wizard.', function() {
});
 
it('Insert shape.', function() {
+   mobileHelper.openInsertionWizard();
+
cy.contains('.menu-entry-with-icon', 'Shape')
.click();
 
@@ -181,6 +206,8 @@ describe('Impress insertion wizard.', function() {
});
 
it('Insert text box.', function() {
+   mobileHelper.openInsertionWizard();
+
cy.contains('.menu-entry-with-icon', 'Text Box')
.click();
 
@@ -194,6 +221,8 @@ describe('Impress insertion wizard.', function() {
});
 
it('Insert date field (fixed).', function() {
+   mobileHelper.openInsertionWizard();
+
cy.contains('.menu-entry-with-icon', 'More Fields...')
.click();
 
@@ -208,12 +237,13 @@ describe('Impress insertion wizard.', function() {
 
// Check that we have a date in MM/DD/YY format
var regex = /\d{1,2}[/]\d{1,2}[/]\d{1,2}/;
-   cy.get('#copy-paste-container pre')
-   .invoke('text')
-   .should('match', regex);
+   cy.contains('#copy-paste-container pre', regex)
+

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

2020-05-26 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/desktop/calc/focus_spec.js  
 |6 
 cypress_test/integration_tests/desktop/impress/slide_operations_spec.js
 |6 
 cypress_test/integration_tests/desktop/writer/copy_paste_spec.js   
 |6 
 cypress_test/integration_tests/desktop/writer/form_field_spec.js   
 |   29 ++--
 cypress_test/integration_tests/desktop/writer/shape_operations_spec.js 
 |5 
 cypress_test/integration_tests/mobile/calc/alignment_options_spec.js   
 |6 
 cypress_test/integration_tests/mobile/calc/apply_font_spec.js  
 |6 
 cypress_test/integration_tests/mobile/calc/bottom_toolbar_spec.js  
 |   67 +++---
 cypress_test/integration_tests/mobile/calc/cell_appearance_spec.js 
 |6 
 cypress_test/integration_tests/mobile/calc/focus_spec.js   
 |6 
 cypress_test/integration_tests/mobile/calc/insertion_wizard_spec.js
 |6 
 cypress_test/integration_tests/mobile/calc/number_format_spec.js   
 |6 
 cypress_test/integration_tests/mobile/calc/spellchecking_spec.js   
 |6 
 cypress_test/integration_tests/mobile/impress/impress_focus_spec.js
 |6 
 cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js 
 |6 
 cypress_test/integration_tests/mobile/impress/spellchecking_spec.js
 |6 
 cypress_test/integration_tests/mobile/writer/apply_font_spec.js
 |6 
 
cypress_test/integration_tests/mobile/writer/apply_paragraph_properties_spec.js 
|6 
 cypress_test/integration_tests/mobile/writer/bottom_toolbar_spec.js
 |6 
 cypress_test/integration_tests/mobile/writer/focus_spec.js 
 |6 
 cypress_test/integration_tests/mobile/writer/insert_field_spec.js  
 |6 
 cypress_test/integration_tests/mobile/writer/insert_formatting_mark_spec.js
 |6 
 cypress_test/integration_tests/mobile/writer/insert_object_spec.js 
 |6 
 cypress_test/integration_tests/mobile/writer/mobile_wizard_state_spec.js   
 |6 
 cypress_test/integration_tests/mobile/writer/shape_properties_spec.js  
 |5 
 cypress_test/integration_tests/mobile/writer/spellchecking_spec.js 
 |6 
 cypress_test/integration_tests/mobile/writer/table_properties_spec.js  
 |   43 +-
 cypress_test/integration_tests/mobile/writer/toolbar_spec.js   
 |6 
 28 files changed, 144 insertions(+), 143 deletions(-)

New commits:
commit 9e6175ed87a924ce57686a333fbde47e84cecde3
Author: Tamás Zolnai 
AuthorDate: Tue May 26 11:25:02 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Tue May 26 13:45:10 2020 +0200

cypress: introduce a better way of handling test file name.

We both need the test file name in the beforeEach and
afterEach method, so better to write it down twice.
This also makes easier to handle more test files
inside one test suite.

Change-Id: I407d974c949c4485ffb6712fc833c14c3a6c50c6
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/94825
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/desktop/calc/focus_spec.js 
b/cypress_test/integration_tests/desktop/calc/focus_spec.js
index 4c2982d0a..649d2ceb9 100644
--- a/cypress_test/integration_tests/desktop/calc/focus_spec.js
+++ b/cypress_test/integration_tests/desktop/calc/focus_spec.js
@@ -4,15 +4,17 @@ var helper = require('../../common/helper');
 var calc = require('../../common/calc');
 
 describe('Calc focus tests', function() {
+   var testFileName = 'focus.ods';
+
beforeEach(function() {
-   helper.beforeAllDesktop('focus.ods', 'calc');
+   helper.beforeAllDesktop(testFileName, 'calc');
 
// Wait until the Formula-Bar is loaded.
cy.get('.inputbar_container', {timeout : 1});
});
 
afterEach(function() {
-   helper.afterAll('focus.ods');
+   helper.afterAll(testFileName);
});
 
it('Formula-bar focus', function() {
diff --git 
a/cypress_test/integration_tests/desktop/impress/slide_operations_spec.js 
b/cypress_test/integration_tests/desktop/impress/slide_operations_spec.js
index f7031eb3f..fb490ac6c 100644
--- a/cypress_test/integration_tests/desktop/impress/slide_operations_spec.js
+++ b/cypress_test/integration_tests/desktop/impress/slide_operations_spec.js
@@ -3,12 +3,14 @@
 var helper = require('../../common/helper');
 
 describe('Slide operations', function() {
+   var testFileName = 'slide_operations.odp';
+
beforeEach(function() {
-   helper.loadTestDoc('slide_operations.odp', 'impress');
+   helper.loadTestDoc(testFileName, 'impress');
});
 
afterEach(function() {
-   

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

2020-05-25 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js |  178 
++
 1 file changed, 178 insertions(+)

New commits:
commit 15581bb362b0b243be735f5b1c2f5847e900ee9f
Author: Tamás Zolnai 
AuthorDate: Mon May 25 11:07:35 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Mon May 25 11:42:13 2020 +0200

cypress: add tests for insertion of text fields in impress (mobile)

A bug here, that the text fields are inserted at the corner
of the slide and so they are hanging out of the slide.

Change-Id: I5bc895d1c73338cf41e5c896cbdb4ea5cfd5ddd0
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/94776
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git 
a/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js 
b/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js
index fce6c0df8..0911a01f8 100644
--- a/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js
+++ b/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js
@@ -16,6 +16,43 @@ describe('Impress insertion wizard.', function() {
helper.afterAll('insertion_wizard.odp');
});
 
+   function selectTextOfShape() {
+   // Double click onto the selected shape
+   cy.get('svg g .leaflet-interactive')
+   .then(function(items) {
+   expect(items).to.have.length(1);
+   var XPos = 
(items[0].getBoundingClientRect().left + 
items[0].getBoundingClientRect().right) / 2;
+   var YPos = 
(items[0].getBoundingClientRect().top + 
items[0].getBoundingClientRect().bottom) / 2;
+   cy.get('body')
+   .dblclick(XPos, YPos);
+   });
+
+   cy.get('.leaflet-cursor.blinking-cursor')
+   .should('exist');
+
+   helper.selectAllText(false);
+   }
+
+   function selectionShouldBeTextShape() {
+   // Check that the shape is there
+   cy.get('.leaflet-pane.leaflet-overlay-pane svg')
+   .should(function(svg) {
+   
expect(svg[0].getBBox().width).to.be.greaterThan(0);
+   
expect(svg[0].getBBox().height).to.be.greaterThan(0);
+   });
+
+   cy.get('.leaflet-pane.leaflet-overlay-pane g.Page g')
+   .should('have.class', 'com.sun.star.drawing.TextShape');
+
+   // Check also that the shape is fully visible
+   // TODO: shapes are hungs out of the slide after insertion
+   /*cy.get('svg g .leaflet-interactive')
+   .should(function(items) {
+   expect(items.offset().top).to.be.greaterThan(0);
+   
expect(items.offset().left).to.be.greaterThan(0);
+   });*/
+   }
+
it('Check existence of image insertion items.', function() {
cy.contains('.menu-entry-with-icon', 'Local Image...')
.should('be.visible');
@@ -140,4 +177,145 @@ describe('Impress insertion wizard.', function() {

expect(svg[0].getBBox().height).to.be.greaterThan(0);
});
});
+
+   it('Insert text box.', function() {
+   cy.contains('.menu-entry-with-icon', 'Text Box')
+   .click();
+
+   // Check that the shape is there
+   selectionShouldBeTextShape();
+
+   // Check the text
+   selectTextOfShape();
+
+   helper.expectTextForClipboard('Tap to edit text');
+   });
+
+   it('Insert date field (fixed).', function() {
+   cy.contains('.menu-entry-with-icon', 'More Fields...')
+   .click();
+
+   cy.contains('.menu-entry-with-icon', 'Date (fixed)')
+   .click();
+
+   // Check that the shape is there
+   selectionShouldBeTextShape();
+
+   // Check the text
+   selectTextOfShape();
+
+   // Check that we have a date in MM/DD/YY format
+   var regex = /\d{1,2}[/]\d{1,2}[/]\d{1,2}/;
+   cy.get('#copy-paste-container pre')
+   .invoke('text')
+   .should('match', regex);
+   });
+
+   it('Insert date field (variable).', function() {
+   cy.contains('.menu-entry-with-icon', 'More Fields...')
+   .click();
+
+   cy.contains('.menu-entry-with-icon', 'Date (variable)')
+   .click();
+
+   // Check that the shape is there
+   selectionShouldBeTextShape();
+
+   // Check the text
+   

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

2020-05-22 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/writer/shape_properties_spec.js |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit af3691ea516475f43c91bdcbefe135a55d5a58dd
Author: Tamás Zolnai 
AuthorDate: Fri May 22 14:04:10 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Fri May 22 14:11:01 2020 +0200

cypress: this test is failing lately.

Change-Id: Iddadf16895947b2a236e2075118ba822f74eeecb
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/94666
Tested-by: Tamás Zolnai 
Reviewed-by: Tamás Zolnai 

diff --git 
a/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js 
b/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js
index d54869074..d111f59b1 100644
--- a/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js
@@ -211,7 +211,7 @@ describe('Change shape properties via mobile wizard.', 
function() {
.should('have.attr', 'stroke', 'rgb(152,0,0)');
});
 
-   it('Change line style', function() {
+   it.skip('Change line style', function() {
// TODO: Layout of the line properties panel is completely 
broken.
if (Cypress.env('LO_CORE_VERSION') === 'master')
return;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-05-21 Thread Henry Castro (via logerrit)
 cypress_test/integration_tests/common/helper.js |   11 ++-
 1 file changed, 2 insertions(+), 9 deletions(-)

New commits:
commit 5acffe2af9dc808fb2d38b4a4b4891e264f09e59
Author: Henry Castro 
AuthorDate: Mon May 18 10:53:49 2020 -0400
Commit: Henry Castro 
CommitDate: Thu May 21 16:49:48 2020 +0200

cypress: remove logging UNO command states

This is no longer usable when running interactive unit test

Change-Id: I0e44dca7d6c0ec513da08a0d4521ef9d15b27a94
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/94430
Tested-by: Jenkins
Reviewed-by: Henry Castro 

diff --git a/cypress_test/integration_tests/common/helper.js 
b/cypress_test/integration_tests/common/helper.js
index b2053c4a7..39fc09875 100644
--- a/cypress_test/integration_tests/common/helper.js
+++ b/cypress_test/integration_tests/common/helper.js
@@ -1,9 +1,5 @@
 /* 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);
@@ -51,11 +47,8 @@ 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 : 1});
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-05-20 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/calc/bottom_toolbar_spec.js |   34 
--
 1 file changed, 30 insertions(+), 4 deletions(-)

New commits:
commit 20ae90f748db8937ee87e2edd4971a9934ec46cd
Author: Tamás Zolnai 
AuthorDate: Wed May 20 20:55:28 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Wed May 20 21:42:17 2020 +0200

cypress: fix closing method of bottom toolbar test (calc)

Change-Id: Ie241720312f58d2be0c3c5f1f4a154246ed84bfd
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/94597
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/mobile/calc/bottom_toolbar_spec.js 
b/cypress_test/integration_tests/mobile/calc/bottom_toolbar_spec.js
index 48141adf1..5d711fbdc 100644
--- a/cypress_test/integration_tests/mobile/calc/bottom_toolbar_spec.js
+++ b/cypress_test/integration_tests/mobile/calc/bottom_toolbar_spec.js
@@ -1,4 +1,4 @@
-/* global describe it cy require afterEach expect */
+/* global describe it cy require expect */
 
 var helper = require('../../common/helper');
 var calc = require('../../common/calc');
@@ -15,9 +15,9 @@ describe('Interact with bottom toolbar.', function() {
calc.clickOnFirstCell();
}
 
-   afterEach(function() {
-   helper.afterAll('apply_font.ods');
-   });
+   function after(fileName) {
+   helper.afterAll(fileName);
+   }
 
function getTextPosForFirstCell() {
calc.dblClickOnFirstCell();
@@ -49,6 +49,8 @@ describe('Interact with bottom toolbar.', function() {
 
cy.get('#copy-paste-container table td b')
.should('exist');
+
+   after('bottom_toolbar.ods');
});
 
it('Apply italic.', function() {
@@ -61,6 +63,8 @@ describe('Interact with bottom toolbar.', function() {
 
cy.get('#copy-paste-container table td i')
.should('exist');
+
+   after('bottom_toolbar.ods');
});
 
it('Apply underline.', function() {
@@ -73,6 +77,8 @@ describe('Interact with bottom toolbar.', function() {
 
cy.get('#copy-paste-container table td u')
.should('exist');
+
+   after('bottom_toolbar.ods');
});
 
it('Apply strikeout.', function() {
@@ -85,6 +91,8 @@ describe('Interact with bottom toolbar.', function() {
 
cy.get('#copy-paste-container table td s')
.should('exist');
+
+   after('bottom_toolbar.ods');
});
 
it('Apply font color.', function() {
@@ -103,6 +111,8 @@ describe('Interact with bottom toolbar.', function() {
 
cy.get('#copy-paste-container table td font')
.should('have.attr', 'color', '#00FF00');
+
+   after('bottom_toolbar.ods');
});
 
it('Apply highlight color.', function() {
@@ -121,6 +131,8 @@ describe('Interact with bottom toolbar.', function() {
 
cy.get('#copy-paste-container table td')
.should('have.attr', 'bgcolor', '#00FF00');
+
+   after('bottom_toolbar.ods');
});
 
it('Merge cells', function() {
@@ -136,6 +148,8 @@ describe('Interact with bottom toolbar.', function() {
 
cy.get('#copy-paste-container table td')
.should('have.attr', 'colspan', '1024');
+
+   after('bottom_toolbar.ods');
});
 
it('Apply left/right alignment', function() {
@@ -160,6 +174,8 @@ describe('Interact with bottom toolbar.', function() {
 
cy.get('#copy-paste-container table td')
.should('have.attr', 'align', 'left');
+
+   after('bottom_toolbar.ods');
});
 
it('Align to center.', function() {
@@ -172,6 +188,8 @@ describe('Interact with bottom toolbar.', function() {
 
cy.get('#copy-paste-container table td')
.should('have.attr', 'align', 'center');
+
+   after('bottom_toolbar.ods');
});
 
it('Change to block alignment.', function() {
@@ -184,6 +202,8 @@ describe('Interact with bottom toolbar.', function() {
 
cy.get('#copy-paste-container table td')
.should('have.attr', 'align', 'justify');
+
+   after('bottom_toolbar.ods');
});
 
it('Enable text wrapping.', function() {
@@ -216,6 +236,8 @@ describe('Interact with bottom toolbar.', function() {
});
});
});
+
+   after('bottom_toolbar.ods');
});
 
it('Insert row after.', function() {
@@ -240,6 +262,8 @@ describe('Interact with bottom toolbar.', function() {
 
cy.get('#copy-paste-container table tr:nth-of-type(3)')

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

2020-05-19 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/writer/shape_properties_spec.js |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 194bc60bb6ba396e6d2888fcb98128bcb01e230a
Author: Tamás Zolnai 
AuthorDate: Wed May 20 00:28:19 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Wed May 20 00:28:35 2020 +0200

Revert "cypress: this test seems to be stable now."

This reverts commit d07db7d74dea3abb6014dd91196f9754075cd876.

Change-Id: I6d220701082fedcfbc0e00f5c6e0f0092bb4032b
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/94458
Tested-by: Tamás Zolnai 
Reviewed-by: Tamás Zolnai 

diff --git 
a/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js 
b/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js
index 5ed397d1d..d54869074 100644
--- a/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js
@@ -113,7 +113,7 @@ describe('Change shape properties via mobile wizard.', 
function() {
.should('have.attr', 'd', 'M 1965,4863 L 7957,18073 
1965,18073 1965,4863 1965,4863 Z');
});
 
-   it('Change size with keep ratio enabled.', function() {
+   it.skip('Change size with keep ratio enabled.', function() {
// TODO: Entering a value inside the spinbutton has no effect 
on the shape.
if (Cypress.env('LO_CORE_VERSION') === 'master')
return;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-05-19 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/calc/alignment_options_spec.js |1 -
 cypress_test/integration_tests/mobile/calc/apply_font_spec.js|2 --
 2 files changed, 3 deletions(-)

New commits:
commit f43b7e01bf033dc10ebbe62257da2810a0ab90bf
Author: Tamás Zolnai 
AuthorDate: Tue May 19 14:52:11 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Tue May 19 21:09:18 2020 +0200

cypress: remove some false comments.

Change-Id: Ibdd0a27c78feeffe09b0b3fdd91ac2d0a444178b
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/94531
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git 
a/cypress_test/integration_tests/mobile/calc/alignment_options_spec.js 
b/cypress_test/integration_tests/mobile/calc/alignment_options_spec.js
index a3b5c0165..fd4f2123f 100644
--- a/cypress_test/integration_tests/mobile/calc/alignment_options_spec.js
+++ b/cypress_test/integration_tests/mobile/calc/alignment_options_spec.js
@@ -92,7 +92,6 @@ describe('Change alignment settings.', function() {
it('Change to block alignment.', function() {
openAlignmentPaneForFirstCell();
 
-   // Set right aligment first
cy.get('#AlignBlock')
.click();
 
diff --git a/cypress_test/integration_tests/mobile/calc/apply_font_spec.js 
b/cypress_test/integration_tests/mobile/calc/apply_font_spec.js
index f009f0db5..ae93defdc 100644
--- a/cypress_test/integration_tests/mobile/calc/apply_font_spec.js
+++ b/cypress_test/integration_tests/mobile/calc/apply_font_spec.js
@@ -62,7 +62,6 @@ describe('Apply font changes.', function() {
});
 
it('Apply strikeout.', function() {
-   // Apply bold
cy.get('#Strikeout')
.click();
 
@@ -73,7 +72,6 @@ describe('Apply font changes.', function() {
});
 
it('Apply shadowed.', function() {
-   // Apply bold
cy.get('#Shadowed')
.click();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-05-19 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/writer/shape_properties_spec.js |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d07db7d74dea3abb6014dd91196f9754075cd876
Author: Tamás Zolnai 
AuthorDate: Tue May 19 14:03:46 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Tue May 19 21:09:03 2020 +0200

cypress: this test seems to be stable now.

Change-Id: Iaa2799bfa489fd04acc4d42452915bde0c9f6528
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/94530
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git 
a/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js 
b/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js
index d54869074..5ed397d1d 100644
--- a/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js
@@ -113,7 +113,7 @@ describe('Change shape properties via mobile wizard.', 
function() {
.should('have.attr', 'd', 'M 1965,4863 L 7957,18073 
1965,18073 1965,4863 1965,4863 Z');
});
 
-   it.skip('Change size with keep ratio enabled.', function() {
+   it('Change size with keep ratio enabled.', function() {
// TODO: Entering a value inside the spinbutton has no effect 
on the shape.
if (Cypress.env('LO_CORE_VERSION') === 'master')
return;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-05-19 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/mobile/calc/focus_spec.js |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 336184e1e40cf0cac1642af2e82e52a63822f633
Author: Tamás Zolnai 
AuthorDate: Tue May 19 12:58:15 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Tue May 19 13:03:05 2020 +0200

cypress: this is unstable.

Change-Id: I7cc737278120df8f4d7a8a27770a4929b5d48660

diff --git a/cypress_test/integration_tests/mobile/calc/focus_spec.js 
b/cypress_test/integration_tests/mobile/calc/focus_spec.js
index e13bf6155..7320bd331 100644
--- a/cypress_test/integration_tests/mobile/calc/focus_spec.js
+++ b/cypress_test/integration_tests/mobile/calc/focus_spec.js
@@ -76,7 +76,7 @@ describe('Calc focus tests', function() {
.should('be.eq', 'clipboard');
});
 
-   it('Formula-bar focus', function() {
+   it.skip('Formula-bar focus', function() {
// Click on edit button
mobileHelper.enableEditingMobile();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-05-18 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/desktop/writer/form_field_spec.js |  100 
+-
 1 file changed, 50 insertions(+), 50 deletions(-)

New commits:
commit dd5ce7df94ad939fe93712c79ef58836d01b4aa8
Author: Tamás Zolnai 
AuthorDate: Mon May 18 14:02:36 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Mon May 18 18:42:14 2020 +0200

cypress: make zooming more stable in form field tests.

Change-Id: Ie897b256f13f06e7fc66bd0fac25376b849e5429
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/94421
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/desktop/writer/form_field_spec.js 
b/cypress_test/integration_tests/desktop/writer/form_field_spec.js
index 6aba35888..64e798b45 100644
--- a/cypress_test/integration_tests/desktop/writer/form_field_spec.js
+++ b/cypress_test/integration_tests/desktop/writer/form_field_spec.js
@@ -8,6 +8,14 @@ describe('Form field button tests.', function() {
helper.afterAll('form_field.odt', 'writer');
});
 
+   function before(fileName, subFolder) {
+   helper.loadTestDoc(fileName, subFolder);
+
+   // Wait for the sidebar to change the zoom level by load
+   cy.get('#tb_actionbar_item_zoom .w2ui-tb-caption')
+   .should('not.have.text', '100');
+   }
+
function buttonShouldNotExist() {
cy.get('.form-field-frame')
.should('not.exist');
@@ -48,8 +56,35 @@ describe('Form field button tests.', function() {
});
}
 
+   function doZoom(zoomIn) {
+   helper.initAliasToEmptyString('prevZoom');
+
+   cy.get('#tb_actionbar_item_zoom .w2ui-tb-caption')
+   .invoke('text')
+   .as('prevZoom');
+
+   cy.get('@prevZoom')
+   .should('not.be.equal', '');
+
+   if (zoomIn) {
+   cy.get('.w2ui-tb-image.w2ui-icon.zoomin')
+   .click();
+   } else {
+   cy.get('.w2ui-tb-image.w2ui-icon.zoomout')
+   .click();
+   }
+
+   cy.get('@prevZoom')
+   .then(function(prevZoom) {
+   cy.get('#tb_actionbar_item_zoom 
.w2ui-tb-caption')
+   .should(function(zoomItem) {
+   
expect(zoomItem.text()).to.be.not.equal(prevZoom);
+   });
+   });
+   }
+
it('Activate and deactivate form field button.', function() {
-   helper.loadTestDoc('form_field.odt', 'writer');
+   before('form_field.odt', 'writer');
 
// We don't have the button by default
buttonShouldNotExist();
@@ -80,7 +115,7 @@ describe('Form field button tests.', function() {
});
 
it('Check drop down list.', function() {
-   helper.loadTestDoc('form_field.odt', 'writer');
+   before('form_field.odt', 'writer');
 
// Move the cursor next to the form field
cy.get('textarea.clipboard')
@@ -123,7 +158,7 @@ describe('Form field button tests.', function() {
});
 
it('Test field editing', function() {
-   helper.loadTestDoc('form_field.odt', 'writer');
+   before('form_field.odt', 'writer');
 
// Move the cursor next to the form field
cy.get('textarea.clipboard')
@@ -186,7 +221,7 @@ describe('Form field button tests.', function() {
});
 
it('Multiple form field button activation.', function() {
-   helper.loadTestDoc('multiple_form_fields.odt', 'writer');
+   before('multiple_form_fields.odt', 'writer');
 
// We don't have the button by default
buttonShouldNotExist();
@@ -223,7 +258,7 @@ describe('Form field button tests.', function() {
});
 
it('Test drop-down field with no selection.', function() {
-   helper.loadTestDoc('drop_down_form_field_noselection.odt', 
'writer');
+   before('drop_down_form_field_noselection.odt', 'writer');
 
// Move the cursor next to the form field
cy.get('textarea.clipboard')
@@ -236,7 +271,7 @@ describe('Form field button tests.', function() {
});
 
it('Test drop-down field with no items.', function() {
-   helper.loadTestDoc('drop_down_form_field_noitem.odt', 'writer');
+   before('drop_down_form_field_noitem.odt', 'writer');
 
// Move the cursor next to the form field
cy.get('textarea.clipboard')
@@ -263,8 +298,8 @@ describe('Form field button tests.', function() {
.should('not.exist');
});
 
-   

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

2020-05-18 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/desktop/writer/form_field_spec.js |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f1262f7b3180e984bff53b5958aa059562966f79
Author: Tamás Zolnai 
AuthorDate: Mon May 18 14:15:26 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Mon May 18 14:15:26 2020 +0200

cypress: this is unstable.

Change-Id: Ifb492aa60594a98f7274e09682e3042797431ce8

diff --git a/cypress_test/integration_tests/desktop/writer/form_field_spec.js 
b/cypress_test/integration_tests/desktop/writer/form_field_spec.js
index 9ae817ec7..a1554fa3b 100644
--- a/cypress_test/integration_tests/desktop/writer/form_field_spec.js
+++ b/cypress_test/integration_tests/desktop/writer/form_field_spec.js
@@ -263,7 +263,7 @@ describe('Form field button tests.', function() {
.should('not.exist');
});
 
-   it('Test field button after zoom.', function() {
+   it.skip('Test field button after zoom.', function() {
helper.loadTestDoc('form_field.odt', 'writer');
 
// Move the cursor next to the form field
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-05-18 Thread Tamás Zolnai (via logerrit)
 cypress_test/integration_tests/desktop/writer/form_field_spec.js |   52 
++
 1 file changed, 52 insertions(+)

New commits:
commit 82f96b40f8b8ae714f9c86ce47cde1652f8db8d5
Author: Tamás Zolnai 
AuthorDate: Mon May 18 11:50:24 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Mon May 18 12:45:05 2020 +0200

cypress: add zooming test for form fields.

Make sure the text cursor is inside the form field
button's frame.

Change-Id: Ib8a6fe50c14d01b5d3864f04e9668b9b1844b50e
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/94408
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/desktop/writer/form_field_spec.js 
b/cypress_test/integration_tests/desktop/writer/form_field_spec.js
index def301989..9ae817ec7 100644
--- a/cypress_test/integration_tests/desktop/writer/form_field_spec.js
+++ b/cypress_test/integration_tests/desktop/writer/form_field_spec.js
@@ -28,6 +28,24 @@ describe('Form field button tests.', function() {
 
cy.get('.drop-down-field-list')
.should('exist');
+
+   // Check also the position relative to the blinking cursor
+   cy.get('.blinking-cursor')
+   .then(function(cursors) {
+   // TODO: why we have two blinking cursors here?
+   //expect(cursors).to.have.lengthOf(1);
+
+   var cursorRect = 
cursors[0].getBoundingClientRect();
+   cy.get('.form-field-frame')
+   .should(function(frames) {
+   
expect(frames).to.have.lengthOf(1);
+   var frameRect = 
frames[0].getBoundingClientRect();
+   
expect(frameRect.top).to.be.lessThan(cursorRect.top);
+   
expect(frameRect.bottom).to.be.greaterThan(cursorRect.bottom);
+   
expect(frameRect.left).to.be.lessThan(cursorRect.left);
+   
expect(frameRect.right).to.be.greaterThan(cursorRect.right);
+   });
+   });
}
 
it('Activate and deactivate form field button.', function() {
@@ -244,5 +262,39 @@ describe('Form field button tests.', function() {
cy.get('.drop-down-field-list-item.selected')
.should('not.exist');
});
+
+   it('Test field button after zoom.', function() {
+   helper.loadTestDoc('form_field.odt', 'writer');
+
+   // Move the cursor next to the form field
+   cy.get('textarea.clipboard')
+   .type('{rightArrow}');
+
+   buttonShouldExist();
+
+   // Do a zoom in
+   cy.get('#tb_actionbar_item_zoom')
+   .click();
+
+   cy.contains('.menu-text', '120')
+   .click();
+
+   cy.contains('#tb_actionbar_item_zoom', '120')
+   .should('exist');
+
+   buttonShouldExist();
+
+   // Do a zoom out
+   cy.get('#tb_actionbar_item_zoom')
+   .click();
+
+   cy.contains('.menu-text', '85')
+   .click();
+
+   cy.contains('#tb_actionbar_item_zoom', '85')
+   .should('exist');
+
+   buttonShouldExist();
+   });
 });
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


  1   2   3   >