cypress_test/integration_tests/mobile/writer/mobile_wizard_state_spec.js | 43 ++++------ 1 file changed, 19 insertions(+), 24 deletions(-)
New commits: commit c776c0f953e10fc593ca5762b175c3797484f224 Author: Tamás Zolnai <tamas.zol...@collabora.com> AuthorDate: Mon Jun 29 11:50:39 2020 +0200 Commit: Tamás Zolnai <tamas.zol...@collabora.com> CommitDate: Mon Jun 29 11:51:43 2020 +0200 Revert "cypress: fix 'Check level visibility in hamburger menu.' test." This reverts commit 4a805093bab0848c5d98e011e1d8dbf766c1a020. Change-Id: I59bcb1eb0e8f4eedbfc6a6683e319bd89197137e Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97376 Tested-by: Tamás Zolnai <tamas.zol...@collabora.com> Reviewed-by: Tamás Zolnai <tamas.zol...@collabora.com> diff --git a/cypress_test/integration_tests/mobile/writer/mobile_wizard_state_spec.js b/cypress_test/integration_tests/mobile/writer/mobile_wizard_state_spec.js index d08413460..cb39c453a 100644 --- a/cypress_test/integration_tests/mobile/writer/mobile_wizard_state_spec.js +++ b/cypress_test/integration_tests/mobile/writer/mobile_wizard_state_spec.js @@ -1,4 +1,4 @@ -/* global describe it cy beforeEach require afterEach */ +/* global describe it cy beforeEach require afterEach expect */ var helper = require('../../common/helper'); var mobileHelper = require('../../common/mobile_helper'); @@ -73,49 +73,44 @@ describe('Mobile wizard state tests', function() { // .should('have.class', 'checked'); }); - it('Check level visibility in hamburger menu.', function() { + it.skip('Check level visibility in hamburger menu.', function() { + helper.initAliasToNegative('originalHeight'); + // Click on edit button mobileHelper.enableEditingMobile(); mobileHelper.openHamburgerMenu(); // Get mobile wizard last item vertical pos. - cy.contains('.ui-header.level-0.mobile-wizard', 'File') - .should('be.visible'); + cy.contains('.ui-header.level-0.mobile-wizard', 'About') + .invoke('offset') + .its('top') + .as('originalTop'); - cy.contains('.menu-entry-with-icon', 'Save') - .should('not.be.visible'); - - cy.contains('.menu-entry-with-icon', 'PDF Document (.pdf)') - .should('not.be.visible'); + cy.get('@originalTop') + .should('be.greaterThan', 0); // Step in and step out the File submenu. cy.contains('.menu-entry-with-icon', 'File') .click(); - cy.contains('.ui-header.level-0.mobile-wizard', 'File') - .should('not.be.visible'); - - cy.contains('.menu-entry-with-icon', 'Save') + cy.contains('.menu-entry-with-icon', 'Print') .should('be.visible'); - cy.contains('.menu-entry-with-icon', 'PDF Document (.pdf)') - .should('not.be.visible'); - cy.get('#mobile-wizard-back') .click(); cy.contains('.menu-entry-with-icon', 'File') .should('be.visible'); - // Here the menu items was merged after a short delay. - cy.wait(1000); - - cy.contains('.menu-entry-with-icon', 'Save') - .should('not.be.visible'); - - cy.contains('.menu-entry-with-icon', 'PDF Document (.pdf)') - .should('not.be.visible'); + cy.get('@originalTop') + .then(function(originalTop) { + cy.contains('.ui-header.level-0.mobile-wizard', 'About') + .should(function(content) { + expect(content.offset().top).to.be.lessThan(originalTop + 0.0001); + expect(content.offset().top).to.be.greaterThan(originalTop - 0.0001); + }); + }); }); }); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits