summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatus Szabo <matus.szabo@orange.com>2020-08-19 15:18:50 +0200
committerMatus Szabo <matus.szabo@orange.com>2020-08-19 15:18:50 +0200
commit371c0e2a5b8ddca26453e269a9170570832d6cc9 (patch)
treeb387eb1a1cc70ac5d507059488264d5a2e7da0d0 /src
parentd07851ce63f310aca9bb7b2c79943f9fe1928dcb (diff)
Added front-end tests
Increased front-end tests coverage to 60.95% Issue-ID: AAI-3094 Signed-off-by: Matus Szabo <matus.szabo@orange.com> Change-Id: I3a73737175dbbbd90e21eb3030b2f4b58250ccd5
Diffstat (limited to 'src')
-rw-r--r--src/app/analytics/AnalyticsActions.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/app/analytics/AnalyticsActions.js b/src/app/analytics/AnalyticsActions.js
index fea01f0..6053fb5 100644
--- a/src/app/analytics/AnalyticsActions.js
+++ b/src/app/analytics/AnalyticsActions.js
@@ -28,7 +28,8 @@ let fetch = require('node-fetch');
export function getStoreAnalyticsPayload() {
var documentBody = document.body.getElementsByTagName('*');
- return documentBody[0].innerHTML.replace('\s+', '');
+ // document.body is not available while running jest tests
+ return documentBody[0] ? documentBody[0].innerHTML.replace('\s+', '') : '';
}
function getAnalyticsPostBody(payload){