cypress_test/integration_tests/mobile/calc/alignment_options_spec.js |   25 
++++-----
 cypress_test/integration_tests/mobile/calc/bottom_toolbar_spec.js    |   27 
+++++-----
 2 files changed, 27 insertions(+), 25 deletions(-)
New commits:
commit 8899b587459910e6b08253f04b23d2ca1c69c453
Author:     Tamás Zolnai <tamas.zol...@collabora.com>
AuthorDate: Tue Sep 15 14:30:53 2020 +0200
Commit:     Tamás Zolnai <tamas.zol...@collabora.com>
CommitDate: Tue Sep 15 17:05:14 2020 +0200

    cypress: php-proxy: fix text wraping test.
    
    It could fail without php-proy too, but php-proxy
    slows things down and makes this issue more visible.
    
    Change-Id: I6bda9bfd195b28c797b0690e05cddf3f0ee98e12
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102750
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Tamás Zolnai <tamas.zol...@collabora.com>

diff --git 
a/cypress_test/integration_tests/mobile/calc/alignment_options_spec.js 
b/cypress_test/integration_tests/mobile/calc/alignment_options_spec.js
index e90368bf0..39c5e29d5 100644
--- a/cypress_test/integration_tests/mobile/calc/alignment_options_spec.js
+++ b/cypress_test/integration_tests/mobile/calc/alignment_options_spec.js
@@ -5,6 +5,8 @@ var calcHelper = require('../../common/calc_helper');
 var mobileHelper = require('../../common/mobile_helper');
 var calcMobileHelper = require('./calc_mobile_helper');
 
+require('cypress-wait-until');
+
 describe('Change alignment settings.', function() {
        var testFileName = 'alignment_options.ods';
 
@@ -273,18 +275,17 @@ describe('Change alignment settings.', function() {
                        .should('have.prop', 'checked', true);
 
                // We use the text position as indicator
-               cy.get('body')
-                       .should(function() {
-                               getTextPosForFirstCell();
-
-                               cy.get('@currentTextPos')
-                                       .then(function(currentTextPos) {
-                                               cy.get('@originalTextPos')
-                                                       
.then(function(originalTextPos) {
-                                                               
expect(originalTextPos).to.be.greaterThan(currentTextPos);
-                                                       });
-                                       });
-                       });
+               cy.waitUntil(function() {
+                       getTextPosForFirstCell();
+
+                       return cy.get('@currentTextPos')
+                               .then(function(currentTextPos) {
+                                       return cy.get('@originalTextPos')
+                                               .then(function(originalTextPos) 
{
+                                                       return originalTextPos 
> currentTextPos;
+                                               });
+                               });
+               });
        });
 
        it('Apply stacked option.', function() {
diff --git a/cypress_test/integration_tests/mobile/calc/bottom_toolbar_spec.js 
b/cypress_test/integration_tests/mobile/calc/bottom_toolbar_spec.js
index a94993ed6..dcbcdb870 100644
--- a/cypress_test/integration_tests/mobile/calc/bottom_toolbar_spec.js
+++ b/cypress_test/integration_tests/mobile/calc/bottom_toolbar_spec.js
@@ -1,10 +1,12 @@
-/* global describe it cy require expect afterEach */
+/* global describe it cy require afterEach */
 
 var helper = require('../../common/helper');
 var calcHelper = require('../../common/calc_helper');
 var mobileHelper = require('../../common/mobile_helper');
 var calcMobileHelper = require('./calc_mobile_helper');
 
+require('cypress-wait-until');
+
 describe('Interact with bottom toolbar.', function() {
        var testFileName;
 
@@ -203,18 +205,17 @@ describe('Interact with bottom toolbar.', function() {
                        .click();
 
                // We use the text position as indicator
-               cy.get('body')
-                       .should(function() {
-                               getTextPosForFirstCell();
-
-                               cy.get('@currentTextPos')
-                                       .then(function(currentTextPos) {
-                                               cy.get('@originalTextPos')
-                                                       
.then(function(originalTextPos) {
-                                                               
expect(originalTextPos).to.be.greaterThan(currentTextPos);
-                                                       });
-                                       });
-                       });
+               cy.waitUntil(function() {
+                       getTextPosForFirstCell();
+
+                       return cy.get('@currentTextPos')
+                               .then(function(currentTextPos) {
+                                       return cy.get('@originalTextPos')
+                                               .then(function(originalTextPos) 
{
+                                                       return originalTextPos 
> currentTextPos;
+                                               });
+                               });
+               });
        });
 
        it('Insert row after.', function() {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to