From bcd0bcae8730376238de97bb5a0154b59d2a8f30 Mon Sep 17 00:00:00 2001 From: Fodor Zoltan Date: Fri, 20 Aug 2021 19:54:57 +0300 Subject: [PATCH] #119: Fix issue with xhr no response breaking tests. Release 3.3.2 --- README.md | 4 ++++ package.json | 2 +- src/collector/LogCollectCypressXhr.js | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d0af391..aef23b8 100755 --- a/README.md +++ b/README.md @@ -308,6 +308,10 @@ directory. You should add `it.only` to the test case you are working on to speed ## Release Notes +#### 3.3.2 + +- Fix issue with no response on XHR breaking tests. [issue](https://github.com/archfz/cypress-terminal-report/issues/119) + #### 3.3.1 - Fix issue `cy:intercept` not between the allowed configuration options. [issue](https://github.com/archfz/cypress-terminal-report/issues/113) diff --git a/package.json b/package.json index c00da6c..8990816 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cypress-terminal-report", - "version": "3.3.1", + "version": "3.3.2", "description": "Better terminal and file output for cypress test logs.", "main": "index.js", "scripts": { diff --git a/src/collector/LogCollectCypressXhr.js b/src/collector/LogCollectCypressXhr.js index 15f019e..f402c92 100644 --- a/src/collector/LogCollectCypressXhr.js +++ b/src/collector/LogCollectCypressXhr.js @@ -65,6 +65,7 @@ module.exports = class LogCollectCypressXhr { if ( !isSuccess && options.consoleProps.XHR && + options.consoleProps.XHR.response && options.consoleProps.XHR.response.size && !this.collectorState.hasXhrResponseBeenLogged(options.consoleProps.XHR.id) ) {