cypress_test/integration_tests/mobile/calc/apply_font_spec.js | 3 -- cypress_test/integration_tests/mobile/calc/number_format_spec.js | 6 +---- cypress_test/integration_tests/mobile/writer/apply_font_spec.js | 8 ------- cypress_test/integration_tests/mobile/writer/apply_paragraph_properties_spec.js | 3 -- cypress_test/integration_tests/mobile/writer/insert_field_spec.js | 3 -- cypress_test/integration_tests/mobile/writer/insert_formatting_mark_spec.js | 3 -- cypress_test/integration_tests/mobile/writer/shape_properties_spec.js | 11 +--------- cypress_test/integration_tests/mobile/writer/table_properties_spec.js | 3 -- cypress_test/integration_tests/mobile/writer/writer_helper.js | 3 -- loleaflet/src/control/Control.MobileWizard.js | 3 ++ 10 files changed, 13 insertions(+), 33 deletions(-)
New commits: commit 4bdd0497ed8e082db577062a988be2807f00e25f Author: Tamás Zolnai <tamas.zol...@collabora.com> AuthorDate: Thu Apr 2 12:11:19 2020 +0200 Commit: Tamás Zolnai <tamas.zol...@collabora.com> CommitDate: Thu Apr 2 17:13:25 2020 +0200 cypress: mobile: avoid animations in mobile wizard. Cypress sometimes fails with 'DOM element is detached' failure because of the animation in the mobile wizard. Disable animation instead of waiting for 100 ms. I tried to override $.fn.show() function, but it's actually overriden by JQuery.ui code. Change-Id: I0e8e937a501a99b1106d7a450088760f67102bc2 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91569 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/apply_font_spec.js b/cypress_test/integration_tests/mobile/calc/apply_font_spec.js index c829890da..c54cbcfe3 100644 --- a/cypress_test/integration_tests/mobile/calc/apply_font_spec.js +++ b/cypress_test/integration_tests/mobile/calc/apply_font_spec.js @@ -26,8 +26,7 @@ describe('Apply font changes.', function() { .click(); cy.get('#Bold') - .should('be.visible') - .wait(100); + .should('be.visible'); }); afterEach(function() { diff --git a/cypress_test/integration_tests/mobile/calc/number_format_spec.js b/cypress_test/integration_tests/mobile/calc/number_format_spec.js index 942de9de0..03fef04bb 100644 --- a/cypress_test/integration_tests/mobile/calc/number_format_spec.js +++ b/cypress_test/integration_tests/mobile/calc/number_format_spec.js @@ -26,8 +26,7 @@ describe('Apply number formatting.', function() { .click(); cy.get('#category') - .should('be.visible') - .wait(100); + .should('be.visible'); }); afterEach(function() { @@ -225,8 +224,7 @@ describe('Apply number formatting.', function() { .click(); cy.get('#NumberFormatDecimal') - .should('be.visible') - .wait(100); + .should('be.visible'); // Change to number formatting cy.get('#NumberFormatDecimal') diff --git a/cypress_test/integration_tests/mobile/writer/apply_font_spec.js b/cypress_test/integration_tests/mobile/writer/apply_font_spec.js index 08e51940c..1f0ba1d2a 100644 --- a/cypress_test/integration_tests/mobile/writer/apply_font_spec.js +++ b/cypress_test/integration_tests/mobile/writer/apply_font_spec.js @@ -36,17 +36,9 @@ describe('Apply font changes.', function() { cy.get('#applystyle') .click(); - cy.wait(200); - cy.get('#mobile-wizard-back') .should('be.visible'); - cy.get('.mobile-wizard.ui-combobox-text') - .contains(styleName) - .scrollIntoView(); - - cy.wait(200); - cy.get('.mobile-wizard.ui-combobox-text') .contains(styleName) .click(); diff --git a/cypress_test/integration_tests/mobile/writer/apply_paragraph_properties_spec.js b/cypress_test/integration_tests/mobile/writer/apply_paragraph_properties_spec.js index 7db827bbf..13da19d7a 100644 --- a/cypress_test/integration_tests/mobile/writer/apply_paragraph_properties_spec.js +++ b/cypress_test/integration_tests/mobile/writer/apply_paragraph_properties_spec.js @@ -23,8 +23,7 @@ describe('Apply paragraph properties.', function() { .click(); cy.get('#Paragraph') - .should('have.class', 'selected') - .wait(100); + .should('have.class', 'selected'); }); afterEach(function() { diff --git a/cypress_test/integration_tests/mobile/writer/insert_field_spec.js b/cypress_test/integration_tests/mobile/writer/insert_field_spec.js index baba5e1ce..d17a33dac 100644 --- a/cypress_test/integration_tests/mobile/writer/insert_field_spec.js +++ b/cypress_test/integration_tests/mobile/writer/insert_field_spec.js @@ -22,8 +22,7 @@ describe('Insert fields via insertion wizard.', function() { .click(); cy.get('.ui-content.level-0.mobile-wizard') - .should('be.visible') - .wait(100); + .should('be.visible'); }); afterEach(function() { diff --git a/cypress_test/integration_tests/mobile/writer/insert_formatting_mark_spec.js b/cypress_test/integration_tests/mobile/writer/insert_formatting_mark_spec.js index 85733799f..2c1c35ed8 100644 --- a/cypress_test/integration_tests/mobile/writer/insert_formatting_mark_spec.js +++ b/cypress_test/integration_tests/mobile/writer/insert_formatting_mark_spec.js @@ -22,8 +22,7 @@ describe('Insert formatting mark via insertion wizard.', function() { .click(); cy.get('.ui-content.level-0.mobile-wizard') - .should('be.visible') - .wait(100); + .should('be.visible'); }); afterEach(function() { diff --git a/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js b/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js index a6141211d..12a07f534 100644 --- a/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js +++ b/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js @@ -49,14 +49,8 @@ describe('Change shape properties via mobile wizard.', function() { cy.get('#mobile-wizard') .should('not.be.visible'); - cy.get('#tb_actionbar_item_mobile_wizard') - .click(); - cy.get('#mobile-wizard') - .should('be.visible'); - // Change width - cy.get('#PosSizePropertyPanel') - .click(); + openPosSizePanel(); cy.get('#selectwidth .plus') .should('be.visible') @@ -93,8 +87,7 @@ describe('Change shape properties via mobile wizard.', function() { .click(); cy.get('.ui-content.level-0.mobile-wizard') - .should('be.visible') - .wait(100); + .should('be.visible'); } it('Check default shape geometry.', function() { diff --git a/cypress_test/integration_tests/mobile/writer/table_properties_spec.js b/cypress_test/integration_tests/mobile/writer/table_properties_spec.js index d199177e6..25ea31e0c 100644 --- a/cypress_test/integration_tests/mobile/writer/table_properties_spec.js +++ b/cypress_test/integration_tests/mobile/writer/table_properties_spec.js @@ -29,8 +29,7 @@ describe('Change table properties / layout via mobile wizard.', function() { .click(); cy.get('.ui-content.level-0.mobile-wizard') - .should('be.visible') - .wait(100); + .should('be.visible'); } function moveCursorToFirstCell() { diff --git a/cypress_test/integration_tests/mobile/writer/writer_helper.js b/cypress_test/integration_tests/mobile/writer/writer_helper.js index 57770fb87..74c5ece92 100644 --- a/cypress_test/integration_tests/mobile/writer/writer_helper.js +++ b/cypress_test/integration_tests/mobile/writer/writer_helper.js @@ -90,8 +90,7 @@ function selectAllMobile() { .click(); cy.get('.ui-header.level-1 .menu-entry-with-icon') - .should('be.visible') - .wait(100); + .should('be.visible'); // Do the selection cy.get('.ui-header.level-1 .menu-entry-with-icon') diff --git a/loleaflet/src/control/Control.MobileWizard.js b/loleaflet/src/control/Control.MobileWizard.js index 2edb21c75..ea0ad84b6 100644 --- a/loleaflet/src/control/Control.MobileWizard.js +++ b/loleaflet/src/control/Control.MobileWizard.js @@ -148,6 +148,9 @@ L.Control.MobileWizard = L.Control.extend({ goLevelDown: function(contentToShow, options) { var animate = (options && options.animate != undefined) ? options.animate : true; + // Animation fools cypress tests. + if (L.Browser.cypressTest) + animate = false; if (!this._isTabMode || this._currentDepth > 0) this.backButton.removeClass('close-button'); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits