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

Tamás Zolnai (via logerrit) logerrit at kemper.freedesktop.org
Tue Feb 18 17:34:03 UTC 2020


 cypress_test/integration_tests/mobile/writer/shape_properties_spec.js |  110 +++++++++-
 1 file changed, 106 insertions(+), 4 deletions(-)

New commits:
commit 28029dce14902b46012778cafc45516589039a08
Author:     Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Tue Feb 18 17:20:20 2020 +0100
Commit:     Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Tue Feb 18 18:33:46 2020 +0100

    cypress: mobile: Add more tests for changing shape line properties.
    
    Change-Id: I7eb2132b591f081087dca1999ce81e002ccd5101
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88972
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Tamás Zolnai <tamas.zolnai at 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 0542f970b..6f808ab75 100644
--- a/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js
@@ -46,11 +46,9 @@ describe('Change shape properties via mobile wizard.', function() {
 		cy.get('#PosSizePropertyPanel')
 			.click();
 
-		cy.get('#selectwidth .spinfield')
+		cy.get('#selectwidth .plus')
 			.should('be.visible')
-			.clear()
-			.type('4.2')
-			.type('{enter}');
+			.click();
 	}
 
 	it('Check default shape geometry.', function() {
@@ -229,4 +227,108 @@ 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', 'rgb(152,0,0)');
 	});
+
+	it('Change line style', function() {
+		// TODO: Two issues are found here with core/master
+		// 1) The mobile wizard keeps rerendering after it was already opened which leads
+		// detached item error.
+		// 2) Layout of the line properties panel is completely broken.
+		if (Cypress.env('LO_CORE_VERSION') === 'master')
+			return;
+
+		// Open mobile wizard
+		cy.get('#tb_actionbar_item_mobile_wizard')
+			.click();
+
+		// Change line color
+		cy.get('#LinePropertyPanel')
+			.click();
+
+		cy.get('#linestyle')
+			.click();
+
+		cy.get('.ui-combobox-text')
+			.contains('Fine Dotted')
+			.click();
+
+		triggerNewSVG();
+
+		cy.get('.leaflet-pane.leaflet-overlay-pane svg g svg g g g path[fill="none"]')
+			.should('have.length.greaterThan', 20);
+	});
+
+	it('Change line width', function() {
+		// TODO: Two issues are found here with core/master
+		// 1) The mobile wizard keeps rerendering after it was already opened which leads
+		// detached item error.
+		// 2) Layout of the line properties panel is completely broken.
+		if (Cypress.env('LO_CORE_VERSION') === 'master')
+			return;
+
+		// Open mobile wizard
+		cy.get('#tb_actionbar_item_mobile_wizard')
+			.click();
+
+		// Change line width
+		cy.get('#LinePropertyPanel')
+			.click();
+
+		cy.get('#linewidth .plus')
+			.click();
+
+		triggerNewSVG();
+
+		cy.get('.leaflet-pane.leaflet-overlay-pane svg g svg g g g path[fill="none"]')
+			.should('have.attr', 'stroke-width', '141');
+
+		// Reopen mobile wizard
+		cy.get('#tb_actionbar_item_mobile_wizard')
+			.click();
+		cy.get('#mobile-wizard')
+			.should('not.be.visible');
+
+		cy.get('#tb_actionbar_item_mobile_wizard')
+			.click();
+		cy.get('#mobile-wizard')
+			.should('be.visible');
+
+		// Change line width
+		cy.get('#LinePropertyPanel')
+			.click();
+
+		cy.get('#linewidth .minus')
+			.click();
+
+		triggerNewSVG();
+
+		cy.get('.leaflet-pane.leaflet-overlay-pane svg g svg g g g path[fill="none"]')
+			.should('have.attr', 'stroke-width', '141');
+	});
+
+	it('Change line transparency', function() {
+		// TODO: Two issues are found here with core/master
+		// 1) The mobile wizard keeps rerendering after it was already opened which leads
+		// detached item error.
+		// 2) Layout of the line properties panel is completely broken.
+		if (Cypress.env('LO_CORE_VERSION') === 'master')
+			return;
+
+		// Open mobile wizard
+		cy.get('#tb_actionbar_item_mobile_wizard')
+			.click();
+
+		// Change line color
+		cy.get('#LinePropertyPanel')
+			.click();
+
+		cy.get('#linetransparency .spinfield')
+			.clear()
+			.type('20')
+			.type('{enter}');
+
+		triggerNewSVG();
+
+		cy.get('.leaflet-pane.leaflet-overlay-pane svg g svg g g g defs mask linearGradient')
+			.should('exist');
+	});
 });


More information about the Libreoffice-commits mailing list