[Libreoffice-commits] online.git: cypress_test/integration_tests
Tamás Zolnai (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jun 25 11:35:08 UTC 2020
cypress_test/integration_tests/mobile/writer/mobile_wizard_state_spec.js | 43 +++++-----
1 file changed, 24 insertions(+), 19 deletions(-)
New commits:
commit 4a805093bab0848c5d98e011e1d8dbf766c1a020
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Wed Jun 24 11:56:08 2020 +0200
Commit: Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Thu Jun 25 13:34:49 2020 +0200
cypress: fix 'Check level visibility in hamburger menu.' test.
Change-Id: I5a1dbc6d1f4ffa4455682e7d2f2e6931469c4a02
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97034
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 cb39c453a..d08413460 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 expect */
+/* global describe it cy beforeEach require afterEach */
var helper = require('../../common/helper');
var mobileHelper = require('../../common/mobile_helper');
@@ -73,44 +73,49 @@ describe('Mobile wizard state tests', function() {
// .should('have.class', 'checked');
});
- it.skip('Check level visibility in hamburger menu.', function() {
- helper.initAliasToNegative('originalHeight');
-
+ it('Check level visibility in hamburger menu.', function() {
// 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.contains('.ui-header.level-0.mobile-wizard', 'File')
+ .should('be.visible');
- cy.get('@originalTop')
- .should('be.greaterThan', 0);
+ cy.contains('.menu-entry-with-icon', 'Save')
+ .should('not.be.visible');
+
+ cy.contains('.menu-entry-with-icon', 'PDF Document (.pdf)')
+ .should('not.be.visible');
// Step in and step out the File submenu.
cy.contains('.menu-entry-with-icon', 'File')
.click();
- cy.contains('.menu-entry-with-icon', 'Print')
+ cy.contains('.ui-header.level-0.mobile-wizard', 'File')
+ .should('not.be.visible');
+
+ cy.contains('.menu-entry-with-icon', 'Save')
.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');
- 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);
- });
- });
+ // 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');
});
});
More information about the Libreoffice-commits
mailing list