[Libreoffice-commits] online.git: cypress_test/integration_tests
Tamás Zolnai (via logerrit)
logerrit at kemper.freedesktop.org
Tue Sep 15 16:20:59 UTC 2020
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 <tamas.zolnai at collabora.com>
AuthorDate: Tue Sep 15 13:58:24 2020 +0200
Commit: Tamás Zolnai <tamas.zolnai at collabora.com>
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 <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>
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.');
}
More information about the Libreoffice-commits
mailing list