From dc15a4c398a1fbe2bd686e13d88aefa960a19eb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tam=C3=A1s=20Zolnai?= Date: Fri, 13 Mar 2020 13:47:15 +0100 Subject: [PATCH] cypress: integrate cypress-failed-log package. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To get a better log in case of error. Change-Id: Id8f72c78cb8a80e30ba3012147caa8106e1e7ce2 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90470 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tamás Zolnai --- cypress_test/.gitignore | 1 + cypress_test/cypress.json | 2 +- cypress_test/package.json | 1 + cypress_test/plugins/index.js | 3 ++- cypress_test/support/index.js | 3 +++ 5 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 cypress_test/support/index.js diff --git a/cypress_test/.gitignore b/cypress_test/.gitignore index 3e5e8dbd26..0b6b5b539a 100644 --- a/cypress_test/.gitignore +++ b/cypress_test/.gitignore @@ -2,3 +2,4 @@ node_modules cypress package-lock.json workdir +support/commands.js diff --git a/cypress_test/cypress.json b/cypress_test/cypress.json index 77aa372d30..1b6d041f9b 100644 --- a/cypress_test/cypress.json +++ b/cypress_test/cypress.json @@ -3,6 +3,6 @@ "video" : false, "pluginsFile" : "plugins/index.js", "defaultCommandTimeout" : 6000, - "supportFile" : false, + "supportFile" : "support/index.js", "ignoreTestFiles" : "*helper.js" } diff --git a/cypress_test/package.json b/cypress_test/package.json index d43558232f..9c9e1071ef 100644 --- a/cypress_test/package.json +++ b/cypress_test/package.json @@ -5,6 +5,7 @@ "license": "MPL-2.0", "dependencies": { "cypress": "4.1.0", + "cypress-failed-log": "2.6.2", "eslint": "6.8.0", "get-port-cli": "2.0.0", "wait-on": "4.0.0" diff --git a/cypress_test/plugins/index.js b/cypress_test/plugins/index.js index 8bf86dcba7..2d07606eb4 100644 --- a/cypress_test/plugins/index.js +++ b/cypress_test/plugins/index.js @@ -4,7 +4,8 @@ var tasks = require('./tasks'); function plugin(on, config) { on('task', { - copyFile: tasks.copyFile + copyFile: tasks.copyFile, + failed: require('cypress-failed-log/src/failed')() }); return config; diff --git a/cypress_test/support/index.js b/cypress_test/support/index.js new file mode 100644 index 0000000000..8f683db34b --- /dev/null +++ b/cypress_test/support/index.js @@ -0,0 +1,3 @@ +/* global require */ + +require('cypress-failed-log');