cypress_test/integration_tests/mobile/writer/shape_properties_spec.js |   17 
+++----
 cypress_test/integration_tests/mobile/writer/writer_helper.js         |   23 
----------
 loleaflet/src/control/Control.MobileWizard.js                         |    1 
 3 files changed, 9 insertions(+), 32 deletions(-)

New commits:
commit 30161c9b4e385f457e4e6b36af48357180ad335a
Author:     Tamás Zolnai <zolnaitamas2...@gmail.com>
AuthorDate: Wed Mar 25 17:37:56 2020 +0100
Commit:     Tamás Zolnai <tamas.zol...@collabora.com>
CommitDate: Thu Mar 26 12:45:35 2020 +0100

    mobile: don't show a dummy mobile wizard before sidebar content arrives.
    
    If we show the mobilw wizard instantly after the mobile
    wizard toolbar button is pushed, then mobile wizard will
    be an empty bottom panel with an undefined content. It's
    better to show the content, only after we get the
    sidebar content from core.
    For example, if the hamburger menu was displayed in the
    bottom panel previously then we will see a white screen
    first when we push the mobile wizard toolbar button. This
    white screen is the background layout of the mobile wizard.
    
    It looks wierd and also makes testing hard since we have
    some wierd dummy HTML structures.
    
    Change-Id: I852bce1ca1460b2210229bec294a249a47523099
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91062
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Tamás Zolnai <tamas.zol...@collabora.com>

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 b315d276d..a6141211d 100644
--- a/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js
@@ -35,7 +35,7 @@ describe('Change shape properties via mobile wizard.', 
function() {
                        click();
 
                // Check that the shape is there
-               cy.get('.leaflet-pane.leaflet-overlay-pane svg g svg g')
+               cy.get('.leaflet-pane.leaflet-overlay-pane svg g svg g', 
{timeout : 10000})
                        .should('have.class', 
'com.sun.star.drawing.CustomShape');
        });
 
@@ -49,8 +49,6 @@ describe('Change shape properties via mobile wizard.', 
function() {
                cy.get('#mobile-wizard')
                        .should('not.be.visible');
 
-               writerHelper.clearMobileWizardState();
-
                cy.get('#tb_actionbar_item_mobile_wizard')
                        .click();
                cy.get('#mobile-wizard')
@@ -63,6 +61,11 @@ describe('Change shape properties via mobile wizard.', 
function() {
                cy.get('#selectwidth .plus')
                        .should('be.visible')
                        .click();
+
+               cy.get('#tb_actionbar_item_mobile_wizard')
+                       .click();
+               cy.get('#mobile-wizard')
+                       .should('not.be.visible');
        }
 
        function openPosSizePanel() {
@@ -103,7 +106,7 @@ describe('Change shape properties via mobile wizard.', 
function() {
                        .should('have.attr', 'fill', 'rgb(114,159,207)');
        });
 
-       it.skip('Change shape width.', function() {
+       it('Change shape width.', function() {
                // TODO: Entering a value inside the spinbutton has no effect 
on the shape.
                if (Cypress.env('LO_CORE_VERSION') === 'master')
                        return;
@@ -116,7 +119,7 @@ describe('Change shape properties via mobile wizard.', 
function() {
                        .type('{enter}');
 
                cy.get('.leaflet-pane.leaflet-overlay-pane svg g svg g g g 
path')
-                       .should('have.attr', 'd', defaultGeometry);
+                       .should('not.have.attr', 'd', defaultGeometry);
 
                cy.get('.leaflet-pane.leaflet-overlay-pane svg g svg g g g 
path')
                        .should('have.attr', 'd', 'M 1965,4863 L 12635,10855 
1965,10855 1965,4863 1965,4863 Z');
@@ -256,7 +259,7 @@ describe('Change shape properties via mobile wizard.', 
function() {
                        .should('have.length.greaterThan', 12);
        });
 
-       it.skip('Change line width', function() {
+       it('Change line width', function() {
                // TODO: Layout of the line properties panel is completely 
broken.
                if (Cypress.env('LO_CORE_VERSION') === 'master')
                        return;
@@ -274,8 +277,6 @@ describe('Change shape properties via mobile wizard.', 
function() {
                cy.get('.leaflet-pane.leaflet-overlay-pane svg g svg g g g 
path[fill="none"]')
                        .should('have.attr', 'stroke-width', '141');
 
-               writerHelper.clearMobileWizardState();
-
                openLinePropertyPanel();
 
                cy.get('#linewidth .minus')
diff --git a/cypress_test/integration_tests/mobile/writer/writer_helper.js 
b/cypress_test/integration_tests/mobile/writer/writer_helper.js
index 943b9ef38..57770fb87 100644
--- a/cypress_test/integration_tests/mobile/writer/writer_helper.js
+++ b/cypress_test/integration_tests/mobile/writer/writer_helper.js
@@ -70,28 +70,6 @@ function copyTableToClipboard() {
                .should('not.exist');
 }
 
-// Use this method when a test openes the same mobile
-// wizard more times during a test.
-// Recent issue with this scenario is that the mobile
-// wizard is opened first with an old content, then
-// when the sidebar's state arrives the wizard is
-// rerendered again which might cause a test failure
-// because the test finds the old HTML item
-// which will be detached from DOM.
-function clearMobileWizardState() {
-       // Open hamburger menu
-       helper.pushHamburgerMenuIconMobile();
-
-       cy.get('#mobile-wizard-content')
-               .should('be.visible');
-
-       cy.get('.menu-entry-with-icon')
-               .contains('About', {timeout: 10000});
-
-       // Close hamburger menu
-       helper.pushHamburgerMenuIconMobile();
-}
-
 function selectAllMobile() {
        cy.log('Select all via hamburger menu - start.');
 
@@ -127,5 +105,4 @@ function selectAllMobile() {
 
 module.exports.copyTextToClipboard = copyTextToClipboard;
 module.exports.copyTableToClipboard = copyTableToClipboard;
-module.exports.clearMobileWizardState = clearMobileWizardState;
 module.exports.selectAllMobile = selectAllMobile;
diff --git a/loleaflet/src/control/Control.MobileWizard.js 
b/loleaflet/src/control/Control.MobileWizard.js
index 1f10b1a60..2df267c54 100644
--- a/loleaflet/src/control/Control.MobileWizard.js
+++ b/loleaflet/src/control/Control.MobileWizard.js
@@ -84,7 +84,6 @@ L.Control.MobileWizard = L.Control.extend({
        _showWizardSidebar: function() {
                this.map.showSidebar = true;
                this._refreshSidebar();
-               this._showWizard();
        },
 
        _hideWizard: function() {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to