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

Pedro Pinto Silva (via logerrit) logerrit at kemper.freedesktop.org
Tue Feb 25 11:06:49 UTC 2020


 cypress_test/integration_tests/mobile/writer/focus_spec.js                  |    2 -
 cypress_test/integration_tests/mobile/writer/insert_field_spec.js           |    2 -
 cypress_test/integration_tests/mobile/writer/insert_formatting_mark_spec.js |    4 +-
 cypress_test/integration_tests/mobile/writer/insert_object_spec.js          |   12 ++++----
 loleaflet/images/lc_formattingmark.svg                                      |    3 ++
 loleaflet/images/lc_insertfield.svg                                         |    1 
 loleaflet/images/lc_insertheaderfooter.svg                                  |    1 
 loleaflet/images/lc_insertnonbreakingspace.svg                              |    3 ++
 loleaflet/images/lc_insertpagefooter.svg                                    |    8 +++++
 loleaflet/images/lc_insertpageheader.svg                                    |    8 +++++
 loleaflet/src/control/Control.Menubar.js                                    |   14 +++++-----
 11 files changed, 41 insertions(+), 17 deletions(-)

New commits:
commit f3b8455aaa8123e24e4e29a8cd79fa363a009d7f
Author:     Pedro Pinto Silva <pedro.silva at collabora.com>
AuthorDate: Mon Feb 24 11:10:19 2020 +0100
Commit:     Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Tue Feb 25 12:06:31 2020 +0100

    Mobile: Insert: Add missing icons, add missing ids, create missing icons, also add sub level icns for footerandheader and formattingmark (fixing cypress)
    
    Change-Id: Id3ca33095b5eae7d13129f4b9629e2c0faf302fb
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89371
    Tested-by: Tamás Zolnai <tamas.zolnai at collabora.com>
    Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>

