cypress_test/Makefile.am                        |   30 +++---------------------
 cypress_test/integration_tests/common/helper.js |   10 ++++++--
 2 files changed, 12 insertions(+), 28 deletions(-)

New commits:
commit 96819f81cb509e61b0988bd4fcf0d1a1ac2cfe0d
Author:     Tamás Zolnai <tamas.zol...@collabora.com>
AuthorDate: Tue Apr 14 12:29:30 2020 +0200
Commit:     Tamás Zolnai <tamas.zol...@collabora.com>
CommitDate: Tue Apr 14 16:22:35 2020 +0200

    cypress: generate test names dynamically for the parallel build.
    
    Also improve afterAll(). Having test files with the same suffix
    led to test failure. We can have better result with a regex.
    
    Change-Id: I8d678aa17eb0e28e643cc86f584aab713ca153ca
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92157
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Tamás Zolnai <tamas.zol...@collabora.com>

diff --git a/cypress_test/Makefile.am b/cypress_test/Makefile.am
index 40f53c10b..5b616084b 100644
--- a/cypress_test/Makefile.am
+++ b/cypress_test/Makefile.am
@@ -34,32 +34,10 @@ export DISPLAY=$(if 
$(HEADLESS_BUILD),:$(DISPLAY_NUMBER),$(shell echo $$DISPLAY)
 WSD_VERSION_HASH := "11111111"
 
 if HAVE_LO_PATH
-MOBILE_TEST_FILES= \
-       calc/alignment_options_spec.js \
-       calc/apply_font_spec.js \
-       calc/focus_spec.js \
-       calc/insertion_wizard_spec.js \
-       calc/number_format_spec.js \
-       calc/spellchecking_spec.js \
-       impress/impress_focus_spec.js \
-       impress/spellchecking_spec.js \
-       writer/apply_font_spec.js \
-       writer/apply_paragraph_properties_spec.js \
-       writer/bottom_toolbar_spec.js \
-       writer/focus_spec.js \
-       writer/insert_field_spec.js \
-       writer/insert_formatting_mark_spec.js \
-       writer/insert_object_spec.js \
-       writer/mobile_wizard_state_spec.js \
-       writer/shape_properties_spec.js \
-       writer/spellchecking_spec.js \
-       writer/table_properties_spec.js \
-       writer/toolbar_spec.js
-
-DEKSTOP_TEST_FILES= \
-       copy_paste_spec.js \
-       example_desktop_test_spec.js \
-       shape_operations_spec.js
+
+MOBILE_TEST_FILES=$(subst $(MOBILE_TEST_FOLDER)/,,$(wildcard 
$(MOBILE_TEST_FOLDER)/*_spec.js) $(wildcard $(MOBILE_TEST_FOLDER)/*/*_spec.js))
+
+DEKSTOP_TEST_FILES=$(subst $(DESKTOP_TEST_FOLDER)/,,$(wildcard 
$(DESKTOP_TEST_FOLDER)/*_spec.js) $(wildcard 
$(DESKTOP_TEST_FOLDER)/*/*_spec.js))
 
 MOBILE_TEST_FILES_DONE= \
        $(foreach 
test_file,$(MOBILE_TEST_FILES),$(MOBILE_TRACK_FOLDER)/$(test_file).done)
diff --git a/cypress_test/integration_tests/common/helper.js 
b/cypress_test/integration_tests/common/helper.js
index 9eab3b5b1..6b2ad80c1 100644
--- a/cypress_test/integration_tests/common/helper.js
+++ b/cypress_test/integration_tests/common/helper.js
@@ -148,8 +148,14 @@ function afterAll(fileName) {
        cy.get('#uptime')
                .should('not.have.text', '0');
 
-       cy.get('#doclist td:nth-child(2)')
-               .should('not.contain.text', fileName);
+       // We have all lines of document infos as one long string.
+       // We have PID number before the file names, with matching
+       // also on the PID number we can make sure to match on the
+       // whole file name, not on a suffix of a file name.
+       var regex = new RegExp('[0-9]' + fileName);
+       cy.get('#docview')
+               .invoke('text')
+               .should('not.match', regex);
 
        cy.log('Waiting for closing the document - end.');
 }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to