-
Notifications
You must be signed in to change notification settings - Fork 399
[RI-7280] resolve redux store circular dependencies during tests #4809
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
Conversation
# Conflicts: # redisinsight/ui/src/components/connectivity-error/ConnectivityError.tsx # redisinsight/ui/src/components/inline-item-editor/InlineItemEditor.tsx # redisinsight/ui/src/components/item-list/components/delete-action/DeleteAction.tsx # redisinsight/ui/src/components/item-list/components/export-action/ExportAction.tsx # redisinsight/ui/src/components/query/query-actions/QueryActions.tsx # redisinsight/ui/src/components/query/query-card/QueryCardHeader/QueryCardHeader.tsx # redisinsight/ui/src/components/side-panels/panels/enablement-area/EnablementArea/components/InternalPage/InternalPage.tsx # redisinsight/ui/src/pages/browser/components/add-key/AddKeyHash/AddKeyHash.tsx # redisinsight/ui/src/pages/browser/components/add-key/AddKeyList/AddKeyList.tsx # redisinsight/ui/src/pages/browser/components/add-key/AddKeyReJSON/AddKeyReJSON.tsx # redisinsight/ui/src/pages/browser/components/add-key/AddKeySet/AddKeySet.tsx # redisinsight/ui/src/pages/browser/components/add-key/AddKeyStream/AddKeyStream.tsx # redisinsight/ui/src/pages/browser/components/add-key/AddKeyString/AddKeyString.tsx # redisinsight/ui/src/pages/browser/components/add-key/AddKeyZset/AddKeyZset.tsx # redisinsight/ui/src/pages/browser/modules/key-details/components/rejson-details/components/edit-entire-item-action/EditEntireItemAction.tsx # redisinsight/ui/src/pages/browser/modules/key-details/components/set-details/add-set-members/AddSetMembers.tsx # redisinsight/ui/src/pages/database-analysis/components/header/Header.tsx # redisinsight/ui/src/pages/home/components/database-list-header/DatabaseListHeader.tsx # redisinsight/ui/src/pages/home/components/database-manage-tags-modal/ManageTagsModal.tsx # redisinsight/ui/src/pages/settings/components/cloud-settings/CloudSettings.tsx # redisinsight/ui/src/pages/settings/components/cloud-settings/components/user-api-keys-table/UserApiKeysTable.tsx # redisinsight/ui/src/pages/slow-log/components/Actions/Actions.tsx
Code Coverage - Integration Tests
|
Code Coverage - Backend unit tests
Test suite run success2940 tests passing in 286 suites. Report generated by 🧪jest coverage report action from 82adae0 |
Code Coverage - Frontend unit tests
Test suite run success4826 tests passing in 634 suites. Report generated by 🧪jest coverage report action from 82adae0 |
csrf: cloneDeep(initialStateAppCsrfReducer), | ||
init: cloneDeep(initialStateAppInit), | ||
connectivity: cloneDeep(initialStateAppConnectivity), | ||
dbSettings: cloneDeep(initialStateAppDbSettings), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I forgot that this one was missing. Kudos for resolving it 👌
The base branch was changed.
…rcular-dependencies
Description
Issue: In jest ui unit tests we use configureMockStore instead of the real Redux store. The mock store doesn't actually use the reducers - it just holds state. However, when the test runs, some component or hook is trying to access the actual Redux store configuration, which expects the reducers to be properly defined. Hence we get a lot of errors in the console, that usually happen after a test finishes successfully.
Solution: Use redux store wrapper during unit tests that avoids circular dependencies via dynamic import.
A better solution would require large refactor of the code base.