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

Tamás Zolnai (via logerrit) logerrit at kemper.freedesktop.org
Fri Mar 13 16:43:58 UTC 2020


 cypress_test/integration_tests/common/helper.js                                 |   12 +++++-----
 cypress_test/integration_tests/desktop/copy_paste_spec.js                       |    2 -
 cypress_test/integration_tests/desktop/example_desktop_test_spec.js             |    2 -
 cypress_test/integration_tests/desktop/shape_operations_spec.js                 |    2 -
 cypress_test/integration_tests/mobile/calc/apply_font_spec.js                   |    2 -
 cypress_test/integration_tests/mobile/calc/focus_spec.js                        |    2 -
 cypress_test/integration_tests/mobile/calc/insertion_wizard_spec.js             |    2 -
 cypress_test/integration_tests/mobile/impress/impress_focus_spec.js             |    2 -
 cypress_test/integration_tests/mobile/writer/apply_font_spec.js                 |    2 -
 cypress_test/integration_tests/mobile/writer/apply_paragraph_properties_spec.js |    2 -
 cypress_test/integration_tests/mobile/writer/bottom_toolbar_spec.js             |    2 -
 cypress_test/integration_tests/mobile/writer/focus_spec.js                      |    2 -
 cypress_test/integration_tests/mobile/writer/insert_field_spec.js               |    2 -
 cypress_test/integration_tests/mobile/writer/insert_formatting_mark_spec.js     |    2 -
 cypress_test/integration_tests/mobile/writer/insert_object_spec.js              |    2 -
 cypress_test/integration_tests/mobile/writer/mobile_wizard_state_spec.js        |    2 -
 cypress_test/integration_tests/mobile/writer/shape_properties_spec.js           |    2 -
 cypress_test/integration_tests/mobile/writer/spellchecking_spec.js              |    2 -
 cypress_test/integration_tests/mobile/writer/table_properties_spec.js           |    2 -
 cypress_test/integration_tests/mobile/writer/toolbar_spec.js                    |    2 -
 20 files changed, 26 insertions(+), 24 deletions(-)

New commits:
commit f9cec18eda7ffd588208c215cb09cce539c4bd89
Author:     Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Fri Mar 13 15:27:33 2020 +0100
Commit:     Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Fri Mar 13 17:43:39 2020 +0100

    cypress: improve afterAll() method.
    
    We need to actually wait, until the admin console displays the info
    coming from loolwsd. We also need to check only for the test document
    that the current test file is using. In parallel build, more jobs
    are using the same loolwsd.
    
    Change-Id: Ia85cf711f33c748cdbed8602a532fb590fe26b25
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90474
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>

diff --git a/cypress_test/integration_tests/common/helper.js b/cypress_test/integration_tests/common/helper.js
index b9b26fa83..8d1e6981c 100644
--- a/cypress_test/integration_tests/common/helper.js
+++ b/cypress_test/integration_tests/common/helper.js
@@ -52,15 +52,17 @@ function beforeAllMobile(fileName, subFolder) {
 	detectLOCoreVersion();
 }
 
