summaryrefslogtreecommitdiffstats
path: root/src/app/MainScreenWrapperActionHelper.js
diff options
context:
space:
mode:
authorandrzejszukuc <andrzej.szukuc@nokia.com>2019-02-14 13:38:12 +0100
committerandrzejszukuc <andrzej.szukuc@nokia.com>2019-02-15 12:19:03 +0100
commit27fe29a076553c26e2c56dccaf52d2af789eae3a (patch)
tree412c53b55650f952a7bfed66bcd17d614fd2c009 /src/app/MainScreenWrapperActionHelper.js
parent20d0dc060ba6b264b82a265c487d350e498a5135 (diff)
Integration tests for MainScreenWrapperReducer
Change-Id: I7e947ea2ccab8877a3b8bb01d8e6b999bee1901f Issue-ID: AAI-2143 Signed-off-by: Andrzej Szukuc <andrzej.szukuc@nokia.com>
Diffstat (limited to 'src/app/MainScreenWrapperActionHelper.js')
-rw-r--r--src/app/MainScreenWrapperActionHelper.js14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/app/MainScreenWrapperActionHelper.js b/src/app/MainScreenWrapperActionHelper.js
index dd7450b..3477b03 100644
--- a/src/app/MainScreenWrapperActionHelper.js
+++ b/src/app/MainScreenWrapperActionHelper.js
@@ -74,8 +74,7 @@ function createOverlayDataFoundEvent(overlayData, paramName, curData, responseEv
}
function overlayViewData(dataFetchRequest, paramName, curData, responseEventKey) {
- return dispatch => {
- dataFetchRequest().then(
+ return dispatch => dataFetchRequest().then(
(response) => {
return response.json();
}
@@ -87,8 +86,7 @@ function overlayViewData(dataFetchRequest, paramName, curData, responseEventKey)
dispatch(getSetGlobalMessageEvent(ERROR_RETRIEVING_DATA, MESSAGE_LEVEL_DANGER));
dispatch(createOverlayDataFoundEvent({}, paramName, curData, responseEventKey));
});
- };
-}
+};
export function overlayNetworkCallback(urlApi, postBody, paramName, curData, responseEventKey) {
let dataFetchRequest =
@@ -113,8 +111,7 @@ function createViewDataFoundEvent(viewData, paramName, curViewData) {
}
function extensibleViewData(dataFetchRequest, paramName, curViewData) {
- return dispatch => {
- return dataFetchRequest().then(
+ return dispatch => dataFetchRequest().then(
(response) => {
return response.json();
}
@@ -127,7 +124,6 @@ function extensibleViewData(dataFetchRequest, paramName, curViewData) {
dispatch(createViewDataFoundEvent({}, paramName, curViewData));
//To-do: If need to send a flag later on to the view, add a function to have the flag
});
- };
}
export function extensibleViewNetworkCallback(urlApi, postBody, paramName, curViewData) {
@@ -136,9 +132,7 @@ export function extensibleViewNetworkCallback(urlApi, postBody, paramName, curVi
() => fetchRequestObj(BASE_URL + urlApi, POST,
POST_HEADER, postBody);
- return dispatch => {
- dispatch(extensibleViewData(dataFetchRequest, paramName, curViewData));
- };
+ return dispatch => dispatch(extensibleViewData(dataFetchRequest, paramName, curViewData));
}
export function extensibleViewMessageCallback(msgText, msgSeverity) {