[Libreoffice-commits] online.git: cypress_test/data cypress_test/integration_tests loleaflet/src

2020-04-21 Thread Tamás Zolnai (via logerrit)
 cypress_test/data/mobile/writer/table_properties.odt   
 |binary
 cypress_test/integration_tests/mobile/calc/alignment_options_spec.js   
 |   16 -
 cypress_test/integration_tests/mobile/calc/apply_font_spec.js  
 |   21 -
 cypress_test/integration_tests/mobile/calc/calc_helper.js  
 |   31 --
 cypress_test/integration_tests/mobile/calc/cell_appearance_spec.js 
 |   46 ++-
 cypress_test/integration_tests/mobile/calc/insertion_wizard_spec.js
 |6 
 cypress_test/integration_tests/mobile/calc/number_format_spec.js   
 |   32 +-
 cypress_test/integration_tests/mobile/calc/spellchecking_spec.js   
 |7 
 cypress_test/integration_tests/mobile/impress/impress_helper.js
 |   26 -
 cypress_test/integration_tests/mobile/impress/spellchecking_spec.js
 |8 
 cypress_test/integration_tests/mobile/writer/apply_font_spec.js
 |   30 +-
 
cypress_test/integration_tests/mobile/writer/apply_paragraph_properties_spec.js 
|  105 +++
 cypress_test/integration_tests/mobile/writer/bottom_toolbar_spec.js
 |   42 +--
 cypress_test/integration_tests/mobile/writer/insert_field_spec.js  
 |   14 -
 cypress_test/integration_tests/mobile/writer/insert_formatting_mark_spec.js
 |   51 +--
 cypress_test/integration_tests/mobile/writer/insert_object_spec.js 
 |6 
 cypress_test/integration_tests/mobile/writer/spellchecking_spec.js 
 |7 
 cypress_test/integration_tests/mobile/writer/table_properties_spec.js  
 |  133 +-
 cypress_test/integration_tests/mobile/writer/writer_helper.js  
 |   48 ---
 dev/null   
 |binary
 loleaflet/src/map/Clipboard.js 
 |   10 
 21 files changed, 270 insertions(+), 369 deletions(-)

New commits:
commit 49edc462b7d563bb1f7e4d41505bdc967878ccb4
Author: Tamás Zolnai 
AuthorDate: Tue Apr 21 14:31:30 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Tue Apr 21 20:31:42 2020 +0200

cypress: assign selection data to clipboard container as soon as it arrives.

So we don't need to trigger a fake copying to get the
content. It will make things easier.