-function afterAll() {
+function afterAll(fileName) {
 	// Make sure that the document is closed
 	cy.visit('http://admin:admin@localhost:' +
 			Cypress.env('SERVER_PORT') +
 			'/loleaflet/dist/admin/admin.html');
-	cy.get('#doclist')
-		.should('exist');
-	cy.get('#doclist tr')
-		.should('not.exist', {timeout : 10000});
+
+	cy.get('#uptime')
+		.should('not.have.text', '0');
+
+	cy.get('#doclist td:nth-child(2)')
+		.should('not.contain.text', fileName);
 }
 
 function detectLOCoreVersion() {
diff --git a/cypress_test/integration_tests/desktop/copy_paste_spec.js b/cypress_test/integration_tests/desktop/copy_paste_spec.js
index 326cb3297..a30111499 100644
--- a/cypress_test/integration_tests/desktop/copy_paste_spec.js
+++ b/cypress_test/integration_tests/desktop/copy_paste_spec.js
@@ -8,7 +8,7 @@ describe('Clipboard operations.', function() {
 	});
 
 	afterEach(function() {
-		helper.afterAll();
+		helper.afterAll('copy_paste.odt');
 	});
 
 	it('Copy and Paste text.', function() {
diff --git a/cypress_test/integration_tests/desktop/example_desktop_test_spec.js b/cypress_test/integration_tests/desktop/example_desktop_test_spec.js
index f709166f6..5f8f09e25 100644
--- a/cypress_test/integration_tests/desktop/example_desktop_test_spec.js
+++ b/cypress_test/integration_tests/desktop/example_desktop_test_spec.js
@@ -5,7 +5,7 @@ var helper = require('../common/helper');
 describe('Example test suit 1', function() {
 
 	afterEach(function() {
-		helper.afterAll();
+		helper.afterAll('example.odt');
 	});
 
 	it('Example test case 1', function() {
diff --git a/cypress_test/integration_tests/desktop/shape_operations_spec.js b/cypress_test/integration_tests/desktop/shape_operations_spec.js
index 15869bfe4..c0a4902c4 100644
--- a/cypress_test/integration_tests/desktop/shape_operations_spec.js
+++ b/cypress_test/integration_tests/desktop/shape_operations_spec.js
@@ -5,7 +5,7 @@ var helper = require('../common/helper');
 describe('Shape operations', function() {
 
 	afterEach(function() {
-		helper.afterAll();
+		helper.afterAll('shape_operations.odt');
 	});
 
 	it('Insert a simple shape.', function() {
diff --git a/cypress_test/integration_tests/mobile/calc/apply_font_spec.js b/cypress_test/integration_tests/mobile/calc/apply_font_spec.js
index 821b23748..01ddbf8a6 100644
--- a/cypress_test/integration_tests/mobile/calc/apply_font_spec.js
+++ b/cypress_test/integration_tests/mobile/calc/apply_font_spec.js
@@ -35,7 +35,7 @@ describe('Apply font changes.', function() {
 	});
 
 	afterEach(function() {
-		helper.afterAll();
+		helper.afterAll('apply_font.ods');
 	});
 
 	it('Apply bold.', function() {
diff --git a/cypress_test/integration_tests/mobile/calc/focus_spec.js b/cypress_test/integration_tests/mobile/calc/focus_spec.js
index 705c513a5..5b3136698 100644
--- a/cypress_test/integration_tests/mobile/calc/focus_spec.js
+++ b/cypress_test/integration_tests/mobile/calc/focus_spec.js
@@ -9,7 +9,7 @@ describe('Calc focus tests', function() {
 	});
 
 	afterEach(function() {
-		helper.afterAll();
+		helper.afterAll('focus.ods');
 	});
 
 	it('Basic document focus.', function() {
diff --git a/cypress_test/integration_tests/mobile/calc/insertion_wizard_spec.js b/cypress_test/integration_tests/mobile/calc/insertion_wizard_spec.js
index c73fe788b..c94471133 100644
--- a/cypress_test/integration_tests/mobile/calc/insertion_wizard_spec.js
+++ b/cypress_test/integration_tests/mobile/calc/insertion_wizard_spec.js
@@ -27,7 +27,7 @@ describe('Calc insertion wizard.', function() {
 	});
 
 	afterEach(function() {
-		helper.afterAll();
+		helper.afterAll('insertion_wizard.ods');
 	});
 
 	it('Check existance of image insertion items.', function() {
diff --git a/cypress_test/integration_tests/mobile/impress/impress_focus_spec.js b/cypress_test/integration_tests/mobile/impress/impress_focus_spec.js
index 0f5beb4a3..99fefe704 100644
--- a/cypress_test/integration_tests/mobile/impress/impress_focus_spec.js
+++ b/cypress_test/integration_tests/mobile/impress/impress_focus_spec.js
@@ -8,7 +8,7 @@ describe('Impress focus tests', function() {
 	});
 
 	afterEach(function() {
-		helper.afterAll();
+		helper.afterAll('focus.odp');
 	});
 
 	it('Basic document focus.', function() {
diff --git a/cypress_test/integration_tests/mobile/writer/apply_font_spec.js b/cypress_test/integration_tests/mobile/writer/apply_font_spec.js
index dc629f505..063667b3a 100644
--- a/cypress_test/integration_tests/mobile/writer/apply_font_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/apply_font_spec.js
@@ -20,7 +20,7 @@ describe('Apply font changes.', function() {
 	});
 
 	afterEach(function() {
-		helper.afterAll();
+		helper.afterAll('apply_font.odt');
 	});
 
 	function applyStyle(styleName) {
diff --git a/cypress_test/integration_tests/mobile/writer/apply_paragraph_properties_spec.js b/cypress_test/integration_tests/mobile/writer/apply_paragraph_properties_spec.js
index 0b482565b..1cf964571 100644
--- a/cypress_test/integration_tests/mobile/writer/apply_paragraph_properties_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/apply_paragraph_properties_spec.js
@@ -28,7 +28,7 @@ describe('Apply paragraph properties.', function() {
 	});
 
 	afterEach(function() {
-		helper.afterAll();
+		helper.afterAll('apply_paragraph_properties.odt');
 	});
 
 	it('Apply left alignment.', function() {
diff --git a/cypress_test/integration_tests/mobile/writer/bottom_toolbar_spec.js b/cypress_test/integration_tests/mobile/writer/bottom_toolbar_spec.js
index b92923e91..7bf407442 100644
--- a/cypress_test/integration_tests/mobile/writer/bottom_toolbar_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/bottom_toolbar_spec.js
@@ -15,7 +15,7 @@ describe('Pushing bottom toolbar items.', function() {
 	});
 
 	afterEach(function() {
-		helper.afterAll();
+		helper.afterAll('bottom_toolbar.odt');
 	});
 
 	it('Apply bold.', function() {
diff --git a/cypress_test/integration_tests/mobile/writer/focus_spec.js b/cypress_test/integration_tests/mobile/writer/focus_spec.js
index 5073315b9..17153f33a 100644
--- a/cypress_test/integration_tests/mobile/writer/focus_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/focus_spec.js
@@ -8,7 +8,7 @@ describe('Focus tests', function() {
 	});
 
 	afterEach(function() {
-		helper.afterAll();
+		helper.afterAll('focus.odt');
 	});
 
 	it('Basic document focus.', function() {
diff --git a/cypress_test/integration_tests/mobile/writer/insert_field_spec.js b/cypress_test/integration_tests/mobile/writer/insert_field_spec.js
index 9db700b3d..6bb593911 100644
--- a/cypress_test/integration_tests/mobile/writer/insert_field_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/insert_field_spec.js
@@ -28,7 +28,7 @@ describe('Insert fields via insertion wizard.', function() {
 	});
 
 	afterEach(function() {
-		helper.afterAll();
+		helper.afterAll('insert_field.odt');
 	});
 
 	it('Insert page number field.', function() {
diff --git a/cypress_test/integration_tests/mobile/writer/insert_formatting_mark_spec.js b/cypress_test/integration_tests/mobile/writer/insert_formatting_mark_spec.js
index b4b63c6fe..fea6f572e 100644
--- a/cypress_test/integration_tests/mobile/writer/insert_formatting_mark_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/insert_formatting_mark_spec.js
@@ -28,7 +28,7 @@ describe('Insert formatting mark via insertion wizard.', function() {
 	});
 
 	afterEach(function() {
-		helper.afterAll();
+		helper.afterAll('insert_formatting_mark.odt');
 	});
 
 	it('Insert non-breaking space.', function() {
diff --git a/cypress_test/integration_tests/mobile/writer/insert_object_spec.js b/cypress_test/integration_tests/mobile/writer/insert_object_spec.js
index 37b3ebec7..df96973a3 100644
--- a/cypress_test/integration_tests/mobile/writer/insert_object_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/insert_object_spec.js
@@ -12,7 +12,7 @@ describe('Insert objects via insertion wizard.', function() {
 	});
 
 	afterEach(function() {
-		helper.afterAll();
+		helper.afterAll('insert_object.odt');
 	});
 
 	it('Insert local image.', function() {
diff --git a/cypress_test/integration_tests/mobile/writer/mobile_wizard_state_spec.js b/cypress_test/integration_tests/mobile/writer/mobile_wizard_state_spec.js
index 47790dc47..b9bec57e7 100644
--- a/cypress_test/integration_tests/mobile/writer/mobile_wizard_state_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/mobile_wizard_state_spec.js
@@ -8,7 +8,7 @@ describe('Mobile wizard state tests', function() {
 	});
 
 	afterEach(function() {
-		helper.afterAll();
+		helper.afterAll('mobile_wizard_state.odt');
 	});
 
 	it('Open and close mobile wizard by toolbar item.', function() {
diff --git a/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js b/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js
index 21f666017..149e098b8 100644
--- a/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/shape_properties_spec.js
@@ -40,7 +40,7 @@ describe('Change shape properties via mobile wizard.', function() {
 	});
 
 	afterEach(function() {
-		helper.afterAll();
+		helper.afterAll('shape_properties.odt');
 	});
 
 	function triggerNewSVG() {
diff --git a/cypress_test/integration_tests/mobile/writer/spellchecking_spec.js b/cypress_test/integration_tests/mobile/writer/spellchecking_spec.js
index c62349b52..25a5b5680 100644
--- a/cypress_test/integration_tests/mobile/writer/spellchecking_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/spellchecking_spec.js
@@ -12,7 +12,7 @@ describe('Spell checking menu.', function() {
 	});
 
 	afterEach(function() {
-		helper.afterAll();
+		helper.afterAll('spellchecking.odt');
 	});
 
 	function openContextMenu() {
diff --git a/cypress_test/integration_tests/mobile/writer/table_properties_spec.js b/cypress_test/integration_tests/mobile/writer/table_properties_spec.js
index 0a083fb3c..45135807b 100644
--- a/cypress_test/integration_tests/mobile/writer/table_properties_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/table_properties_spec.js
@@ -9,7 +9,7 @@ describe('Change table properties / layout via mobile wizard.', function() {
 	});
 
 	afterEach(function() {
-		helper.afterAll();
+		helper.afterAll('table_properties.odt');
 	});
 
 	function before(testFile) {
diff --git a/cypress_test/integration_tests/mobile/writer/toolbar_spec.js b/cypress_test/integration_tests/mobile/writer/toolbar_spec.js
index baef8f820..a24e821e4 100644
--- a/cypress_test/integration_tests/mobile/writer/toolbar_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/toolbar_spec.js
@@ -8,7 +8,7 @@ describe('Toolbar tests', function() {
 	});
 
 	afterEach(function() {
-		helper.afterAll();
+		helper.afterAll('toolbar.odt');
 	});
 
 	it('State of mobile wizard toolbar item.', function() {


More information about the Libreoffice-commits mailing list