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

New commits:
commit 815802e6e0fbf5eeff17a48d3d84b4b6fe687058
Author:     Tamás Zolnai <tamas.zol...@collabora.com>
AuthorDate: Wed Aug 12 16:59:12 2020 +0200
Commit:     Tamás Zolnai <tamas.zol...@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 <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Tamás Zolnai <tamas.zol...@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});
 }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to