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

Tamás Zolnai (via logerrit) logerrit at kemper.freedesktop.org
Wed Aug 12 17:59:54 UTC 2020


 cypress_test/integration_tests/common/helper.js |    9 +++++++++
 1 file changed, 9 insertions(+)

New commits:
commit 815802e6e0fbf5eeff17a48d3d84b4b6fe687058
Author:     Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Wed Aug 12 16:59:12 2020 +0200
Commit:     Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Wed Aug 12 19:59:35 2020 +0200

    cypress: improve typeIntoDocument() helper method.
    
    First grab the focus to the textarea, otherwise
    the force: true flag leads to unexpected behavior.
    
    Change-Id: Ic99bb1b22734733d7bb40b895173e5382c2ba5f4
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100605
    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 9853b7174..e9e3450ab 100644
--- a/cypress_test/integration_tests/common/helper.js
+++ b/cypress_test/integration_tests/common/helper.js
@@ -480,6 +480,15 @@ function moveCursor(direction) {
 }
 
 function typeIntoDocument(text) {
+	cy.get('textarea.clipboard')
+		.focus();
+
+	cy.document().its('activeElement.tagName')
+		.should('be.eq', 'TEXTAREA');
+
+	cy.document().its('activeElement.className')
+		.should('be.eq', 'clipboard');
+
 	cy.get('textarea.clipboard')
 		.type(text, {force: true});
 }


More information about the Libreoffice-commits mailing list