[Libreoffice-commits] online.git: cypress_test/integration_tests
Tamás Zolnai (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jun 24 11:38:14 UTC 2020
cypress_test/integration_tests/mobile/writer/mobile_wizard_state_spec.js | 42 +++++++++-
1 file changed, 41 insertions(+), 1 deletion(-)
New commits:
commit 612f18ce0e695f884301a6a92853b90ebb6b3979
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Wed Jun 24 11:03:23 2020 +0200
Commit: Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Wed Jun 24 13:37:42 2020 +0200
cypress: test mobile wizard level handling in hamburger menu.
Catches 'merged levels' issue fixed by this commit:
801386effc84dd6e2d7c706c36a1c8bd6131d496
Change-Id: I2c56368e64afc08bc0e1aa3195c29ee91bf758e3
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97017
Tested-by: Jenkins
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/writer/mobile_wizard_state_spec.js b/cypress_test/integration_tests/mobile/writer/mobile_wizard_state_spec.js
index 0e86911db..bba0af268 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');
@@ -72,5 +72,45 @@ describe('Mobile wizard state tests', function() {
//cy.get('#tb_actionbar_item_mobile_wizard table')
// .should('have.class', 'checked');
});
+
+ it('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', 'About')
+ .invoke('offset')
+ .its('top')
+ .as('originalTop');
+
+ 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('.menu-entry-with-icon', 'Print')
+ .should('be.visible');
+
+ cy.get('#mobile-wizard-back')
+ .click();
+
+ cy.contains('.menu-entry-with-icon', 'File')
+ .should('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);
+ });
+ });
+ });
});
More information about the Libreoffice-commits
mailing list