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

Tamás Zolnai (via logerrit) logerrit at kemper.freedesktop.org
Tue Aug 11 16:48:09 UTC 2020


 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.zolnai at collabora.com>
AuthorDate: Tue Aug 11 15:48:20 2020 +0200
Commit:     Tamás Zolnai <tamas.zolnai at 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.zolnai at collabora.com>
    Reviewed-by: Tamás Zolnai <tamas.zolnai at 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');
 	});


More information about the Libreoffice-commits mailing list