Change-Id: I0964fe697602d77078f10792355fbda23879c7c9
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92645
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/data/mobile/writer/table_properties.odt 
b/cypress_test/data/mobile/writer/table_properties.odt
index 550752605..bec92754c 100644
Binary files a/cypress_test/data/mobile/writer/table_properties.odt and 
b/cypress_test/data/mobile/writer/table_properties.odt differ
diff --git a/cypress_test/data/mobile/writer/table_properties2.odt 
b/cypress_test/data/mobile/writer/table_properties2.odt
deleted file mode 100644
index bec92754c..0
Binary files a/cypress_test/data/mobile/writer/table_properties2.odt and 
/dev/null differ
diff --git 
a/cypress_test/integration_tests/mobile/calc/alignment_options_spec.js 
b/cypress_test/integration_tests/mobile/calc/alignment_options_spec.js
index d88b74ac8..af9c6a449 100644
--- a/cypress_test/integration_tests/mobile/calc/alignment_options_spec.js
+++ b/cypress_test/integration_tests/mobile/calc/alignment_options_spec.js
@@ -57,7 +57,7 @@ describe('Change alignment settings.', function() {
cy.get('#AlignRight')
.click();
 
-   calcHelper.copyContentToClipboard();
+   calcHelper.selectAllMobile();
 
cy.get('#copy-paste-container table td')
.should('have.attr', 'align', 'right');
@@ -73,7 +73,7 @@ describe('Change alignment settings.', function() {
cy.get('#AlignLeft')
.click();
 
-   calcHelper.copyContentToClipboard();
+   calcHelper.selectAllMobile();
 
cy.get('#copy-paste-container table td')
.should('have.attr', 'align', 'left');
@@ -85,7 +85,7 @@ describe('Change alignment settings.', function() {
cy.get('#AlignHorizontalCenter')
.click();
 
-   calcHelper.copyContentToClipboard();
+   calcHelper.selectAllMobile();
 
cy.get('#copy-paste-container table td')
.should('have.attr', 'align', 'center');
@@ -98,7 +98,7 @@ describe('Change alignment settings.', function() {
cy.get('#AlignBlock')
.click();
 
-   calcHelper.copyContentToClipboard();
+   calcHelper.selectAllMobile();
 
cy.get('#copy-paste-container table td')
.should('have.attr', 'align', 'justify');
@@ -127,7 +127,7 @@ describe('Change alignment settings.

[Libreoffice-commits] online.git: cypress_test/data cypress_test/integration_tests loleaflet/src

2020-04-15 Thread Szymon Kłos (via logerrit)
 cypress_test/data/desktop/focus.odp |binary
 cypress_test/integration_tests/desktop/slide_operations_spec.js |   60 
++
 loleaflet/src/control/Control.PartsPreview.js   |3 
 3 files changed, 62 insertions(+), 1 deletion(-)

New commits:
commit 12ba5a3004549f739b576605ce7088be52264bc6
Author: Szymon Kłos 
AuthorDate: Wed Apr 15 17:04:47 2020 +0200
Commit: Tamás Zolnai 
CommitDate: Wed Apr 15 22:45:39 2020 +0200

Add cypress test for slide operations

Change-Id: I08d1c1f2fc6e6b1dab84040ce235dfbd6bbb59ec
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92280
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/data/desktop/focus.odp 
b/cypress_test/data/desktop/focus.odp
new file mode 100644
index 0..ffefc9e64
Binary files /dev/null and b/cypress_test/data/desktop/focus.odp differ
diff --git a/cypress_test/integration_tests/desktop/slide_operations_spec.js 
b/cypress_test/integration_tests/desktop/slide_operations_spec.js
new file mode 100644
index 0..3b135d44b
--- /dev/null
+++ b/cypress_test/integration_tests/desktop/slide_operations_spec.js
@@ -0,0 +1,60 @@
+/* global describe it cy require afterEach*/
+
+var helper = require('../common/helper');
+
+describe('Slide operations', function() {
+
+   afterEach(function() {
+   helper.afterAll('focus.odp');
+   });
+
+   function assertNumberOfSlides(slides) {
+   cy.get('.preview-frame')
+   .should('have.length', slides + 1);
+   }
+
+   it('Add slides', function() {
+   helper.loadTestDoc('focus.odp');
+
+   cy.get('#tb_presentation-toolbar_item_insertpage')
+   .should('not.have.class', 'disabled')
+   .click();
+
+   assertNumberOfSlides(2);
+   });
+
+   it('Remove slides', function() {
+   helper.loadTestDoc('focus.odp');
+
+   // Add slides
+   cy.get('#tb_presentation-toolbar_item_insertpage')
+   .should('not.have.class', 'disabled')
+   .click();
+
+   assertNumberOfSlides(2);
+
+   // Remove Slides
+   cy.get('#tb_presentation-toolbar_item_deletepage')
+   .should('not.have.class', 'disabled')
+   .click();
+
+   cy.get('.vex-dialog-button-primary').click();
+
+   cy.get('#tb_presentation-toolbar_item_deletepage')
+   .should('have.class', 'disabled');
+
+   assertNumberOfSlides(1);
+
+   });
+
+   it('Duplicate slide', function() {
+   helper.loadTestDoc('focus.odp');
+
+   cy.get('#tb_presentation-toolbar_item_duplicatepage')
+   .should('not.have.class', 'disabled')
+   .click();
+
+   assertNumberOfSlides(2);
+
+   });
+});
diff --git a/loleaflet/src/control/Control.PartsPreview.js 
b/loleaflet/src/control/Control.PartsPreview.js
index fb794fe32..045b9b01f 100644
--- a/loleaflet/src/control/Control.PartsPreview.js
+++ b/loleaflet/src/control/Control.PartsPreview.js
@@ -387,7 +387,8 @@ L.Control.PartsPreview = L.Control.extend({
if (this._map.getDocType() === 'presentation' || 
this._map.getDocType() === 'drawing') {
if (!this._previewInitialized)
return;
-   this._previewTiles[e.id].src = e.tile;
+   if (this._previewTiles[e.id])
+   this._previewTiles[e.id].src = e.tile;
}
},
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits