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

Tamás Zolnai (via logerrit) logerrit at kemper.freedesktop.org
Wed Feb 12 12:26:40 UTC 2020


 cypress_test/integration_tests/mobile/calc_focus_spec.js |   30 +++++++++++++++
 cypress_test/integration_tests/mobile/focus_spec.js      |    6 +--
 2 files changed, 33 insertions(+), 3 deletions(-)

New commits:
commit 8f4143dd74ab7b89ced3318d106a9e454696e049
Author:     Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Wed Feb 12 12:56:41 2020 +0100
Commit:     Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Wed Feb 12 13:26:33 2020 +0100

    cypress: mobile: Update shape related focus test.
    
    One tap on a shape does not move the focus on the document
    since this commit:
    9fcd4d37778d9580cc7b425787c3a8c1d9e756dd
    
    Change-Id: I5d176be7c5dd8296c642c41b8d1e2fcf5945ab27
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88521
    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/focus_spec.js b/cypress_test/integration_tests/mobile/focus_spec.js
index badb1e0ad..e1acd82af 100644
--- a/cypress_test/integration_tests/mobile/focus_spec.js
+++ b/cypress_test/integration_tests/mobile/focus_spec.js
@@ -186,9 +186,9 @@ describe('Focus tests', function() {
 					.click(posX, posY);
 			});
 
-		// Document grabs the focus
-		cy.document().its('activeElement.className')
-			.should('be.eq', 'clipboard');
+		// No focus on the document
+		cy.document().its('activeElement.tagName')
+			.should('be.eq', 'BODY');
 
 		// Double tap on the shape
 		cy.get('.leaflet-pane.leaflet-overlay-pane svg')
commit aa9d676cd927147ae938198ff1590c144ab59ab6
Author:     Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Wed Feb 12 12:41:05 2020 +0100
Commit:     Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Wed Feb 12 13:26:22 2020 +0100

    cypress: mobile: Test focus on second tap in Calc.
    
    Change-Id: I1ce1b45f17f1d75c4bc7c1a6a63dfd05f2803612
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88520
    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/calc_focus_spec.js b/cypress_test/integration_tests/mobile/calc_focus_spec.js
index 17a66a079..a9c0a2970 100644
--- a/cypress_test/integration_tests/mobile/calc_focus_spec.js
+++ b/cypress_test/integration_tests/mobile/calc_focus_spec.js
@@ -40,4 +40,34 @@ describe('Calc focus tests', function() {
 		cy.document().its('activeElement.tagName')
 			.should('be.eq', 'BODY');
 	});
+
+	it('Focus on second tap.', function() {
+		// Click on edit button
+		cy.get('#mobile-edit-button').click();
+
+		cy.get('#tb_actionbar_item_mobile_wizard')
+			.should('not.have.class', 'disabled');
+
+		// Body has the focus -> can't type in the document
+		cy.document().its('activeElement.tagName')
+			.should('be.eq', 'BODY');
+
+		// One tap on a cell -> no document focus
+		cy.get('#document-container')
+			.click();
+
+		cy.get('.leaflet-marker-icon.spreadsheet-cell-resize-marker');
+
+		// No focus
+		cy.document().its('activeElement.tagName')
+			.should('be.eq', 'BODY');
+
+		// Second tap on the same cell
+		cy.get('#document-container')
+			.click();
+
+		// Document has the focus
+		cy.document().its('activeElement.className')
+			.should('be.eq', 'clipboard');
+	});
 });


More information about the Libreoffice-commits mailing list