Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Wait for evaluation before completing resetWidget and storeValue functions #11178

Merged
merged 3 commits into from
Feb 17, 2022

Conversation

hetunandu
Copy link
Member

@hetunandu hetunandu commented Feb 15, 2022

Description

If we don't let the evaluation finish before completing resetWidget and storeValue, next function in promise chain is executed before it's effects are reflected in the data tree

Fixes #11110

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

TODO

Checklist:

  • 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

Test coverage results 🧪

🔴 Total coverage has decreased
// Code coverage diff between base branch:release and head branch: fix/reset-and-store-wait-till-evaluation 
Status File % Stmts % Branch % Funcs % Lines
🔴 total 55.53 (-0.01) 37 (-0.01) 35.76 (0) 55.87 (-0.01)
🔴 app/client/src/components/editorComponents/form/fields/StyledFormComponents.tsx 65.38 (-2.48) 15.56 (-1.83) 0 (0) 65.38 (-2.48)
🔴 app/client/src/sagas/EvaluationsSaga.ts 19.38 (-0.71) 1.98 (-0.15) 7.41 (-0.59) 22.11 (-0.93)
🟢 app/client/src/sagas/PostEvaluationSagas.ts 16.55 (0.11) 0 (0) 0 (0) 20.17 (0.17)
🟢 app/client/src/sagas/ActionExecution/ResetWidgetActionSaga.ts 42.86 (0.75) 0 (0) 0 (0) 45 (0.56)
🟢 app/client/src/sagas/ActionExecution/StoreActionSaga.ts 34.48 (1.15) 0 (0) 0 (0) 38.46 (0.96)

@vercel
Copy link

vercel bot commented Feb 15, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/get-appsmith/appsmith/Ah5N7HXcXZYFmbmAYbyLZNUnhCLa
✅ Preview: https://appsmith-git-fix-reset-and-store-wait-till-0aadaa-get-appsmith.vercel.app

@github-actions github-actions bot added the Bug Something isn't working label Feb 15, 2022
@github-actions
Copy link

Unable to find test scripts. Please add necessary tests to the PR.

@hetunandu
Copy link
Member Author

/ok-to-test sha=91366c6

@hetunandu hetunandu added Critical This issue needs immediate attention. Drop everything else Javascript Product Issues related to users writing javascript in appsmith labels Feb 15, 2022
@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/1846620455.
Workflow: Appsmith External Integration Test Workflow.
Commit: 91366c6.
PR: 11178.

@hetunandu
Copy link
Member Author

/ok-to-test sha=7b39b0c

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/1851534973.
Workflow: Appsmith External Integration Test Workflow.
Commit: 7b39b0c.
PR: 11178.

Copy link
Contributor

@rishabhrathod01 rishabhrathod01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hetunandu hetunandu closed this Feb 17, 2022
@hetunandu hetunandu reopened this Feb 17, 2022
@hetunandu hetunandu merged commit 8599130 into release Feb 17, 2022
@hetunandu hetunandu deleted the fix/reset-and-store-wait-till-evaluation branch February 17, 2022 04:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Critical This issue needs immediate attention. Drop everything else Javascript Product Issues related to users writing javascript in appsmith
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Reset on search form does not work for the first time
3 participants