cypress_test/integration_tests/mobile/writer/bottom_toolbar_spec.js | 12 ++++ cypress_test/integration_tests/mobile/writer/writer_helper.js | 30 +++++++++- 2 files changed, 39 insertions(+), 3 deletions(-)
New commits: commit fdbca4dcf11f38c6e4da65634f88cba727ec4e9d Author: Tamás Zolnai <tamas.zol...@collabora.com> AuthorDate: Wed Mar 18 11:34:06 2020 +0100 Commit: Tamás Zolnai <tamas.zol...@collabora.com> CommitDate: Wed Mar 18 20:44:48 2020 +0100 cypress: mobile: restore original selectAllMobile() in writer_helper.js. Using CTRL+A is simpler, but with using the Hamburger menu we can make sure that menu item is working. CTRL+A is not an actual feature on mobile. Also it's good that we use hamburger menu, so we can check interaction of hamburger menu and other wizards using the same bottom panel. Change-Id: I640e515070046ad18b00be69509ed895844962a0 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90710 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/bottom_toolbar_spec.js b/cypress_test/integration_tests/mobile/writer/bottom_toolbar_spec.js index edc05ca95..fd23fd030 100644 --- a/cypress_test/integration_tests/mobile/writer/bottom_toolbar_spec.js +++ b/cypress_test/integration_tests/mobile/writer/bottom_toolbar_spec.js @@ -35,6 +35,10 @@ describe('Pushing bottom toolbar items.', function() { }); it('Apply bold, check keyboard.', function() { + cy.get('#document-container') + .type('{downarrow}'); + helper.selectAllText(); + cy.get('#tb_editbar_item_bold div table') .should('not.have.class', 'checked'); @@ -71,6 +75,10 @@ describe('Pushing bottom toolbar items.', function() { }); it('Apply italic, check keyboard.', function() { + cy.get('#document-container') + .type('{downarrow}'); + helper.selectAllText(); + cy.get('#tb_editbar_item_italic div table') .should('not.have.class', 'checked'); @@ -107,6 +115,10 @@ describe('Pushing bottom toolbar items.', function() { }); it('Apply underline, check keyboard.', function() { + cy.get('#document-container') + .type('{downarrow}'); + helper.selectAllText(); + cy.get('#tb_editbar_item_underline div table') .should('not.have.class', 'checked'); diff --git a/cypress_test/integration_tests/mobile/writer/writer_helper.js b/cypress_test/integration_tests/mobile/writer/writer_helper.js index e9e9ef59b..0e2385a51 100644 --- a/cypress_test/integration_tests/mobile/writer/writer_helper.js +++ b/cypress_test/integration_tests/mobile/writer/writer_helper.js @@ -95,13 +95,37 @@ function clearMobileWizardState() { } function selectAllMobile() { + cy.log('Select all via hamburger menu - start.'); + // Remove selection if exist - //FIXME: this also gives the focus to the Writer doc, - // which shouldn't be needed (i.e. should have focus already). cy.get('#document-container') .type('{downarrow}'); + cy.get('.leaflet-marker-icon') + .should('not.exist'); + + // Open hamburger menu + cy.get('#toolbar-hamburger') + .click(); + cy.get('#mobile-wizard') + .should('be.visible', {timeout : 10000}); + + // Open edit menu + cy.get('.ui-header.level-0 .menu-entry-with-icon') + .contains('Edit') + .click(); + + cy.get('.ui-header.level-1 .menu-entry-with-icon') + .should('be.visible') + .wait(100); + + // Do the selection + cy.get('.ui-header.level-1 .menu-entry-with-icon') + .contains('Select All') + .click(); + cy.get('.leaflet-marker-icon') + .should('exist'); - helper.selectAllText(); + cy.log('Select all via hamburger menu - end.'); } module.exports.copyTextToClipboard = copyTextToClipboard; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits