cypress_test/integration_tests/mobile/calc/alignment_options_spec.js |   25 
+++-------
 cypress_test/integration_tests/mobile/calc/bottom_toolbar_spec.js    |    3 +
 cypress_test/integration_tests/mobile/calc/calc_mobile_helper.js     |    3 +
 3 files changed, 15 insertions(+), 16 deletions(-)

New commits:
commit 08428824cbd4ea74c68682fe36043c4e5fa6048d
Author:     Tamás Zolnai <tamas.zol...@collabora.com>
AuthorDate: Fri Jun 19 14:51:15 2020 +0200
Commit:     Tamás Zolnai <tamas.zol...@collabora.com>
CommitDate: Fri Jun 19 16:19:00 2020 +0200

    cypress: stabilize 'Merge cells' test case.
    
    Change-Id: I9661c00c26ea47cd1dd5f8121801b2e0ff083b53
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96733
    Tested-by: Jenkins
    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 93ac85162..4ed008fe4 100644
--- a/cypress_test/integration_tests/mobile/calc/alignment_options_spec.js
+++ b/cypress_test/integration_tests/mobile/calc/alignment_options_spec.js
@@ -328,26 +328,19 @@ describe('Change alignment settings.', function() {
                // Select the full row
                calcMobileHelper.selectFirstRow();
 
-               // Even after we get the cell row selection the merge cell 
options is still disabled
-               // So we open mobile wizard again and again until merge cells 
get the right state
+               // Despite the selection is there, merge cells needs more time 
here.
+               cy.wait(1000);
+
                mobileHelper.openMobileWizard();
-               cy.get('body')
-                       .should(function() {
-                               mobileHelper.closeMobileWizard();
-                               mobileHelper.openMobileWizard();
 
-                               cy.get('#ScAlignmentPropertyPanel')
-                                       .click();
+               cy.get('#ScAlignmentPropertyPanel')
+                       .click();
 
-                               cy.get('#AlignLeft')
-                                       .should('be.visible');
+               cy.get('#AlignLeft')
+                       .should('be.visible');
 
-                               cy.get('input#mergecells')
-                                       .then(function(items) {
-                                               
expect(items).to.have.lengthOf(1);
-                                               
expect(items[0]).to.not.have.attr('disabled');
-                                       });
-                       });
+               cy.get('input#mergecells')
+                       .should('not.have.attr', 'disabled');
 
                // Click merge cells
                cy.get('input#mergecells')
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 d1c2a02a6..e62a05501 100644
--- a/cypress_test/integration_tests/mobile/calc/bottom_toolbar_spec.js
+++ b/cypress_test/integration_tests/mobile/calc/bottom_toolbar_spec.js
@@ -124,6 +124,9 @@ describe('Interact with bottom toolbar.', function() {
                // Select the full row
                calcMobileHelper.selectFirstRow();
 
+               // Despite the selection is there, merge cells needs more time 
here.
+               cy.wait(1000);
+
                cy.get('.w2ui-tb-image.w2ui-icon.togglemergecells')
                        .click();
 
diff --git a/cypress_test/integration_tests/mobile/calc/calc_mobile_helper.js 
b/cypress_test/integration_tests/mobile/calc/calc_mobile_helper.js
index e0f95f287..e4edc648d 100644
--- a/cypress_test/integration_tests/mobile/calc/calc_mobile_helper.js
+++ b/cypress_test/integration_tests/mobile/calc/calc_mobile_helper.js
@@ -60,6 +60,9 @@ function selectFirstRow() {
 
        cy.get('.spreadsheet-cell-resize-marker:nth-of-type(2)')
                .should('not.be.visible');
+
+       cy.get('input#addressInput')
+               .should('have.prop', 'value', 'A1:AMJ1');
 }
 
 module.exports.removeTextSelection = removeTextSelection;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to