[Libreoffice-commits] online.git: cypress_test/integration_tests
Tamás Zolnai (via logerrit)
logerrit at kemper.freedesktop.org
Mon Mar 23 18:34:25 UTC 2020
cypress_test/integration_tests/mobile/calc/spellchecking_spec.js | 10 +++++-----
cypress_test/integration_tests/mobile/impress/spellchecking_spec.js | 8 +++-----
2 files changed, 8 insertions(+), 10 deletions(-)
New commits:
commit 7ad798df475c3cfb570ab975615cd1b5423cb549
Author: Tamás Zolnai <zolnaitamas2000 at gmail.com>
AuthorDate: Fri Mar 20 17:01:32 2020 +0100
Commit: Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Mon Mar 23 19:34:07 2020 +0100
cypress: mobile fix random failure in spellchecking tests.
Change-Id: I89a915ef0a7efefd1e684d30b4d04f7cb7914cad
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90929
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/spellchecking_spec.js b/cypress_test/integration_tests/mobile/calc/spellchecking_spec.js
index 6d8f5930e..951e567a7 100644
--- a/cypress_test/integration_tests/mobile/calc/spellchecking_spec.js
+++ b/cypress_test/integration_tests/mobile/calc/spellchecking_spec.js
@@ -20,6 +20,8 @@ describe('Calc spell checking menu.', function() {
// Step into edit mode
calcHelper.clickOnFirstCell();
calcHelper.clickOnFirstCell();
+ cy.get('.leaflet-cursor.blinking-cursor')
+ .should('exist');
// Select text content
cy.get('textarea.clipboard')
@@ -31,20 +33,18 @@ describe('Calc spell checking menu.', function() {
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 startPos = markers[i].getBoundingClientRect();
+ var XPos = markers[i].getBoundingClientRect().right + 10;
} else if (markers[i].classList.contains('leaflet-selection-marker-end')) {
- var endPos = markers[i].getBoundingClientRect();
+ var YPos = markers[i].getBoundingClientRect().top - 10;
}
}
// Remove selection
- cy.get('textarea.clipboard')
+ cy.get('body')
.type('{leftarrow}');
cy.get('.leaflet-marker-icon')
.should('not.exist');
- var XPos = startPos.right + 10;
- var YPos = endPos.top - 10;
helper.longPressOnDocument(XPos, YPos);
});
diff --git a/cypress_test/integration_tests/mobile/impress/spellchecking_spec.js b/cypress_test/integration_tests/mobile/impress/spellchecking_spec.js
index 8831e3555..1d1224db4 100644
--- a/cypress_test/integration_tests/mobile/impress/spellchecking_spec.js
+++ b/cypress_test/integration_tests/mobile/impress/spellchecking_spec.js
@@ -37,20 +37,18 @@ describe('Spell checking menu.', function() {
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 startPos = markers[i].getBoundingClientRect();
+ var XPos = markers[i].getBoundingClientRect().right + 10;
} else if (markers[i].classList.contains('leaflet-selection-marker-end')) {
- var endPos = markers[i].getBoundingClientRect();
+ var YPos = markers[i].getBoundingClientRect().top - 10;
}
}
// Remove selection
- cy.get('#document-container')
+ cy.get('body')
.type('{leftarrow}');
cy.get('.leaflet-marker-icon')
.should('not.exist');
- var XPos = startPos.right + 10;
- var YPos = endPos.top - 10;
helper.longPressOnDocument(XPos, YPos);
});
More information about the Libreoffice-commits
mailing list