From f7eefec2963a8d90bb9fad3242454119ba35f177 Mon Sep 17 00:00:00 2001 From: Druthi Polisetty Date: Fri, 14 Apr 2023 14:44:53 +0530 Subject: [PATCH] fix: Bindings on API and Query panes are not tracked via ENTITY_BINDING_SUCCESS (#22150) ## Description Bindings on API and Query panes are not tracked via ENTITY_BINDING_SUCCESS Fixes #22125 ## Type of change - Bug fix (non-breaking change which fixes an issue) ## How Has This Been Tested? - Manual ### Test Plan > Add Testsmith test cases links that relate to this PR ### Issues raised during DP testing > Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR) ## Checklist: ### Dev activity - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] PR is being merged under a feature flag ### QA activity: - [ ] Test plan has been approved by relevant developers - [ ] Test plan has been peer reviewed by QA - [ ] Cypress test cases have been added and approved by either SDET or manual QA - [ ] Organized project review call with relevant stakeholders after Round 1/2 of QA - [x] Added Test Plan Approved label after reveiwing all Cypress test --- app/client/src/actions/evaluationActions.ts | 27 +++++++++++++++------ 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/app/client/src/actions/evaluationActions.ts b/app/client/src/actions/evaluationActions.ts index 60089604f5..65eaef3fd9 100644 --- a/app/client/src/actions/evaluationActions.ts +++ b/app/client/src/actions/evaluationActions.ts @@ -33,12 +33,13 @@ export const LINT_REDUX_ACTIONS = { [ReduxActionTypes.META_UPDATE_DEBOUNCED_EVAL]: true, }; -export const LOG_REDUX_ACTIONS = [ - ReduxActionTypes.UPDATE_LAYOUT, - ReduxActionTypes.UPDATE_WIDGET_PROPERTY, - ReduxActionTypes.UPDATE_WIDGET_NAME_SUCCESS, - ReduxActionTypes.CREATE_ACTION_SUCCESS, -]; +export const LOG_REDUX_ACTIONS = { + [ReduxActionTypes.UPDATE_LAYOUT]: true, + [ReduxActionTypes.UPDATE_WIDGET_PROPERTY]: true, + [ReduxActionTypes.UPDATE_WIDGET_NAME_SUCCESS]: true, + [ReduxActionTypes.CREATE_ACTION_SUCCESS]: true, + [ReduxActionTypes.UPDATE_ACTION_PROPERTY]: true, +}; export const EVALUATE_REDUX_ACTIONS = [ ...FIRST_EVAL_REDUX_ACTIONS, @@ -129,7 +130,19 @@ export function shouldLint(action: ReduxAction) { } export function shouldLog(action: ReduxAction) { - return LOG_REDUX_ACTIONS.includes(action.type); + if ( + action.type === ReduxActionTypes.BATCH_UPDATES_SUCCESS && + Array.isArray(action.payload) + ) { + const batchedActionTypes = action.payload.map( + (batchedAction) => batchedAction.type, + ); + return batchedActionTypes.some( + (actionType) => LOG_REDUX_ACTIONS[actionType], + ); + } + + return LOG_REDUX_ACTIONS[action.type]; } export const setEvaluatedTree = (