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