diff --git a/cypress_test/integration_tests/mobile/writer/focus_spec.js b/cypress_test/integration_tests/mobile/writer/focus_spec.js
index 3874c6710..dce4cd646 100644
--- a/cypress_test/integration_tests/mobile/writer/focus_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/focus_spec.js
@@ -135,7 +135,7 @@ describe('Focus tests', function() {
 			.should('not.be.empty');
 
 		// Select More Fields
-		cy.get('.ui-header.level-0.mobile-wizard.ui-widget .sub-menu-title')
+		cy.get('.ui-header.level-0.mobile-wizard.ui-widget')
 			.contains('More Fields...')
 			.parent().click();
 
diff --git a/cypress_test/integration_tests/mobile/writer/insert_field_spec.js b/cypress_test/integration_tests/mobile/writer/insert_field_spec.js
index 7f849dd25..5e9b14b89 100644
--- a/cypress_test/integration_tests/mobile/writer/insert_field_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/insert_field_spec.js
@@ -15,7 +15,7 @@ describe('Insert fields via insertion wizard.', function() {
 			.click();
 
 		// Open fields submenu
-		cy.get('.sub-menu-title')
+		cy.get('.menu-entry-with-icon.flex-fullwidth')
 			.contains('More Fields...')
 			.click();
 
diff --git a/cypress_test/integration_tests/mobile/writer/insert_formatting_mark_spec.js b/cypress_test/integration_tests/mobile/writer/insert_formatting_mark_spec.js
index 90b6b0d9e..3f83e2a1f 100644
--- a/cypress_test/integration_tests/mobile/writer/insert_formatting_mark_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/insert_formatting_mark_spec.js
@@ -15,7 +15,7 @@ describe('Insert formatting mark via insertion wizard.', function() {
 			.click();
 
 		// Open formatting marks
-		cy.get('.sub-menu-title')
+		cy.get('.menu-entry-with-icon.flex-fullwidth')
 			.contains('Formatting Mark')
 			.click();
 
@@ -29,7 +29,7 @@ describe('Insert formatting mark via insertion wizard.', function() {
 	});
 
 	it('Insert non-breaking space.', function() {
-		cy.get('.menu-entry-no-icon')
+		cy.get('.menu-entry-with-icon')
 			.contains('Non-breaking space')
 			.click();
 
diff --git a/cypress_test/integration_tests/mobile/writer/insert_object_spec.js b/cypress_test/integration_tests/mobile/writer/insert_object_spec.js
index 70d13c570..ab58331ef 100644
--- a/cypress_test/integration_tests/mobile/writer/insert_object_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/insert_object_spec.js
@@ -53,7 +53,7 @@ describe('Insert objects via insertion wizard.', function() {
 			.click();
 
 		// Open Table submenu
-		cy.get('.menu-entry-with-icon.flex-fullwidth')
+		cy.get('.ui-header.level-0.mobile-wizard.ui-widget')
 			.contains('Table')
 			.click();
 		cy.get('.mobile-wizard.ui-text')
@@ -88,7 +88,7 @@ describe('Insert objects via insertion wizard.', function() {
 			.click();
 
 		// Open Table submenu
-		cy.get('.menu-entry-with-icon.flex-fullwidth')
+		cy.get('.ui-header.level-0.mobile-wizard.ui-widget')
 			.contains('Table')
 			.click();
 		cy.get('.mobile-wizard.ui-text')
@@ -135,14 +135,14 @@ describe('Insert objects via insertion wizard.', function() {
 			.click();
 
 		// Open header/footer submenu
-		cy.get('.sub-menu-title')
+		cy.get('.menu-entry-with-icon')
 			.contains('Header and Footer')
 			.click();
 		cy.get('.ui-header.level-1.mobile-wizard.ui-widget')
 			.should('be.visible');
 
 		// Open header submenu
-		cy.get('.ui-header.level-1.mobile-wizard.ui-widget .sub-menu-title')
+		cy.get('.ui-header.level-1.mobile-wizard.ui-widget')
 			.contains('Header')
 			.click();
 
@@ -176,14 +176,14 @@ describe('Insert objects via insertion wizard.', function() {
 			.click();
 
 		// Open header/footer submenu
-		cy.get('.sub-menu-title')
+		cy.get('.menu-entry-with-icon')
 			.contains('Header and Footer')
 			.click();
 		cy.get('.ui-header.level-1.mobile-wizard.ui-widget')
 			.should('be.visible');
 
 		// Open footer submenu
-		cy.get('.ui-header.level-1.mobile-wizard.ui-widget .sub-menu-title')
+		cy.get('.ui-header.level-1.mobile-wizard.ui-widget')
 			.contains('Footer')
 			.click();
 
diff --git a/loleaflet/images/lc_formattingmark.svg b/loleaflet/images/lc_formattingmark.svg
new file mode 100644
index 000000000..2c8bbb6da
--- /dev/null
+++ b/loleaflet/images/lc_formattingmark.svg
@@ -0,0 +1,3 @@
+<svg version="1.1" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
+ <path d="m2 9.5h3v4h14v-4h2.9998" fill="none" stroke="#4d82b8" stroke-width="2"/>
+</svg>
diff --git a/loleaflet/images/lc_insertfield.svg b/loleaflet/images/lc_insertfield.svg
new file mode 100644
index 000000000..a2d6d0003
--- /dev/null
+++ b/loleaflet/images/lc_insertfield.svg
@@ -0,0 +1 @@
+<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m5 4v17h6.283203c-.175464-.296519-.283203-.636031-.283203-1 0-1.090703.909297-2 2-2v-1c-1.090703 0-2-.909297-2-2s.909297-2 2-2c0-1.090703.909297-2 2-2s2 .909297 2 2h1c0-.726734.407943-1.366449 1-1.716797v-3.5546874l-4-3.7285156zm12 13v1h1v-1z" fill="#fff"/><path d="m5 3c-.554 0-1 .446-1 1v17c0 .554.446 1 1 1h8c-.726734 0-1.366449-.407943-1.716797-1h-6.283203v-17h9v4c0 .554.446 1 1 1h4v2.283203c.296519-.175464.636031-.283203 1-.283203v-2.75-.2089844c0-.4506799.098038-.4254121-.605469-1.0664062l-3.30664-3.2382813c-.709525-.7368575-.710169-.7363281-1.09375-.7363281h-.332032-.662109z" fill="#808080"/><path d="m15 8h4l-4-4z" fill="#fff" fill-rule="evenodd"/><path d="m15 12c-.554 0-1 .446-1 1v1h-1c-.554 0-1 .446-1 1s.446 1 1 1h1v3h-1c-.554 0-1 .446-1 1s.446 1 1 1h1v1c0 .554.446 1 1 1s1-.446 1-1v-1h3v1c0 .554.446 1 1 1s1-.446 1-1v-1h1c.554 0 1-.446 1-1s-.446-1-1-1h-1v-3h1c.554 0 1-.446 1-1s-.446-1-1-1h-1v-1c0-.554-.446-1-
 1-1s-1 .446-1 1v1h-3v-1c0-.554-.446-1-1-1zm1 4h3v3h-3z" fill="#4d82b8"/></svg>
\ No newline at end of file
diff --git a/loleaflet/images/lc_insertheaderfooter.svg b/loleaflet/images/lc_insertheaderfooter.svg
new file mode 100644
index 000000000..4c03f51d4
--- /dev/null
+++ b/loleaflet/images/lc_insertheaderfooter.svg
@@ -0,0 +1 @@
+<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m5 3v18h14v-14.2705905l-4-3.7294095z" fill="#fff"/><path d="m5 2c-.554 0-1 .446-1 1v18c0 .554.446 1 1 1h14c.554 0 1-.446 1-1v-10.109375-3.6412209-.2079239c0-.4506799.09887-.4265951-.604637-1.0675892l-3.307389-3.2370335c-.709525-.7368575-.711223-.7368575-1.094804-.7368575h-.331557-.661613zm0 1h9v4c0 .554.446 1 1 1h4v13h-14z" fill="#808080"/><path d="m15 7h4l-4-4z" fill="#fff" fill-rule="evenodd"/><g fill="#eac282"><path d="m6 4h7v3h-7z"/><path d="m6 17h11v3h-11z"/></g></svg>
\ No newline at end of file
diff --git a/loleaflet/images/lc_insertnonbreakingspace.svg b/loleaflet/images/lc_insertnonbreakingspace.svg
new file mode 100644
index 000000000..2c8bbb6da
--- /dev/null
+++ b/loleaflet/images/lc_insertnonbreakingspace.svg
@@ -0,0 +1,3 @@
+<svg version="1.1" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
+ <path d="m2 9.5h3v4h14v-4h2.9998" fill="none" stroke="#4d82b8" stroke-width="2"/>
+</svg>
diff --git a/loleaflet/images/lc_insertpagefooter.svg b/loleaflet/images/lc_insertpagefooter.svg
new file mode 100644
index 000000000..7e49b478e
--- /dev/null
+++ b/loleaflet/images/lc_insertpagefooter.svg
@@ -0,0 +1,8 @@
+<svg version="1.1" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
+ <path d="m5 3v18h14v-14.271l-4-3.7294z" fill="#fff"/>
+ <path d="m5 2c-0.554 0-1 0.446-1 1v18c0 0.554 0.446 1 1 1h14c0.554 0 1-0.446 1-1v-13.959c0-0.45068 0.09887-0.4266-0.60464-1.0676l-3.3074-3.237c-0.70952-0.73686-0.71122-0.73686-1.0948-0.73686h-0.99317zm0 1h9v4c0 0.554 0.446 1 1 1h4v13h-14z" fill="#808080"/>
+ <path d="m15 7h4l-4-4z" fill="#fff" fill-rule="evenodd"/>
+ <g fill="#eac282">
+  <path d="m6 17h11v3h-11z"/>
+ </g>
+</svg>
diff --git a/loleaflet/images/lc_insertpageheader.svg b/loleaflet/images/lc_insertpageheader.svg
new file mode 100644
index 000000000..bd6820b27
--- /dev/null
+++ b/loleaflet/images/lc_insertpageheader.svg
@@ -0,0 +1,8 @@
+<svg version="1.1" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
+ <path d="m5 3v18h14v-14.271l-4-3.7294z" fill="#fff"/>
+ <path d="m5 2c-0.554 0-1 0.446-1 1v18c0 0.554 0.446 1 1 1h14c0.554 0 1-0.446 1-1v-13.959c0-0.45068 0.09887-0.4266-0.60464-1.0676l-3.3074-3.237c-0.70952-0.73686-0.71122-0.73686-1.0948-0.73686h-0.99317zm0 1h9v4c0 0.554 0.446 1 1 1h4v13h-14z" fill="#808080"/>
+ <path d="m15 7h4l-4-4z" fill="#fff" fill-rule="evenodd"/>
+ <g fill="#eac282">
+  <path d="m6 4h7v3h-7z"/>
+ </g>
+</svg>
diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js
index 8f2d230ad..8517f8c0d 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -624,7 +624,7 @@ L.Control.Menubar = L.Control.extend({
 					{name: _UNO('.uno:InsertAnnotation', 'text'), id: 'insertcomment', type: 'action'},
 					{name: _UNO('.uno:TableMenu'), id: 'inserttable', type: 'action'},
 					{type: 'separator'},
-					{name: _UNO('.uno:InsertField', 'text'), type: 'menu', menu: [
+					{name: _UNO('.uno:InsertField', 'text'), id: 'insertfield', type: 'menu', menu: [
 						{uno: '.uno:InsertPageNumberField'},
 						{uno: '.uno:InsertPageCountField'},
 						{uno: '.uno:InsertDateField'},
@@ -633,10 +633,10 @@ L.Control.Menubar = L.Control.extend({
 						{uno: '.uno:InsertAuthorField'},
 						{uno: '.uno:InsertTopicField'}
 					]},
-					{name: _UNO('.uno:InsertHeaderFooterMenu', 'text'), type: 'menu', menu: [
-						{name: _UNO('.uno:InsertPageHeader', 'text'), type: 'menu', menu: [
+					{name: _UNO('.uno:InsertHeaderFooterMenu', 'text'), id: 'insertheaderfooter', type: 'menu', menu: [
+						{name: _UNO('.uno:InsertPageHeader', 'text'), id: 'insertpageheader', type: 'menu', menu: [
 							{name: _('All'), disabled: true, id: 'insertheader', tag: '_ALL_', uno: '.uno:InsertPageHeader?On:bool=true'}]},
-						{name: _UNO('.uno:InsertPageFooter', 'text'), type: 'menu', menu: [
+						{name: _UNO('.uno:InsertPageFooter', 'text'), id: 'insertpagefooter', type: 'menu', menu: [
 							{name: _('All'), disabled: true, id: 'insertfooter', tag: '_ALL_', uno: '.uno:InsertPageFooter?On:bool=true'}]}
 					]},
 					{uno: '.uno:InsertFootnote'},
@@ -647,8 +647,8 @@ L.Control.Menubar = L.Control.extend({
 					{type: 'separator'},
 					{name: _UNO('.uno:HyperlinkDialog'), id: 'inserthyperlink', type: 'action'},
 					{name: _UNO('.uno:ShapesMenu'), id: 'insertshape', type: 'action'},
-					{name: _UNO('.uno:FormattingMarkMenu', 'text'), type: 'menu', menu: [
-						{uno: '.uno:InsertNonBreakingSpace'},
+					{name: _UNO('.uno:FormattingMarkMenu', 'text'), id: 'formattingmark', type: 'menu', menu: [
+						{name: _UNO('.uno:InsertNonBreakingSpace'), id: 'insertnonbreakingspace'},
 						{uno: '.uno:InsertHardHyphen'},
 						{uno: '.uno:InsertSoftHyphen'},
 						{uno: '.uno:InsertZWSP'},
@@ -679,7 +679,7 @@ L.Control.Menubar = L.Control.extend({
 					{name: _UNO('.uno:HyperlinkDialog'), id: 'inserthyperlink', type: 'action'},
 					{name: _UNO('.uno:ShapesMenu'), id: 'insertshape', type: 'action'},
 					{uno: '.uno:Text'},
-					{name: _UNO('.uno:InsertField', 'text'), type: 'menu', menu: [
+					{name: _UNO('.uno:InsertField', 'text'), id: 'insertfield', type: 'menu', menu: [
 						{uno: '.uno:InsertDateFieldFix'},
 						{uno: '.uno:InsertDateFieldVar'},
 						{uno: '.uno:InsertTimeFieldFix'},


More information about the Libreoffice-commits mailing list