cypress_test/integration_tests/mobile/insert_object_spec.js |   16 ++++++++++--
 loleaflet/src/control/Control.MobileWizard.js               |    2 -
 2 files changed, 15 insertions(+), 3 deletions(-)

New commits:
commit 4360aba86263161e323844801c3cf5e00d541b4a
Author:     Tamás Zolnai <tamas.zol...@collabora.com>
AuthorDate: Mon Jan 27 13:21:58 2020 +0100
Commit:     Tamás Zolnai <tamas.zol...@collabora.com>
CommitDate: Mon Jan 27 13:53:36 2020 +0100

    cypress: mobile: Update shape insertion test case.
    
    Now, that the insertion is fixed and works.
    
    Change-Id: I89eaf83992cb55db05953727ea973fb0e6820ae4

diff --git a/cypress_test/integration_tests/mobile/insert_object_spec.js 
b/cypress_test/integration_tests/mobile/insert_object_spec.js
index ef551323e..f2e9d435b 100644
--- a/cypress_test/integration_tests/mobile/insert_object_spec.js
+++ b/cypress_test/integration_tests/mobile/insert_object_spec.js
@@ -237,11 +237,23 @@ describe('Insert objects via insertion wizard.', 
function() {
 
        it('Insert shape.', function() {
                // Do insertion
-               // TODO: it crashes
                cy.get('.menu-entry-with-icon')
                        .contains('Shape')
                        .click();
-               // regression from: 298f4297c21f4b7cd5836b90bafcc803f13adb00
+
+               cy.get('.col.w2ui-icon.basicshapes_rectangle').
+                       click();
+
+               // Check that the shape is there
+               cy.get('.leaflet-pane.leaflet-overlay-pane svg g')
+                       .should('exist');
+
+               cy.get('.leaflet-pane.leaflet-overlay-pane svg')
+                       .then(function(svg) {
+                               expect(svg).to.have.lengthOf(1);
+                               
expect(svg[0].getBBox().width).to.be.greaterThan(0);
+                               
expect(svg[0].getBBox().height).to.be.greaterThan(0);
+                       });
        });
 
        it('Insert formatting mark.', function() {
commit 3ae759eec0aafa2a1c6bf469130e022c590c0532
Author:     Tamás Zolnai <tamas.zol...@collabora.com>
AuthorDate: Mon Jan 27 13:17:45 2020 +0100
Commit:     Tamás Zolnai <tamas.zol...@collabora.com>
CommitDate: Mon Jan 27 13:53:36 2020 +0100

    mobile: Fix shape insertion
    
    Regression from:
    298f4297c21f4b7cd5836b90bafcc803f13adb00
    
    Change-Id: I4b31da57bde7f7ac6a5554f3ff7763f1b4ee76d5

diff --git a/loleaflet/src/control/Control.MobileWizard.js 
b/loleaflet/src/control/Control.MobileWizard.js
index 5e44b6154..ea7a7c557 100644
--- a/loleaflet/src/control/Control.MobileWizard.js
+++ b/loleaflet/src/control/Control.MobileWizard.js
@@ -291,7 +291,7 @@ L.Control.MobileWizard = L.Control.extend({
                        this._reset();
 
                        var mWizardContentLength;
-                       if (data.children[0].type == 'menuitem')
+                       if (data.children[0].type == 'menuitem' || 
data.children[0].type == 'htmlcontrol')
                                mWizardContentLength = data.children.length;
                        else mWizardContentLength = 
data.children[0].children.length;
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to