[Libreoffice-commits] online.git: cypress_test/integration_tests
Tamás Zolnai (via logerrit)
logerrit at kemper.freedesktop.org
Fri Aug 14 18:44:58 UTC 2020
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 <tamas.zolnai at collabora.com>
AuthorDate: Fri Aug 14 16:31:31 2020 +0200
Commit: Tamás Zolnai <tamas.zolnai at collabora.com>
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 <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>
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');
More information about the Libreoffice-commits
mailing list