cypress_test/integration_tests/common/helper.js |    1 -
 cypress_test/plugins/tasks.js                   |    3 +++
 2 files changed, 3 insertions(+), 1 deletion(-)

New commits:
commit cb9fa14d23256bcc734ee2288cf6aef42856c8f4
Author:     Tamás Zolnai <tamas.zol...@collabora.com>
AuthorDate: Wed Mar 11 17:16:06 2020 +0100
Commit:     Tamás Zolnai <tamas.zol...@collabora.com>
CommitDate: Wed Mar 11 19:12:21 2020 +0100

    cypress: fix failures caused by dirty test documents.
    
    It seems sometimes writeFileSync() method does not
    actually overwrites the document and some tests loads
    a test document modified by an other test.
    Hopefully removal of the file will solve this issue.
    
    Change-Id: I2cecfd367acce185eeebbdc4269a73a9d1d2dd5a
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90339
    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 06291e690..fddafdf22 100644
--- a/cypress_test/integration_tests/common/helper.js
+++ b/cypress_test/integration_tests/common/helper.js
@@ -61,7 +61,6 @@ function afterAll() {
                .should('exist');
        cy.get('#doclist tr')
                .should('not.exist', {timeout : 10000});
-       cy.wait(200);
 }
 
 function detectLOCoreVersion() {
diff --git a/cypress_test/plugins/tasks.js b/cypress_test/plugins/tasks.js
index 1f2f52a53..0cdec4880 100644
--- a/cypress_test/plugins/tasks.js
+++ b/cypress_test/plugins/tasks.js
@@ -9,6 +9,9 @@ function copyFile(args) {
 
                if (fs.existsSync(sourceFile)) {
                        fs.mkdirSync(args.destDir, { recursive: true });
+                       if (fs.existsSync(destFile)) {
+                               fs.unlinkSync(destFile);
+                       }
                        fs.writeFileSync(destFile, fs.readFileSync(sourceFile));
                        resolve('File ${sourceFile} copied to ${destFile}');
                }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to