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

Tamás Zolnai (via logerrit) logerrit at kemper.freedesktop.org
Fri Sep 11 16:28:43 UTC 2020


 cypress_test/integration_tests/common/helper.js                        |    9 ++++--
 cypress_test/integration_tests/mobile/impress/impress_mobile_helper.js |    7 +---
 cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js |   15 ++++------
 3 files changed, 15 insertions(+), 16 deletions(-)

New commits:
commit 8bd07b2bf3b29b213b22fe8f473b2891c8ca9b43
Author:     Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Fri Sep 11 15:08:11 2020 +0200
Commit:     Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Fri Sep 11 18:28:35 2020 +0200

    cypress: NC: simplify text shape check.
    
    Change-Id: I426afb5d8322061db78e1e354d199b6741eee3a2
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102473
    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/impress/impress_mobile_helper.js b/cypress_test/integration_tests/mobile/impress/impress_mobile_helper.js
index 62202bc4e..10229354f 100644
--- a/cypress_test/integration_tests/mobile/impress/impress_mobile_helper.js
+++ b/cypress_test/integration_tests/mobile/impress/impress_mobile_helper.js
@@ -18,11 +18,8 @@ function selectTextShapeInTheCenter() {
 	cy.get('.leaflet-drag-transform-marker')
 		.should('be.visible');
 
-	cy.get('.leaflet-pane.leaflet-overlay-pane g.Page g')
-		.should(function(shape) {
-			expect(shape.hasClass('com.sun.star.drawing.TextShape') ||
-				   shape.hasClass('Outline')).to.be.true;
-		});
+	cy.get('.leaflet-pane.leaflet-overlay-pane svg g.Page g')
+		.should('be.visible');
 
 	cy.log('Selecting text shape - end.');
 }
diff --git a/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js b/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js
index a1b7aacad..5ef4f658a 100644
--- a/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js
+++ b/cypress_test/integration_tests/mobile/impress/insertion_wizard_spec.js
@@ -19,7 +19,7 @@ describe('Impress insertion wizard.', function() {
 		helper.afterAll(testFileName);
 	});
 
-	function selectionShouldBeTextShape(checkTextShape = true) {
+	function selectionShouldBeTextShape() {
 		// Check that the shape is there
 		cy.get('.leaflet-pane.leaflet-overlay-pane svg')
 			.should(function(svg) {
@@ -27,9 +27,8 @@ describe('Impress insertion wizard.', function() {
 				expect(svg[0].getBBox().height).to.be.greaterThan(0);
 			});
 
-		if (checkTextShape)
-			cy.get('.leaflet-pane.leaflet-overlay-pane svg g.com\\.sun\\.star\\.drawing\\.TextShape')
-				.should('exist');
+		cy.get('.leaflet-pane.leaflet-overlay-pane svg g.Page g')
+			.should('be.visible');
 
 		// Check also that the shape is fully visible
 		// TODO: shapes are hungs out of the slide after insertion
@@ -221,7 +220,7 @@ describe('Impress insertion wizard.', function() {
 			.click();
 
 		// Check that the shape is there
-		selectionShouldBeTextShape(false);
+		selectionShouldBeTextShape();
 
 		// Check the text
 		impressMobileHelper.selectTextOfShape();
@@ -241,7 +240,7 @@ describe('Impress insertion wizard.', function() {
 			.click();
 
 		// Check that the shape is there
-		selectionShouldBeTextShape(false);
+		selectionShouldBeTextShape();
 
 		// Check the text
 		impressMobileHelper.selectTextOfShape();
@@ -261,7 +260,7 @@ describe('Impress insertion wizard.', function() {
 			.click();
 
 		// Check that the shape is there
-		selectionShouldBeTextShape(false);
+		selectionShouldBeTextShape();
 
 		// Check the text
 		impressMobileHelper.selectTextOfShape();
@@ -281,7 +280,7 @@ describe('Impress insertion wizard.', function() {
 			.click();
 
 		// Check that the shape is there
-		selectionShouldBeTextShape(false);
+		selectionShouldBeTextShape();
 
 		// Check the text
 		impressMobileHelper.selectTextOfShape();
commit 3aca775a0487ae77c598e01e8700ef2039317ae9
Author:     Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Fri Sep 11 13:54:55 2020 +0200
Commit:     Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Fri Sep 11 18:28:24 2020 +0200

    cypress: NC: make assertCursorAndFocus() work with NC.
    
    Change-Id: Ia77779248cf3c40fd3e269318215ac689fcb0de4
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102472
    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/common/helper.js b/cypress_test/integration_tests/common/helper.js
index 4550ad90c..4ef9cd937 100644
--- a/cypress_test/integration_tests/common/helper.js
+++ b/cypress_test/integration_tests/common/helper.js
@@ -230,9 +230,12 @@ function assertHaveKeyboardInput() {
 function assertCursorAndFocus() {
 	cy.log('Verifying Cursor and Focus.');
 
-	// Active element must be the textarea named clipboard.
-	cy.document().its('activeElement.className')
-		.should('be.eq', 'clipboard');
+
+	if (Cypress.env('INTEGRATION') !== 'nextcloud') {
+		// Active element must be the textarea named clipboard.
+		cy.document().its('activeElement.className')
+			.should('be.eq', 'clipboard');
+	}
 
 	// In edit mode, we should have the blinking cursor.
 	cy.get('.leaflet-cursor.blinking-cursor')


More information about the Libreoffice-commits mailing list