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

Tamás Zolnai (via logerrit) logerrit at kemper.freedesktop.org
Thu Sep 17 10:23:50 UTC 2020


 cypress_test/integration_tests/common/helper.js                       |   11 +++++-
 cypress_test/integration_tests/mobile/writer/shape_properties_spec.js |   16 ++++------
 cypress_test/plugins/blacklists.js                                    |    3 +
 cypress_test/plugins/index.js                                         |    4 ++
 4 files changed, 22 insertions(+), 12 deletions(-)

New commits:
commit 228d8af5635629f23390776f29375c90d812c8b2
Author:     Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Wed Sep 16 16:54:00 2020 +0200
Commit:     Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Thu Sep 17 12:23:45 2020 +0200

    cypress: php-proxy: blacklist table related tests.
    
    The application freezes with tables, beacuse of an
    invalidate tiles loop. With php-proxy the lot of invalidate
    tile messages blocks the execution.
    
    Change-Id: Ife08b7cb335afc69108d970a8f0147be1ae9d90e
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102892
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>

diff --git a/cypress_test/plugins/blacklists.js b/cypress_test/plugins/blacklists.js
index 6efced9e7..bbef59fcc 100644
--- a/cypress_test/plugins/blacklists.js
+++ b/cypress_test/plugins/blacklists.js
@@ -95,6 +95,9 @@ var phpProxyBlackList = [
 			'Insert local image.'
 		]
 	],
+	['mobile/writer/table_properties_spec.js',
+		[]
+	],
 ];
 
 module.exports.coreBlackLists = coreBlackLists;
commit 1fa089901e80597cdabfa6e2014cbb7e8a1392ff
Author:     Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Wed Sep 16 16:01:46 2020 +0200
Commit:     Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Thu Sep 17 12:23:32 2020 +0200

    cypress: php-proxy: fix shape related tests.
    
    Change-Id: I59e115785357e213346c9c403dc3078ef0b2b706
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102891
    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 9c1823b81..505108bac 100644
--- a/cypress_test/integration_tests/common/helper.js
+++ b/cypress_test/integration_tests/common/helper.js
@@ -665,7 +665,8 @@ function moveCursor(direction) {
 			.invoke('offset')
 			.its('top')
 			.as('origCursorPos');
-	} else if (direction === 'left' || direction === 'right') {
+	} else if (direction === 'left' || direction === 'right'
+		|| direction === 'home' || direction === 'end') {
 		cy.get('.blinking-cursor')
 			.invoke('offset')
 			.its('left')
@@ -684,6 +685,10 @@ function moveCursor(direction) {
 		key = '{leftarrow}';
 	} else if (direction === 'right') {
 		key = '{rightarrow}';
+	} else if (direction === 'home') {
+		key = '{home}';
+	} else if (direction === 'end') {
+		key = '{end}';
 	}
 	typeIntoDocument(key);
 
@@ -695,9 +700,9 @@ function moveCursor(direction) {
 						expect(cursor.offset().top).to.be.lessThan(origCursorPos);
 					} else if (direction === 'down') {
 						expect(cursor.offset().top).to.be.greaterThan(origCursorPos);
-					} else if (direction === 'left') {
+					} else if (direction === 'left' || direction === 'home') {
 						expect(cursor.offset().left).to.be.lessThan(origCursorPos);
-					} else if (direction === 'right') {
+					} else if (direction === 'right' || direction === 'end') {
 						expect(cursor.offset().left).to.be.greaterThan(origCursorPos);
 					}
 				});
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 6f3748ed6..e957e92e9 100644
--- a/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js
@@ -1,4 +1,4 @@
-/* global describe it cy beforeEach require afterEach */
+/* global describe it cy beforeEach require afterEach Cypress */
 
 var helper = require('../../common/helper');
 var mobileHelper = require('../../common/mobile_helper');
@@ -13,15 +13,13 @@ describe('Change shape properties via mobile wizard.', function() {
 		// Click on edit button
 		mobileHelper.enableEditingMobile();
 
-		helper.typeIntoDocument('{end}');
+		helper.moveCursor('end');
 
-		cy.get('.blinking-cursor')
-			.should('be.visible');
-
-		helper.typeIntoDocument('{home}');
+		helper.moveCursor('home');
 
-		cy.get('.blinking-cursor')
-			.should('be.visible');
+		if (Cypress.env('INTEGRATION') === 'php-proxy') {
+			cy.wait(1000);
+		}
 
 		mobileHelper.openInsertionWizard();
 
@@ -33,7 +31,7 @@ describe('Change shape properties via mobile wizard.', function() {
 			click();
 
 		// Check that the shape is there
-		cy.get('.leaflet-pane.leaflet-overlay-pane svg g svg g', {timeout : 10000})
+		cy.get('.leaflet-pane.leaflet-overlay-pane svg g svg g', { timeout: Cypress.config('defaultCommandTimeout') * 2.0 })
 			.should('have.class', 'com.sun.star.drawing.CustomShape');
 	});
 
diff --git a/cypress_test/plugins/index.js b/cypress_test/plugins/index.js
index ec2ca4586..4547a88ba 100644
--- a/cypress_test/plugins/index.js
+++ b/cypress_test/plugins/index.js
@@ -37,6 +37,10 @@ function plugin(on, config) {
 		});
 	}
 
+	if (process.env.CYPRESS_INTEGRATION === 'php-proxy') {
+		config.defaultCommandTimeout = 10000;
+	}
+
 	on('file:preprocessor', selectTests(config, pickTests));
 
 	return config;


More information about the Libreoffice-commits mailing list