cypress_test/integration_tests/desktop/writer/form_field_spec.js |   24 
+++-------
 1 file changed, 9 insertions(+), 15 deletions(-)

New commits:
commit 4c2ba4ae57d64e4288f1e6bf4ddf386f1260e6b0
Author:     Tamás Zolnai <tamas.zol...@collabora.com>
AuthorDate: Tue Aug 11 15:48:20 2020 +0200
Commit:     Tamás Zolnai <tamas.zol...@collabora.com>
CommitDate: Tue Aug 11 18:47:50 2020 +0200

    cypress: stabilize form field tests.
    
    Change-Id: Iceeb8ff6231fc401943c4be8835955a50278cf17
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100530
    Tested-by: Jenkins
    Tested-by: Tamás Zolnai <tamas.zol...@collabora.com>
    Reviewed-by: Tamás Zolnai <tamas.zol...@collabora.com>

diff --git a/cypress_test/integration_tests/desktop/writer/form_field_spec.js 
b/cypress_test/integration_tests/desktop/writer/form_field_spec.js
index 0f6c44390..b507a28f7 100644
--- a/cypress_test/integration_tests/desktop/writer/form_field_spec.js
+++ b/cypress_test/integration_tests/desktop/writer/form_field_spec.js
@@ -9,11 +9,12 @@ describe('Form field button tests.', function() {
                testFileName = fileName;
                helper.beforeAll(fileName, 'writer');
 
-               cy.get('#document-container')
-                       .click();
-
+               // Blinking cursor is not visible for some reason.
                cy.get('textarea.clipboard')
-                       .type('{home}');
+                       .type('x');
+
+               cy.get('.blinking-cursor')
+                       .should('be.visible');
        }
        afterEach(function() {
                helper.afterAll(testFileName, 'writer');
@@ -175,9 +176,11 @@ describe('Form field button tests.', function() {
                cy.contains('.drop-down-field-list-item', 'January')
                        .click();
 
+               cy.get('.drop-down-field-list-item.selected')
+                       .should('have.text', 'January');
+
                // Move the cursor away and back
-               cy.get('textarea.clipboard')
-                       .type('{home}', {force : true});
+               moveCursor('left');
 
                buttonShouldNotExist();
 
@@ -204,15 +207,6 @@ describe('Form field button tests.', function() {
                cy.contains('.drop-down-field-list-item', 'December')
                        .click();
 
-               moveCursor('right');
-
-               buttonShouldNotExist();
-
-               // Move the cursor back next to the field
-               moveCursor('left');
-
-               buttonShouldExist();
-
                cy.get('.drop-down-field-list-item.selected')
                        .should('have.text', 'December');
        });
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to