[Libreoffice-commits] online.git: cypress_test/integration_tests
Tamás Zolnai (via logerrit)
logerrit at kemper.freedesktop.org
Mon Jun 22 14:05:04 UTC 2020
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 <tamas.zolnai at collabora.com>
AuthorDate: Mon Jun 22 13:25:48 2020 +0200
Commit: Tamás Zolnai <tamas.zolnai at collabora.com>
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 <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>
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() {
More information about the Libreoffice-commits
mailing list