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@gmail.com> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
This commit is contained in:
parent
6890d2fdaa
commit
7ad798df47
2 changed files with 8 additions and 10 deletions
|
@ -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);
|
||||
});
|
||||
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue